tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-next
head: 50e177c5bfd9abc3828cb57e14e6169170f6764a
commit: 7d3e4d807df2a216b9aa2944372f2b3f6ef3f205 [21/24] misc: microchip: pci1xxxx: load gpio driver for the gpio controller auxiliary device enumerated by the auxiliary bus driver.
config: i386-randconfig-s033-20220905
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/commit/?id=7d3e4d807df2a216b9aa2944372f2b3f6ef3f205
git remote add char-misc https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
git fetch --no-tags char-misc char-misc-next
git checkout 7d3e4d807df2a216b9aa2944372f2b3f6ef3f205
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/misc/mchp_pci1xxxx/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>
sparse warnings: (new ones prefixed by >>)
>> drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:135:34: sparse: sparse: symbol 'pci1xxxx_gpio_auxiliary_id_table' was not declared. Should it be static?
vim +/pci1xxxx_gpio_auxiliary_id_table +135 drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
128
129 static int pci1xxxx_gpio_set_config(struct gpio_chip *gpio, unsigned int offset,
130 unsigned long config)
131 {
132 struct pci1xxxx_gpio *priv = gpiochip_get_data(gpio);
133 unsigned long flags;
134 int ret = 0;
> 135
136 spin_lock_irqsave(&priv->lock, flags);
137 switch (pinconf_to_config_param(config)) {
138 case PIN_CONFIG_BIAS_PULL_UP:
139 pci1xxx_assign_bit(priv->reg_base, PULLUP_OFFSET(offset), (offset % 32), true);
140 break;
141 case PIN_CONFIG_BIAS_PULL_DOWN:
142 pci1xxx_assign_bit(priv->reg_base, PULLDOWN_OFFSET(offset), (offset % 32), true);
143 break;
144 case PIN_CONFIG_BIAS_DISABLE:
145 pci1xxx_assign_bit(priv->reg_base, PULLUP_OFFSET(offset), (offset % 32), false);
146 pci1xxx_assign_bit(priv->reg_base, PULLDOWN_OFFSET(offset), (offset % 32), false);
147 break;
148 case PIN_CONFIG_DRIVE_OPEN_DRAIN:
149 pci1xxx_assign_bit(priv->reg_base, OPENDRAIN_OFFSET(offset), (offset % 32), true);
150 break;
151 default:
152 ret = -EOPNOTSUPP;
153 break;
154 }
155 spin_unlock_irqrestore(&priv->lock, flags);
156
157 return ret;
158 }
159
--
0-DAY CI Kernel Test Service
https://01.org/lkp
> -----Original Message-----
> From: kernel test robot <[email protected]>
> Sent: Monday, September 5, 2022 12:07 PM
> To: Kumaravel Thiagarajan - I21417 <[email protected]>
> Cc: [email protected]; [email protected]; Greg Kroah-
> Hartman <[email protected]>
> Subject: [char-misc:char-misc-next 21/24]
> drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:135:34: sparse: sparse:
> symbol 'pci1xxxx_gpio_auxiliary_id_table' was not declared. Should it be
> static?
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
> char-misc-next
> head: 50e177c5bfd9abc3828cb57e14e6169170f6764a
> commit: 7d3e4d807df2a216b9aa2944372f2b3f6ef3f205 [21/24] misc:
> microchip: pci1xxxx: load gpio driver for the gpio controller auxiliary device
> enumerated by the auxiliary bus driver.
> config: i386-randconfig-s033-20220905
> compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
.
.
.
>
> sparse warnings: (new ones prefixed by >>)
> >> drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:135:34: sparse:
> sparse: symbol 'pci1xxxx_gpio_auxiliary_id_table' was not declared. Should it
> be static?
Greg, do I need to submit another patch to resolve this warning on char-misc-next?
I did not combine this with the last patch thinking that the last patch would
be merged with the commit that introduced the errors and not queued.
Thank You.
Regards,
Kumaravel
On Tue, Sep 06, 2022 at 06:02:22PM +0000, [email protected] wrote:
> > -----Original Message-----
> > From: kernel test robot <[email protected]>
> > Sent: Monday, September 5, 2022 12:07 PM
> > To: Kumaravel Thiagarajan - I21417 <[email protected]>
> > Cc: [email protected]; [email protected]; Greg Kroah-
> > Hartman <[email protected]>
> > Subject: [char-misc:char-misc-next 21/24]
> > drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:135:34: sparse: sparse:
> > symbol 'pci1xxxx_gpio_auxiliary_id_table' was not declared. Should it be
> > static?
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
> > char-misc-next
> > head: 50e177c5bfd9abc3828cb57e14e6169170f6764a
> > commit: 7d3e4d807df2a216b9aa2944372f2b3f6ef3f205 [21/24] misc:
> > microchip: pci1xxxx: load gpio driver for the gpio controller auxiliary device
> > enumerated by the auxiliary bus driver.
> > config: i386-randconfig-s033-20220905
> > compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
> .
> .
> .
> >
> > sparse warnings: (new ones prefixed by >>)
> > >> drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:135:34: sparse:
> > sparse: symbol 'pci1xxxx_gpio_auxiliary_id_table' was not declared. Should it
> > be static?
> Greg, do I need to submit another patch to resolve this warning on char-misc-next?
> I did not combine this with the last patch thinking that the last patch would
> be merged with the commit that introduced the errors and not queued.
No, I can't merge it into an older commit as those branches can never be
rebased.
Please send a new fix for this issue as well.
thanks,
greg k-h