public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kyle Hendry <kylehendrydev@gmail.com>, linus.walleij@linaro.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kyle Hendry <kylehendrydev@gmail.com>
Subject: Re: [PATCH] pinctrl: bcm63268: Add gpio function
Date: Mon, 9 Dec 2024 12:44:25 +0800	[thread overview]
Message-ID: <202412081215.VyJuftPL-lkp@intel.com> (raw)
In-Reply-To: <20241207223335.17535-1-kylehendrydev@gmail.com>

Hi Kyle,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linusw-pinctrl/devel]
[also build test WARNING on linusw-pinctrl/for-next linus/master v6.13-rc1 next-20241206]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Kyle-Hendry/pinctrl-bcm63268-Add-gpio-function/20241208-063718
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
patch link:    https://lore.kernel.org/r/20241207223335.17535-1-kylehendrydev%40gmail.com
patch subject: [PATCH] pinctrl: bcm63268: Add gpio function
config: x86_64-buildonly-randconfig-005-20241208 (https://download.01.org/0day-ci/archive/20241208/202412081215.VyJuftPL-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241208/202412081215.VyJuftPL-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/202412081215.VyJuftPL-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/pinctrl/bcm/pinctrl-bcm63268.c:630:7: warning: variable 'reg' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
     630 |         case BCM63268_NOREG:
         |              ^~~~~~~~~~~~~~
   drivers/pinctrl/bcm/pinctrl-bcm63268.c:638:31: note: uninitialized use occurs here
     638 |         regmap_update_bits(pc->regs, reg, mask, val);
         |                                      ^~~
   drivers/pinctrl/bcm/pinctrl-bcm63268.c:603:18: note: initialize the variable 'reg' to silence this warning
     603 |         unsigned int reg;
         |                         ^
         |                          = 0
>> drivers/pinctrl/bcm/pinctrl-bcm63268.c:630:7: warning: variable 'mask' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
     630 |         case BCM63268_NOREG:
         |              ^~~~~~~~~~~~~~
   drivers/pinctrl/bcm/pinctrl-bcm63268.c:638:36: note: uninitialized use occurs here
     638 |         regmap_update_bits(pc->regs, reg, mask, val);
         |                                           ^~~~
   drivers/pinctrl/bcm/pinctrl-bcm63268.c:604:24: note: initialize the variable 'mask' to silence this warning
     604 |         unsigned int val, mask;
         |                               ^
         |                                = 0
>> drivers/pinctrl/bcm/pinctrl-bcm63268.c:630:7: warning: variable 'val' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
     630 |         case BCM63268_NOREG:
         |              ^~~~~~~~~~~~~~
   drivers/pinctrl/bcm/pinctrl-bcm63268.c:638:42: note: uninitialized use occurs here
     638 |         regmap_update_bits(pc->regs, reg, mask, val);
         |                                                 ^~~
   drivers/pinctrl/bcm/pinctrl-bcm63268.c:604:18: note: initialize the variable 'val' to silence this warning
     604 |         unsigned int val, mask;
         |                         ^
         |                          = 0
   3 warnings generated.


vim +/reg +630 drivers/pinctrl/bcm/pinctrl-bcm63268.c

   595	
   596	static int bcm63268_pinctrl_set_mux(struct pinctrl_dev *pctldev,
   597					    unsigned selector, unsigned group)
   598	{
   599		struct bcm63xx_pinctrl *pc = pinctrl_dev_get_drvdata(pctldev);
   600		const struct pingroup *pg = &bcm63268_groups[group];
   601		const struct bcm63268_function *f = &bcm63268_funcs[selector];
   602		unsigned i;
   603		unsigned int reg;
   604		unsigned int val, mask;
   605	
   606		for (i = 0; i < pg->npins; i++)
   607			bcm63268_set_gpio(pc, pg->pins[i]);
   608	
   609		switch (f->reg) {
   610		case BCM63268_LEDCTRL:
   611			reg = BCM63268_LED_REG;
   612			mask = BIT(pg->pins[0]);
   613			val = BIT(pg->pins[0]);
   614			break;
   615		case BCM63268_MODE:
   616			reg = BCM63268_MODE_REG;
   617			mask = BIT(pg->pins[0]);
   618			val = BIT(pg->pins[0]);
   619			break;
   620		case BCM63268_CTRL:
   621			reg = BCM63268_CTRL_REG;
   622			mask = BIT(pg->pins[0]);
   623			val = 0;
   624			break;
   625		case BCM63268_BASEMODE:
   626			reg = BCM63268_BASEMODE_REG;
   627			mask = f->mask;
   628			val = f->mask;
   629			break;
 > 630		case BCM63268_NOREG:
   631			/*Do nothing, leave registers as default*/
   632			break;
   633		default:
   634			WARN_ON(1);
   635			return -EINVAL;
   636		}
   637	
   638		regmap_update_bits(pc->regs, reg, mask, val);
   639	
   640		return 0;
   641	}
   642	

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

  reply	other threads:[~2024-12-09  4:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-07 22:33 [PATCH] pinctrl: bcm63268: Add gpio function Kyle Hendry
2024-12-09  4:44 ` kernel test robot [this message]
2024-12-24 10:36 ` [PATCH v2] pinctrl: bcm63268: add " Álvaro Fernández Rojas
2024-12-27 16:17   ` Linus Walleij
2024-12-28  9:47     ` Álvaro Fernández Rojas
2024-12-30 16:42   ` Jonas Gorski
2025-01-03  3:04     ` Kyle Hendry
2025-01-04 15:44       ` Álvaro Fernández Rojas
2025-01-04 17:02         ` Álvaro Fernández Rojas
2025-01-04 19:32           ` Jonas Gorski
2025-01-05  9:31             ` Álvaro Fernández Rojas

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=202412081215.VyJuftPL-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kylehendrydev@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox