summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2024-09-05 07:17:26 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2024-10-04 11:04:15 +0300
commitd49e7d08f08eb2c553a83b408894aad3cb8ccf5e (patch)
treea150d8c81a98a70065c9ad2d5abb05f768528f22 /tools/perf/scripts/python
parent5b53a9d40c4f83b44de8da06af9a9c9b3fb14988 (diff)
downloadlinux-d49e7d08f08eb2c553a83b408894aad3cb8ccf5e.tar.xz
Input: serio-raw - fix potential serio port name truncation
When compiling with W=1 the following warnings are triggered: drivers/input/serio/serio_raw.c: In function ‘serio_raw_connect’: drivers/input/serio/serio_raw.c:303:28: error: ‘%ld’ directive output may be truncated writing between 1 and 11 bytes into a region of size 7 [-Werror=format-truncation=] 303 | "serio_raw%ld", (long)atomic_inc_return(&serio_raw_no)); atomic_inc_return() returns an int, so there is no reason to cast it to long and print as such. Fix the issue by removing the cast, printing it as unsigned decimal, and expanding the name from 16 to 20 bytes to accommodate the largest possible port number. Link: https://lore.kernel.org/r/20240905041732.2034348-22-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions