All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [brgl:gpio/for-next 2/8] drivers/gpio/gpiolib.c:3627 gpiochip_set_multiple() error: uninitialized symbol 'ret'.
Date: Wed, 5 Mar 2025 05:36:10 +0800	[thread overview]
Message-ID: <202503050503.lpui92nX-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-gpio@vger.kernel.org
TO: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
CC: Linus Walleij <linus.walleij@linaro.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
head:   a45faa2aba2cb2b12ad4c732c9f5692db1f7f12f
commit: 8014097f1466f7e034844770c537b8dc7d98811f [2/8] gpiolib: remove unneeded WARN_ON() from gpiochip_set_multiple()
:::::: branch date: 8 hours ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-161-20250304 (https://download.01.org/0day-ci/archive/20250305/202503050503.lpui92nX-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202503050503.lpui92nX-lkp@intel.com/

smatch warnings:
drivers/gpio/gpiolib.c:3627 gpiochip_set_multiple() error: uninitialized symbol 'ret'.

vim +/ret +3627 drivers/gpio/gpiolib.c

372e722ea4dd4c Alexandre Courbot   2013-02-03  3586  
5f42424354f5b0 Rojhalat Ibrahim    2014-11-04  3587  /*
5f42424354f5b0 Rojhalat Ibrahim    2014-11-04  3588   * set multiple outputs on the same chip;
5f42424354f5b0 Rojhalat Ibrahim    2014-11-04  3589   * use the chip's set_multiple function if available;
5f42424354f5b0 Rojhalat Ibrahim    2014-11-04  3590   * otherwise set the outputs sequentially;
a0b66a73785ccc Linus Walleij       2020-03-29  3591   * @chip: the GPIO chip we operate on
5f42424354f5b0 Rojhalat Ibrahim    2014-11-04  3592   * @mask: bit mask array; one bit per output; BITS_PER_LONG bits per word
5f42424354f5b0 Rojhalat Ibrahim    2014-11-04  3593   *        defines which outputs are to be changed
5f42424354f5b0 Rojhalat Ibrahim    2014-11-04  3594   * @bits: bit value array; one bit per output; BITS_PER_LONG bits per word
5f42424354f5b0 Rojhalat Ibrahim    2014-11-04  3595   *        defines the values the outputs specified by mask are to be set to
9b407312755fd5 Bartosz Golaszewski 2025-02-20  3596   *
9b407312755fd5 Bartosz Golaszewski 2025-02-20  3597   * Returns: 0 on success, negative error number on failure.
5f42424354f5b0 Rojhalat Ibrahim    2014-11-04  3598   */
9b407312755fd5 Bartosz Golaszewski 2025-02-20  3599  static int gpiochip_set_multiple(struct gpio_chip *gc,
5f42424354f5b0 Rojhalat Ibrahim    2014-11-04  3600  				 unsigned long *mask, unsigned long *bits)
5f42424354f5b0 Rojhalat Ibrahim    2014-11-04  3601  {
9b407312755fd5 Bartosz Golaszewski 2025-02-20  3602  	unsigned int i;
9b407312755fd5 Bartosz Golaszewski 2025-02-20  3603  	int ret;
9b407312755fd5 Bartosz Golaszewski 2025-02-20  3604  
81570d6a7ad370 Bartosz Golaszewski 2025-02-15  3605  	lockdep_assert_held(&gc->gpiodev->srcu);
81570d6a7ad370 Bartosz Golaszewski 2025-02-15  3606  
98ce1eb1fd87ea Bartosz Golaszewski 2025-02-20  3607  	if (gc->set_multiple_rv) {
98ce1eb1fd87ea Bartosz Golaszewski 2025-02-20  3608  		ret = gc->set_multiple_rv(gc, mask, bits);
98ce1eb1fd87ea Bartosz Golaszewski 2025-02-20  3609  		if (ret > 0)
98ce1eb1fd87ea Bartosz Golaszewski 2025-02-20  3610  			ret = -EBADE;
98ce1eb1fd87ea Bartosz Golaszewski 2025-02-20  3611  
98ce1eb1fd87ea Bartosz Golaszewski 2025-02-20  3612  		return ret;
98ce1eb1fd87ea Bartosz Golaszewski 2025-02-20  3613  	}
98ce1eb1fd87ea Bartosz Golaszewski 2025-02-20  3614  
a0b66a73785ccc Linus Walleij       2020-03-29  3615  	if (gc->set_multiple) {
a0b66a73785ccc Linus Walleij       2020-03-29  3616  		gc->set_multiple(gc, mask, bits);
9b407312755fd5 Bartosz Golaszewski 2025-02-20  3617  		return 0;
9b407312755fd5 Bartosz Golaszewski 2025-02-20  3618  	}
5e4e6fb3ff31b4 Andy Shevchenko     2017-01-03  3619  
5f42424354f5b0 Rojhalat Ibrahim    2014-11-04  3620  	/* set outputs if the corresponding mask bit is set */
9b407312755fd5 Bartosz Golaszewski 2025-02-20  3621  	for_each_set_bit(i, mask, gc->ngpio) {
9b407312755fd5 Bartosz Golaszewski 2025-02-20  3622  		ret = gpiochip_set(gc, i, test_bit(i, bits));
9b407312755fd5 Bartosz Golaszewski 2025-02-20  3623  		if (ret)
9b407312755fd5 Bartosz Golaszewski 2025-02-20  3624  			break;
5f42424354f5b0 Rojhalat Ibrahim    2014-11-04  3625  	}
9b407312755fd5 Bartosz Golaszewski 2025-02-20  3626  
9b407312755fd5 Bartosz Golaszewski 2025-02-20 @3627  	return ret;
5f42424354f5b0 Rojhalat Ibrahim    2014-11-04  3628  }
5f42424354f5b0 Rojhalat Ibrahim    2014-11-04  3629  

:::::: The code at line 3627 was first introduced by commit
:::::: 9b407312755fd5db012413ca005f0f3a661db8dd gpiolib: rework the wrapper around gpio_chip::set_multiple()

:::::: TO: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
:::::: CC: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

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

                 reply	other threads:[~2025-03-04 21:37 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=202503050503.lpui92nX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@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.