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: Re: [PATCH 02/15] gpio: adnp: use lock guards for the I2C lock
Date: Thu, 6 Mar 2025 19:10:27 +0800	[thread overview]
Message-ID: <202503061847.oZj4Ts21-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20250303-gpiochip-set-conversion-v1-2-1d5cceeebf8b@linaro.org>
References: <20250303-gpiochip-set-conversion-v1-2-1d5cceeebf8b@linaro.org>
TO: Bartosz Golaszewski <brgl@bgdev.pl>
TO: Linus Walleij <linus.walleij@linaro.org>
TO: Bartosz Golaszewski <brgl@bgdev.pl>
TO: Michael Hennerich <michael.hennerich@analog.com>
TO: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
TO: Mun Yew Tham <mun.yew.tham@intel.com>
TO: Joel Stanley <joel@jms.id.au>
TO: Andrew Jeffery <andrew@codeconstruct.com.au>
CC: linux-gpio@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: linux-pwm@vger.kernel.org
CC: patches@opensource.cirrus.com
CC: linux-arm-kernel@lists.infradead.org
CC: linux-aspeed@lists.ozlabs.org

Hi Bartosz,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 9778568dede2166c7bd124d473f9ec365f782935]

url:    https://github.com/intel-lab-lkp/linux/commits/Bartosz-Golaszewski/gpio-74x164-use-new-line-value-setter-callbacks/20250303-212738
base:   9778568dede2166c7bd124d473f9ec365f782935
patch link:    https://lore.kernel.org/r/20250303-gpiochip-set-conversion-v1-2-1d5cceeebf8b%40linaro.org
patch subject: [PATCH 02/15] gpio: adnp: use lock guards for the I2C lock
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: x86_64-randconfig-161-20250306 (https://download.01.org/0day-ci/archive/20250306/202503061847.oZj4Ts21-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0

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/202503061847.oZj4Ts21-lkp@intel.com/

smatch warnings:
drivers/gpio/gpio-adnp.c:254 adnp_irq() error: uninitialized symbol 'level'.
drivers/gpio/gpio-adnp.c:265 adnp_irq() error: uninitialized symbol 'isr'.
drivers/gpio/gpio-adnp.c:265 adnp_irq() error: uninitialized symbol 'ier'.

vim +/level +254 drivers/gpio/gpio-adnp.c

5e969a401a0126 Thierry Reding      2012-09-18  225  
5e969a401a0126 Thierry Reding      2012-09-18  226  static irqreturn_t adnp_irq(int irq, void *data)
5e969a401a0126 Thierry Reding      2012-09-18  227  {
5e969a401a0126 Thierry Reding      2012-09-18  228  	struct adnp *adnp = data;
5e969a401a0126 Thierry Reding      2012-09-18  229  	unsigned int num_regs, i;
5e969a401a0126 Thierry Reding      2012-09-18  230  
5e969a401a0126 Thierry Reding      2012-09-18  231  	num_regs = 1 << adnp->reg_shift;
5e969a401a0126 Thierry Reding      2012-09-18  232  
5e969a401a0126 Thierry Reding      2012-09-18  233  	for (i = 0; i < num_regs; i++) {
5e969a401a0126 Thierry Reding      2012-09-18  234  		unsigned int base = i << adnp->reg_shift, bit;
5e969a401a0126 Thierry Reding      2012-09-18  235  		u8 changed, level, isr, ier;
5e969a401a0126 Thierry Reding      2012-09-18  236  		unsigned long pending;
5e969a401a0126 Thierry Reding      2012-09-18  237  		int err;
5e969a401a0126 Thierry Reding      2012-09-18  238  
4d84a0d4d000dd Bartosz Golaszewski 2025-03-03  239  		scoped_guard(mutex, &adnp->i2c_lock) {
5e969a401a0126 Thierry Reding      2012-09-18  240  			err = adnp_read(adnp, GPIO_PLR(adnp) + i, &level);
4d84a0d4d000dd Bartosz Golaszewski 2025-03-03  241  			if (err < 0)
5e969a401a0126 Thierry Reding      2012-09-18  242  				continue;
5e969a401a0126 Thierry Reding      2012-09-18  243  
5e969a401a0126 Thierry Reding      2012-09-18  244  			err = adnp_read(adnp, GPIO_ISR(adnp) + i, &isr);
4d84a0d4d000dd Bartosz Golaszewski 2025-03-03  245  			if (err < 0)
5e969a401a0126 Thierry Reding      2012-09-18  246  				continue;
5e969a401a0126 Thierry Reding      2012-09-18  247  
5e969a401a0126 Thierry Reding      2012-09-18  248  			err = adnp_read(adnp, GPIO_IER(adnp) + i, &ier);
4d84a0d4d000dd Bartosz Golaszewski 2025-03-03  249  			if (err < 0)
5e969a401a0126 Thierry Reding      2012-09-18  250  				continue;
5e969a401a0126 Thierry Reding      2012-09-18  251  		}
5e969a401a0126 Thierry Reding      2012-09-18  252  
5e969a401a0126 Thierry Reding      2012-09-18  253  		/* determine pins that changed levels */
5e969a401a0126 Thierry Reding      2012-09-18 @254  		changed = level ^ adnp->irq_level[i];
5e969a401a0126 Thierry Reding      2012-09-18  255  
5e969a401a0126 Thierry Reding      2012-09-18  256  		/* compute edge-triggered interrupts */
5e969a401a0126 Thierry Reding      2012-09-18  257  		pending = changed & ((adnp->irq_fall[i] & ~level) |
5e969a401a0126 Thierry Reding      2012-09-18  258  				     (adnp->irq_rise[i] & level));
5e969a401a0126 Thierry Reding      2012-09-18  259  
5e969a401a0126 Thierry Reding      2012-09-18  260  		/* add in level-triggered interrupts */
5e969a401a0126 Thierry Reding      2012-09-18  261  		pending |= (adnp->irq_high[i] & level) |
5e969a401a0126 Thierry Reding      2012-09-18  262  			   (adnp->irq_low[i] & ~level);
5e969a401a0126 Thierry Reding      2012-09-18  263  
5e969a401a0126 Thierry Reding      2012-09-18  264  		/* mask out non-pending and disabled interrupts */
5e969a401a0126 Thierry Reding      2012-09-18 @265  		pending &= isr & ier;
5e969a401a0126 Thierry Reding      2012-09-18  266  
5e969a401a0126 Thierry Reding      2012-09-18  267  		for_each_set_bit(bit, &pending, 8) {
472f95b93860ef Linus Walleij       2013-10-11  268  			unsigned int child_irq;
f0fbe7bce73356 Thierry Reding      2017-11-07  269  			child_irq = irq_find_mapping(adnp->gpio.irq.domain,
0752e169ba523e Linus Walleij       2014-06-02  270  						     base + bit);
472f95b93860ef Linus Walleij       2013-10-11  271  			handle_nested_irq(child_irq);
5e969a401a0126 Thierry Reding      2012-09-18  272  		}
5e969a401a0126 Thierry Reding      2012-09-18  273  	}
5e969a401a0126 Thierry Reding      2012-09-18  274  
5e969a401a0126 Thierry Reding      2012-09-18  275  	return IRQ_HANDLED;
5e969a401a0126 Thierry Reding      2012-09-18  276  }
5e969a401a0126 Thierry Reding      2012-09-18  277  

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

             reply	other threads:[~2025-03-06 11:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06 11:10 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-03 13:18 [PATCH 00/15] gpio: convert more drivers to using the new value setters Bartosz Golaszewski
2025-03-03 13:18 ` [PATCH 02/15] gpio: adnp: use lock guards for the I2C lock Bartosz Golaszewski
2025-03-04  9:07   ` kernel test robot

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=202503061847.oZj4Ts21-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.