All of lore.kernel.org
 help / color / mirror / Atom feed
* [intel-lts:pr/69 1/1] drivers/pinctrl/pinctrl-mcp23s08.c:782:24: warning: unused variable 'one_regmap_config'
@ 2025-02-24 20:33 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-24 20:33 UTC (permalink / raw)
  Cc: oe-kbuild-all

Hi Jan,

FYI, the error/warning still remains.

tree:   https://github.com/intel/linux-intel-lts.git pr/69
head:   f36ea6678b4077d9bbb4644e73977fb91d187ab7
commit: 39958037723af522b275f5d3a72f5778d893f5aa [1/1] pinctrl: mcp23s08: spi: Fix regmap debugfs entries
config: arm-randconfig-004-20250224 (https://download.01.org/0day-ci/archive/20250225/202502250444.kC5LoHEu-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250225/202502250444.kC5LoHEu-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/202502250444.kC5LoHEu-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/pinctrl/pinctrl-mcp23s08.c: In function 'mcp_pinconf_set':
   drivers/pinctrl/pinctrl-mcp23s08.c:282:6: warning: variable 'val' set but not used [-Wunused-but-set-variable]
     u16 val;
         ^~~
   drivers/pinctrl/pinctrl-mcp23s08.c:281:11: warning: variable 'mask' set but not used [-Wunused-but-set-variable]
     u32 arg, mask;
              ^~~~
   drivers/pinctrl/pinctrl-mcp23s08.c: In function 'mcp23s08_probe_one':
>> drivers/pinctrl/pinctrl-mcp23s08.c:782:24: warning: unused variable 'one_regmap_config' [-Wunused-variable]
     struct regmap_config *one_regmap_config = NULL;
                           ^~~~~~~~~~~~~~~~~


vim +/one_regmap_config +782 drivers/pinctrl/pinctrl-mcp23s08.c

   775	
   776	static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev,
   777				      void *data, unsigned addr, unsigned type,
   778				      unsigned int base, int cs)
   779	{
   780		int status, ret;
   781		bool mirror = false;
 > 782		struct regmap_config *one_regmap_config = NULL;
   783	
   784		mutex_init(&mcp->lock);
   785	
   786		mcp->dev = dev;
   787		mcp->addr = addr;
   788		mcp->irq_active_high = false;
   789	
   790		mcp->chip.direction_input = mcp23s08_direction_input;
   791		mcp->chip.get = mcp23s08_get;
   792		mcp->chip.direction_output = mcp23s08_direction_output;
   793		mcp->chip.set = mcp23s08_set;
   794		mcp->chip.dbg_show = mcp23s08_dbg_show;
   795	#ifdef CONFIG_OF_GPIO
   796		mcp->chip.of_gpio_n_cells = 2;
   797		mcp->chip.of_node = dev->of_node;
   798	#endif
   799	
   800		switch (type) {
   801	#ifdef CONFIG_SPI_MASTER
   802		case MCP_TYPE_S08:
   803		case MCP_TYPE_S17:
   804			switch (type) {
   805			case MCP_TYPE_S08:
   806				one_regmap_config =
   807					devm_kmemdup(dev, &mcp23x08_regmap,
   808						sizeof(struct regmap_config), GFP_KERNEL);
   809				mcp->reg_shift = 0;
   810				mcp->chip.ngpio = 8;
   811				mcp->chip.label = "mcp23s08";
   812				break;
   813			case MCP_TYPE_S17:
   814				one_regmap_config =
   815					devm_kmemdup(dev, &mcp23x17_regmap,
   816						sizeof(struct regmap_config), GFP_KERNEL);
   817				mcp->reg_shift = 1;
   818				mcp->chip.ngpio = 16;
   819				mcp->chip.label = "mcp23s17";
   820				break;
   821			}
   822			if (!one_regmap_config)
   823				return -ENOMEM;
   824	
   825			one_regmap_config->name = devm_kasprintf(dev, GFP_KERNEL, "%d", (addr & ~0x40) >> 1);
   826			mcp->regmap = devm_regmap_init(dev, &mcp23sxx_spi_regmap, mcp,
   827						       one_regmap_config);
   828			break;
   829	
   830		case MCP_TYPE_S18:
   831			if (!one_regmap_config)
   832				return -ENOMEM;
   833			mcp->regmap = devm_regmap_init(dev, &mcp23sxx_spi_regmap, mcp,
   834						       &mcp23x17_regmap);
   835			mcp->reg_shift = 1;
   836			mcp->chip.ngpio = 16;
   837			mcp->chip.label = "mcp23s18";
   838			break;
   839	#endif /* CONFIG_SPI_MASTER */
   840	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-24 20:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-24 20:33 [intel-lts:pr/69 1/1] drivers/pinctrl/pinctrl-mcp23s08.c:782:24: warning: unused variable 'one_regmap_config' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.