[arm-platforms:kvm-arm64/mmu-pgt 309/874] drivers/tty/serial/samsung_tty.c:2083:9: warning: this 'if' clause does not guard...
kernel test robot
lkp at intel.com
Sat May 18 01:31:58 PDT 2024
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/mmu-pgt
head: 1ed29f79e7c6441ef29c25a43d7c82d91e884dcc
commit: 05c68699aca4de1b69a49a8a6b2b80ff2956cf12 [309/874] tty: serial: samsung_tty: Support runtime PM
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240518/202405181632.YNCFFwoE-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240518/202405181632.YNCFFwoE-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405181632.YNCFFwoE-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/tty/serial/samsung_tty.c: In function 's3c24xx_serial_remove':
>> drivers/tty/serial/samsung_tty.c:2083:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
2083 | if (port)
| ^~
drivers/tty/serial/samsung_tty.c:2085:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
2085 | uart_remove_one_port(&s3c24xx_uart_drv, port);
| ^~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/samsung_tty.c: In function 's3c24xx_serial_init_port':
drivers/tty/serial/samsung_tty.c:1808:49: warning: '%d' directive writing between 1 and 3 bytes into a region of size 2 [-Wformat-overflow=]
1808 | sprintf(clk_name, "clk_uart_baud%d", clk_num);
| ^~
In function 's3c24xx_serial_enable_baudclk',
inlined from 's3c24xx_serial_init_port' at drivers/tty/serial/samsung_tty.c:1914:8:
drivers/tty/serial/samsung_tty.c:1808:35: note: directive argument in the range [0, 254]
1808 | sprintf(clk_name, "clk_uart_baud%d", clk_num);
| ^~~~~~~~~~~~~~~~~
drivers/tty/serial/samsung_tty.c:1808:17: note: 'sprintf' output between 15 and 17 bytes into a destination of size 15
1808 | sprintf(clk_name, "clk_uart_baud%d", clk_num);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/samsung_tty.c: In function 's3c24xx_serial_console_setup':
drivers/tty/serial/samsung_tty.c:2357:49: warning: '%d' directive writing between 1 and 3 bytes into a region of size 2 [-Wformat-overflow=]
2357 | sprintf(clk_name, "clk_uart_baud%d", clk_sel);
| ^~
In function 's3c24xx_serial_get_options',
inlined from 's3c24xx_serial_console_setup' at drivers/tty/serial/samsung_tty.c:2402:3:
drivers/tty/serial/samsung_tty.c:2357:35: note: directive argument in the range [0, 255]
2357 | sprintf(clk_name, "clk_uart_baud%d", clk_sel);
| ^~~~~~~~~~~~~~~~~
drivers/tty/serial/samsung_tty.c:2357:17: note: 'sprintf' output between 15 and 17 bytes into a destination of size 15
2357 | sprintf(clk_name, "clk_uart_baud%d", clk_sel);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/if +2083 drivers/tty/serial/samsung_tty.c
b497549a035c2a drivers/serial/samsung.c Ben Dooks 2008-07-03 2077
77772addc1f110 drivers/tty/serial/samsung_tty.c Uwe Kleine-König 2023-11-10 2078 static void s3c24xx_serial_remove(struct platform_device *dev)
b497549a035c2a drivers/serial/samsung.c Ben Dooks 2008-07-03 2079 {
b497549a035c2a drivers/serial/samsung.c Ben Dooks 2008-07-03 2080 struct uart_port *port = s3c24xx_dev_to_port(&dev->dev);
05c68699aca4de drivers/tty/serial/samsung_tty.c Hector Martin 2021-09-20 2081 struct s3c24xx_uart_port *ourport = to_ourport(port);
b497549a035c2a drivers/serial/samsung.c Ben Dooks 2008-07-03 2082
b1617c7888476e drivers/tty/serial/samsung_tty.c Tudor Ambarus 2024-01-19 @2083 if (port)
05c68699aca4de drivers/tty/serial/samsung_tty.c Hector Martin 2021-09-20 2084 pm_runtime_get_sync(&dev->dev);
b497549a035c2a drivers/serial/samsung.c Ben Dooks 2008-07-03 2085 uart_remove_one_port(&s3c24xx_uart_drv, port);
b497549a035c2a drivers/serial/samsung.c Ben Dooks 2008-07-03 2086
05c68699aca4de drivers/tty/serial/samsung_tty.c Hector Martin 2021-09-20 2087 clk_disable_unprepare(ourport->clk);
05c68699aca4de drivers/tty/serial/samsung_tty.c Hector Martin 2021-09-20 2088 if (!IS_ERR(ourport->baudclk))
05c68699aca4de drivers/tty/serial/samsung_tty.c Hector Martin 2021-09-20 2089 clk_disable_unprepare(ourport->baudclk);
05c68699aca4de drivers/tty/serial/samsung_tty.c Hector Martin 2021-09-20 2090
05c68699aca4de drivers/tty/serial/samsung_tty.c Hector Martin 2021-09-20 2091 pm_runtime_disable(&dev->dev);
05c68699aca4de drivers/tty/serial/samsung_tty.c Hector Martin 2021-09-20 2092 pm_runtime_set_suspended(&dev->dev);
05c68699aca4de drivers/tty/serial/samsung_tty.c Hector Martin 2021-09-20 2093 pm_runtime_put_noidle(&dev->dev);
05c68699aca4de drivers/tty/serial/samsung_tty.c Hector Martin 2021-09-20 2094
6f134c3c770355 drivers/tty/serial/samsung.c Tushar Behera 2014-01-20 2095 uart_unregister_driver(&s3c24xx_uart_drv);
b497549a035c2a drivers/serial/samsung.c Ben Dooks 2008-07-03 2096 }
b497549a035c2a drivers/serial/samsung.c Ben Dooks 2008-07-03 2097
:::::: The code at line 2083 was first introduced by commit
:::::: b1617c7888476e69e5b03b89eedef2bd2c60901e tty: serial: samsung: remove braces on single statement block
:::::: TO: Tudor Ambarus <tudor.ambarus at linaro.org>
:::::: CC: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the linux-arm-kernel
mailing list