From: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [intel-lts:pr/69 1/1] drivers/pinctrl/pinctrl-mcp23s08.c:782:24: warning: unused variable 'one_regmap_config'
Date: Tue, 25 Feb 2025 04:33:41 +0800 [thread overview]
Message-ID: <202502250444.kC5LoHEu-lkp@intel.com> (raw)
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
reply other threads:[~2025-02-24 20:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202502250444.kC5LoHEu-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.