RE: [PATCH net-next 0/6] net: hns3: Add more commands to Debugfs in HNS3 driver

From: Salil Mehta
Date: Sat Dec 15 2018 - 05:36:41 EST


> From: David Miller [mailto:davem@xxxxxxxxxxxxx]
> Sent: Friday, December 14, 2018 10:37 PM
> To: Salil Mehta <salil.mehta@xxxxxxxxxx>
> Cc: Zhuangyuzeng (Yisen) <yisen.zhuang@xxxxxxxxxx>; lipeng (Y)
> <lipeng321@xxxxxxxxxx>; mehta.salil@xxxxxxxxxx; netdev@xxxxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx; Linuxarm <linuxarm@xxxxxxxxxx>
> Subject: Re: [PATCH net-next 0/6] net: hns3: Add more commands to
> Debugfs in HNS3 driver
>
> From: David Miller <davem@xxxxxxxxxxxxx>
> Date: Fri, 14 Dec 2018 14:30:46 -0800 (PST)
>
> > From: Salil Mehta <salil.mehta@xxxxxxxxxx>
> > Date: Tue, 11 Dec 2018 17:13:24 +0000
> >
> >> This patch-set adds few more debugfs commands to HNS3 Ethernet
> >> Driver. Support has been added to query info related to below
> >> items:
> >> 1. Packet buffer descriptor ("echo bd info [queue no] [bd index] > cmd")
> >> 2. Manager table("echo dump mng tbl > cmd")
> >> 3. Dfx status register("echo dump reg ssu [prt id] > cmd")
> >> 4. Dcb status register("echo dump reg dcb [port id] > cmd")
> >> 5. Queue map ("echo queue map [queue no] > cmd")
> >> 6. Tm map ("echo tm map [queue no] > cmd")
> >>
> >> NOTE: Above commands are *read-only* and are only intended to
> >> query the information from the SoC(and dump inside the kernel,
> >> for now) and in no way tries to perform write operations for
> >> the purpose of configuration etc.
> >
> > Series applied.
>
> Actually, reverted.
>
> Please fix these warnings and resubmit (with gcc version
> "gcc (GCC) 8.2.1 20181105 (Red Hat 8.2.1-5)"):
>
> In file included from ./include/linux/bitmap.h:9,
> from ./include/linux/cpumask.h:12,
> from ./arch/x86/include/asm/cpumask.h:5,
> from ./arch/x86/include/asm/msr.h:11,
> from ./arch/x86/include/asm/processor.h:21,
> from ./arch/x86/include/asm/cpufeature.h:8,
> from ./arch/x86/include/asm/thread_info.h:53,
> from ./include/linux/thread_info.h:38,
> from ./arch/x86/include/asm/preempt.h:7,
> from ./include/linux/preempt.h:81,
> from ./include/linux/spinlock.h:51,
> from ./include/linux/wait.h:9,
> from ./include/linux/wait_bit.h:8,
> from ./include/linux/fs.h:6,
> from ./include/linux/debugfs.h:15,
> from
> drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:4:
> In function ʽstrncatʼ,
> inlined from ʽhns3_dbg_helpʼ at
> drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:263:2:
> ./include/linux/string.h:320:10: warning: ʽ__builtin_strncatʼ specified
> bound 256 equals destination size [-Wstringop-overflow=]
> return __builtin_strncat(p, q, count);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In function ʽstrncatʼ,
> inlined from ʽhns3_dbg_helpʼ at
> drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:252:2:
> ./include/linux/string.h:320:10: warning: ʽ__builtin_strncatʼ specified
> bound 256 equals destination size [-Wstringop-overflow=]
> return __builtin_strncat(p, q, count);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from ./include/linux/bitmap.h:9,
> from ./include/linux/cpumask.h:12,
> from ./arch/x86/include/asm/cpumask.h:5,
> from ./arch/x86/include/asm/msr.h:11,
> from ./arch/x86/include/asm/processor.h:21,
> from ./include/linux/mutex.h:19,
> from ./include/linux/kernfs.h:13,
> from ./include/linux/sysfs.h:16,
> from ./include/linux/kobject.h:20,
> from ./include/linux/device.h:16,
> from
> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:4:
> In function ʽstrncatʼ,
> inlined from ʽhclge_dbg_dump_mng_tableʼ at
> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:795:2:
> ./include/linux/string.h:320:10: warning: ʽ__builtin_strncatʼ specified
> bound 256 equals destination size [-Wstringop-overflow=]
> return __builtin_strncat(p, q, count);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Ahh, goodness. Perhaps, I have been using outdated compiler.
I will float the V2 version today after fixing above.

Thanks
Dave