Re: [PATCH v2 01/15] net: rnpgbe: Add build support for rnpgbe
From: Yibo Dong
Date: Tue Jul 22 2025 - 23:02:41 EST
On Tue, Jul 22, 2025 at 12:29:09PM +0100, Simon Horman wrote:
> On Mon, Jul 21, 2025 at 07:32:24PM +0800, Dong Yibo wrote:
> > Add build options and doc for mucse.
> > Initialize pci device access for MUCSE devices.
> >
> > Signed-off-by: Dong Yibo <dong100@xxxxxxxxx>
>
> ...
>
> > diff --git a/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c b/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c
> > new file mode 100644
> > index 000000000000..13b49875006b
> > --- /dev/null
> > +++ b/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c
> > @@ -0,0 +1,226 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/* Copyright(c) 2020 - 2025 Mucse Corporation. */
> > +
> > +#include <linux/types.h>
> > +#include <linux/module.h>
> > +#include <linux/pci.h>
> > +#include <linux/netdevice.h>
> > +#include <linux/string.h>
> > +#include <linux/etherdevice.h>
> > +
> > +#include "rnpgbe.h"
> > +
> > +char rnpgbe_driver_name[] = "rnpgbe";
>
> At least with (only) this patch applied, rnpgbe_driver_name
> appears to only be used in this file. So it should be static.
>
> Flagged by Sparse.
>
> Please make sure that when each patch in the series is applied in turn,
> no new Sparse warnings are introduced. Likewise for build errors.
> And ideally warnings for W=1 builds.
>
> ...
>
Got it, I will fix this.
But I can't get this warning follow steps in my local:
---
- make x86_64_defconfig
- make menuconfig (select my driver rnpgbe to *)
- make W=1 -j 20
---
if I compile it with 'make W=1 C=1 -j 20', some errors like this:
---
./include/linux/skbuff.h:978:1: error: directive in macro's argument list
./include/linux/skbuff.h:981:1: error: directive in macro's argument list
........
Segmentation fault
---
I also tried to use nipa/tests/patch/build_allmodconfig_warn
/build_allmodconfig.sh (not run the bot, just copy this sh to source
code). It seems the same with 'make W=1 C=1 -j 20'.
Is there something wrong for me? I want to get the warnings locally,
then I can check it before sending patches. Any suggestions to me, please?
Thanks for your feedback.