* drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:90:25: warning: 'strncpy' specified bound depends on the length of the source argument
@ 2021-08-13 15:43 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-08-13 15:43 UTC (permalink / raw)
To: Huazhong Tan; +Cc: kbuild-all, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2695 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f8e6dfc64f6135d1b6c5215c14cd30b9b60a0008
commit: 1556ea9120ffcf4faf7ac6b62a6e28216f260a23 net: hns3: refactor dump mac list of debugfs
date: 3 months ago
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1556ea9120ffcf4faf7ac6b62a6e28216f260a23
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1556ea9120ffcf4faf7ac6b62a6e28216f260a23
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c: In function 'hclge_dbg_fill_content.constprop':
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:90:25: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
90 | strncpy(pos, items[i].name, strlen(items[i].name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:88:25: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
88 | strncpy(pos, result[i], strlen(result[i]));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +90 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
77
78 static void hclge_dbg_fill_content(char *content, u16 len,
79 const struct hclge_dbg_item *items,
80 const char **result, u16 size)
81 {
82 char *pos = content;
83 u16 i;
84
85 memset(content, ' ', len);
86 for (i = 0; i < size; i++) {
87 if (result)
88 strncpy(pos, result[i], strlen(result[i]));
89 else
> 90 strncpy(pos, items[i].name, strlen(items[i].name));
91 pos += strlen(items[i].name) + items[i].interval;
92 }
93 *pos++ = '\n';
94 *pos++ = '\0';
95 }
96
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 69222 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:90:25: warning: 'strncpy' specified bound depends on the length of the source argument
@ 2023-06-22 5:02 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2023-06-22 5:02 UTC (permalink / raw)
To: Huazhong Tan; +Cc: oe-kbuild-all, linux-kernel
Hi Huazhong,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dad9774deaf1cf8e8f7483310dfb2690310193d2
commit: 1556ea9120ffcf4faf7ac6b62a6e28216f260a23 net: hns3: refactor dump mac list of debugfs
date: 2 years, 1 month ago
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20230622/202306221218.d8gEgeI8-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230622/202306221218.d8gEgeI8-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306221218.d8gEgeI8-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c: In function 'hclge_dbg_fill_content.constprop':
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:90:25: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
90 | strncpy(pos, items[i].name, strlen(items[i].name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:88:25: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
88 | strncpy(pos, result[i], strlen(result[i]));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +90 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
77
78 static void hclge_dbg_fill_content(char *content, u16 len,
79 const struct hclge_dbg_item *items,
80 const char **result, u16 size)
81 {
82 char *pos = content;
83 u16 i;
84
85 memset(content, ' ', len);
86 for (i = 0; i < size; i++) {
87 if (result)
88 strncpy(pos, result[i], strlen(result[i]));
89 else
> 90 strncpy(pos, items[i].name, strlen(items[i].name));
91 pos += strlen(items[i].name) + items[i].interval;
92 }
93 *pos++ = '\n';
94 *pos++ = '\0';
95 }
96
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
* drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:90:25: warning: 'strncpy' specified bound depends on the length of the source argument
@ 2023-02-22 5:54 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2023-02-22 5:54 UTC (permalink / raw)
To: Huazhong Tan; +Cc: oe-kbuild-all, linux-kernel
Hi Huazhong,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5b7c4cabbb65f5c469464da6c5f614cbd7f730f2
commit: 1556ea9120ffcf4faf7ac6b62a6e28216f260a23 net: hns3: refactor dump mac list of debugfs
date: 1 year, 9 months ago
config: ia64-randconfig-r024-20230222 (https://download.01.org/0day-ci/archive/20230222/202302221354.9qkB7bev-lkp@intel.com/config)
compiler: ia64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1556ea9120ffcf4faf7ac6b62a6e28216f260a23
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1556ea9120ffcf4faf7ac6b62a6e28216f260a23
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/net/ethernet/hisilicon/hns3/hns3pf/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302221354.9qkB7bev-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from arch/ia64/include/asm/pgtable.h:154,
from include/linux/pgtable.h:6,
from include/linux/mm.h:33,
from include/linux/bvec.h:14,
from include/linux/skbuff.h:17,
from include/linux/if_ether.h:19,
from include/linux/etherdevice.h:20,
from drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h:7,
from drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:6:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
arch/ia64/include/asm/mmu_context.h:127:48: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
127 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
| ^~~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c: In function 'hclge_dbg_fill_content.constprop':
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:90:25: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
90 | strncpy(pos, items[i].name, strlen(items[i].name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:88:25: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
88 | strncpy(pos, result[i], strlen(result[i]));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +90 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
77
78 static void hclge_dbg_fill_content(char *content, u16 len,
79 const struct hclge_dbg_item *items,
80 const char **result, u16 size)
81 {
82 char *pos = content;
83 u16 i;
84
85 memset(content, ' ', len);
86 for (i = 0; i < size; i++) {
87 if (result)
88 strncpy(pos, result[i], strlen(result[i]));
89 else
> 90 strncpy(pos, items[i].name, strlen(items[i].name));
91 pos += strlen(items[i].name) + items[i].interval;
92 }
93 *pos++ = '\n';
94 *pos++ = '\0';
95 }
96
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 6+ messages in thread
* drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:90:25: warning: 'strncpy' specified bound depends on the length of the source argument
@ 2021-12-25 21:45 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-12-25 21:45 UTC (permalink / raw)
To: Huazhong Tan; +Cc: kbuild-all, linux-kernel
Hi Huazhong,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b927dfc67d05a72167ab980c375ed98b2ee9c2c6
commit: 1556ea9120ffcf4faf7ac6b62a6e28216f260a23 net: hns3: refactor dump mac list of debugfs
date: 8 months ago
config: parisc-randconfig-r021-20211226 (https://download.01.org/0day-ci/archive/20211226/202112260546.UoXtfDb5-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1556ea9120ffcf4faf7ac6b62a6e28216f260a23
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1556ea9120ffcf4faf7ac6b62a6e28216f260a23
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bash drivers/net/ethernet/hisilicon/hns3/hns3pf/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c: In function 'hclge_dbg_fill_content.constprop':
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:90:25: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
90 | strncpy(pos, items[i].name, strlen(items[i].name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:88:25: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
88 | strncpy(pos, result[i], strlen(result[i]));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +90 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
77
78 static void hclge_dbg_fill_content(char *content, u16 len,
79 const struct hclge_dbg_item *items,
80 const char **result, u16 size)
81 {
82 char *pos = content;
83 u16 i;
84
85 memset(content, ' ', len);
86 for (i = 0; i < size; i++) {
87 if (result)
88 strncpy(pos, result[i], strlen(result[i]));
89 else
> 90 strncpy(pos, items[i].name, strlen(items[i].name));
91 pos += strlen(items[i].name) + items[i].interval;
92 }
93 *pos++ = '\n';
94 *pos++ = '\0';
95 }
96
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:90:25: warning: 'strncpy' specified bound depends on the length of the source argument
@ 2021-11-08 4:18 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-11-08 4:18 UTC (permalink / raw)
To: Huazhong Tan; +Cc: kbuild-all, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 6884 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6b75d88fa81b122cce37ebf17428a849ccd3d0f1
commit: 1556ea9120ffcf4faf7ac6b62a6e28216f260a23 net: hns3: refactor dump mac list of debugfs
date: 6 months ago
config: ia64-randconfig-r026-20211102 (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1556ea9120ffcf4faf7ac6b62a6e28216f260a23
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1556ea9120ffcf4faf7ac6b62a6e28216f260a23
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/ia64/include/asm/pgtable.h:154,
from include/linux/pgtable.h:6,
from include/linux/mm.h:33,
from include/linux/bvec.h:14,
from include/linux/skbuff.h:17,
from include/linux/if_ether.h:19,
from include/linux/etherdevice.h:20,
from drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h:7,
from drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:6:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
arch/ia64/include/asm/mmu_context.h:127:48: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
127 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
| ^~~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c: In function 'hclge_dbg_fill_content.constprop':
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:90:25: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
90 | strncpy(pos, items[i].name, strlen(items[i].name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:88:25: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
88 | strncpy(pos, result[i], strlen(result[i]));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +90 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
5
> 6 #include "hclge_debugfs.h"
7 #include "hclge_main.h"
8 #include "hclge_tm.h"
9 #include "hnae3.h"
10
11 static const char * const hclge_mac_state_str[] = {
12 "TO_ADD", "TO_DEL", "ACTIVE"
13 };
14
15 static const struct hclge_dbg_reg_type_info hclge_dbg_reg_info[] = {
16 { .reg_type = "bios common",
17 .dfx_msg = &hclge_dbg_bios_common_reg[0],
18 .reg_msg = { .msg_num = ARRAY_SIZE(hclge_dbg_bios_common_reg),
19 .offset = HCLGE_DBG_DFX_BIOS_OFFSET,
20 .cmd = HCLGE_OPC_DFX_BIOS_COMMON_REG } },
21 { .reg_type = "ssu",
22 .dfx_msg = &hclge_dbg_ssu_reg_0[0],
23 .reg_msg = { .msg_num = ARRAY_SIZE(hclge_dbg_ssu_reg_0),
24 .offset = HCLGE_DBG_DFX_SSU_0_OFFSET,
25 .cmd = HCLGE_OPC_DFX_SSU_REG_0 } },
26 { .reg_type = "ssu",
27 .dfx_msg = &hclge_dbg_ssu_reg_1[0],
28 .reg_msg = { .msg_num = ARRAY_SIZE(hclge_dbg_ssu_reg_1),
29 .offset = HCLGE_DBG_DFX_SSU_1_OFFSET,
30 .cmd = HCLGE_OPC_DFX_SSU_REG_1 } },
31 { .reg_type = "ssu",
32 .dfx_msg = &hclge_dbg_ssu_reg_2[0],
33 .reg_msg = { .msg_num = ARRAY_SIZE(hclge_dbg_ssu_reg_2),
34 .offset = HCLGE_DBG_DFX_SSU_2_OFFSET,
35 .cmd = HCLGE_OPC_DFX_SSU_REG_2 } },
36 { .reg_type = "igu egu",
37 .dfx_msg = &hclge_dbg_igu_egu_reg[0],
38 .reg_msg = { .msg_num = ARRAY_SIZE(hclge_dbg_igu_egu_reg),
39 .offset = HCLGE_DBG_DFX_IGU_OFFSET,
40 .cmd = HCLGE_OPC_DFX_IGU_EGU_REG } },
41 { .reg_type = "rpu",
42 .dfx_msg = &hclge_dbg_rpu_reg_0[0],
43 .reg_msg = { .msg_num = ARRAY_SIZE(hclge_dbg_rpu_reg_0),
44 .offset = HCLGE_DBG_DFX_RPU_0_OFFSET,
45 .cmd = HCLGE_OPC_DFX_RPU_REG_0 } },
46 { .reg_type = "rpu",
47 .dfx_msg = &hclge_dbg_rpu_reg_1[0],
48 .reg_msg = { .msg_num = ARRAY_SIZE(hclge_dbg_rpu_reg_1),
49 .offset = HCLGE_DBG_DFX_RPU_1_OFFSET,
50 .cmd = HCLGE_OPC_DFX_RPU_REG_1 } },
51 { .reg_type = "ncsi",
52 .dfx_msg = &hclge_dbg_ncsi_reg[0],
53 .reg_msg = { .msg_num = ARRAY_SIZE(hclge_dbg_ncsi_reg),
54 .offset = HCLGE_DBG_DFX_NCSI_OFFSET,
55 .cmd = HCLGE_OPC_DFX_NCSI_REG } },
56 { .reg_type = "rtc",
57 .dfx_msg = &hclge_dbg_rtc_reg[0],
58 .reg_msg = { .msg_num = ARRAY_SIZE(hclge_dbg_rtc_reg),
59 .offset = HCLGE_DBG_DFX_RTC_OFFSET,
60 .cmd = HCLGE_OPC_DFX_RTC_REG } },
61 { .reg_type = "ppp",
62 .dfx_msg = &hclge_dbg_ppp_reg[0],
63 .reg_msg = { .msg_num = ARRAY_SIZE(hclge_dbg_ppp_reg),
64 .offset = HCLGE_DBG_DFX_PPP_OFFSET,
65 .cmd = HCLGE_OPC_DFX_PPP_REG } },
66 { .reg_type = "rcb",
67 .dfx_msg = &hclge_dbg_rcb_reg[0],
68 .reg_msg = { .msg_num = ARRAY_SIZE(hclge_dbg_rcb_reg),
69 .offset = HCLGE_DBG_DFX_RCB_OFFSET,
70 .cmd = HCLGE_OPC_DFX_RCB_REG } },
71 { .reg_type = "tqp",
72 .dfx_msg = &hclge_dbg_tqp_reg[0],
73 .reg_msg = { .msg_num = ARRAY_SIZE(hclge_dbg_tqp_reg),
74 .offset = HCLGE_DBG_DFX_TQP_OFFSET,
75 .cmd = HCLGE_OPC_DFX_TQP_REG } },
76 };
77
78 static void hclge_dbg_fill_content(char *content, u16 len,
79 const struct hclge_dbg_item *items,
80 const char **result, u16 size)
81 {
82 char *pos = content;
83 u16 i;
84
85 memset(content, ' ', len);
86 for (i = 0; i < size; i++) {
87 if (result)
88 strncpy(pos, result[i], strlen(result[i]));
89 else
> 90 strncpy(pos, items[i].name, strlen(items[i].name));
91 pos += strlen(items[i].name) + items[i].interval;
92 }
93 *pos++ = '\n';
94 *pos++ = '\0';
95 }
96
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31750 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:90:25: warning: 'strncpy' specified bound depends on the length of the source argument
@ 2021-08-20 19:21 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-08-20 19:21 UTC (permalink / raw)
To: Huazhong Tan; +Cc: kbuild-all, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 3134 bytes --]
Hi Huazhong,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d992fe5318d8d7af9510b879439a3c7f283da442
commit: 1556ea9120ffcf4faf7ac6b62a6e28216f260a23 net: hns3: refactor dump mac list of debugfs
date: 3 months ago
config: csky-buildonly-randconfig-r004-20210812 (attached as .config)
compiler: csky-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1556ea9120ffcf4faf7ac6b62a6e28216f260a23
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1556ea9120ffcf4faf7ac6b62a6e28216f260a23
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=csky
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c: In function 'hclge_dbg_fill_content.constprop':
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:90:25: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
90 | strncpy(pos, items[i].name, strlen(items[i].name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:88:25: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
88 | strncpy(pos, result[i], strlen(result[i]));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for LOCKDEP
Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
Selected by
- PROVE_LOCKING && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
- DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
vim +/strncpy +90 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
77
78 static void hclge_dbg_fill_content(char *content, u16 len,
79 const struct hclge_dbg_item *items,
80 const char **result, u16 size)
81 {
82 char *pos = content;
83 u16 i;
84
85 memset(content, ' ', len);
86 for (i = 0; i < size; i++) {
87 if (result)
88 strncpy(pos, result[i], strlen(result[i]));
89 else
> 90 strncpy(pos, items[i].name, strlen(items[i].name));
91 pos += strlen(items[i].name) + items[i].interval;
92 }
93 *pos++ = '\n';
94 *pos++ = '\0';
95 }
96
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35130 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-06-22 5:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13 15:43 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:90:25: warning: 'strncpy' specified bound depends on the length of the source argument kernel test robot
2021-08-20 19:21 kernel test robot
2021-11-08 4:18 kernel test robot
2021-12-25 21:45 kernel test robot
2023-02-22 5:54 kernel test robot
2023-06-22 5:02 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).