Re: [PATCH net-next v5 1/4] devlink: Extend devlink-rate api with export functions and new params
From: Alexander Lobakin <hidden>
Date: 2022-10-11 14:00:39
From: Alexander Lobakin <hidden>
Date: 2022-10-11 14:00:39
From: kernel test robot <redacted> Date: Tue, 11 Oct 2022 19:32:48 +0800
Hi Michal, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master]
[...]
All warnings (new ones prefixed by >>): net/core/devlink.c: In function 'devl_rate_node_create':quoted
quoted
net/core/devlink.c:10314:9: warning: 'strncpy' specified bound 30 equals destination size [-Wstringop-truncation]10314 | strncpy(rate_node->name, node_name, DEVLINK_RATE_NAME_MAX_LEN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BTW, it's highly recommended to use strscpy().
vim +/strncpy +10314 net/core/devlink.c
[...]
-- 0-DAY CI Kernel Test Service https://01.org/lkp
Thanks, Olek