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: [conor:gpio-irq-6.11 16/18] drivers/gpio/gpio-mpfs.c:159 mpfs_gpio_irq_set_type() error: uninitialized symbol 'interrupt_type'.
Date: Thu, 26 Sep 2024 01:50:10 +0800	[thread overview]
Message-ID: <202409260127.hHMbY486-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Conor Dooley <conor+lkp@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git gpio-irq-6.11
head:   31951b1171ad7d194111ba003cee94c32228879c
commit: 982fc967d3c732e3c9e1134669bfc4bf0040a927 [16/18] gpio: mpfs: add polarfire soc gpio support
:::::: branch date: 33 hours ago
:::::: commit date: 33 hours ago
config: openrisc-randconfig-r073-20240925 (https://download.01.org/0day-ci/archive/20240926/202409260127.hHMbY486-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 14.1.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/202409260127.hHMbY486-lkp@intel.com/

smatch warnings:
drivers/gpio/gpio-mpfs.c:159 mpfs_gpio_irq_set_type() error: uninitialized symbol 'interrupt_type'.

vim +/interrupt_type +159 drivers/gpio/gpio-mpfs.c

982fc967d3c732e Lewis Hanly 2022-08-15  127  
982fc967d3c732e Lewis Hanly 2022-08-15  128  static int mpfs_gpio_irq_set_type(struct irq_data *data, unsigned int type)
982fc967d3c732e Lewis Hanly 2022-08-15  129  {
982fc967d3c732e Lewis Hanly 2022-08-15  130  	struct gpio_chip *gc = irq_data_get_irq_chip_data(data);
982fc967d3c732e Lewis Hanly 2022-08-15  131  	struct mpfs_gpio_chip *mpfs_gpio = gpiochip_get_data(gc);
982fc967d3c732e Lewis Hanly 2022-08-15  132  	int gpio_index = irqd_to_hwirq(data);
982fc967d3c732e Lewis Hanly 2022-08-15  133  	u32 interrupt_type;
982fc967d3c732e Lewis Hanly 2022-08-15  134  	u32 gpio_cfg;
982fc967d3c732e Lewis Hanly 2022-08-15  135  	unsigned long flags;
982fc967d3c732e Lewis Hanly 2022-08-15  136  
982fc967d3c732e Lewis Hanly 2022-08-15  137  	switch (type) {
982fc967d3c732e Lewis Hanly 2022-08-15  138  	case IRQ_TYPE_EDGE_BOTH:
982fc967d3c732e Lewis Hanly 2022-08-15  139  		interrupt_type = MPFS_GPIO_TYPE_INT_EDGE_BOTH;
982fc967d3c732e Lewis Hanly 2022-08-15  140  		break;
982fc967d3c732e Lewis Hanly 2022-08-15  141  	case IRQ_TYPE_EDGE_FALLING:
982fc967d3c732e Lewis Hanly 2022-08-15  142  		interrupt_type = MPFS_GPIO_TYPE_INT_EDGE_NEG;
982fc967d3c732e Lewis Hanly 2022-08-15  143  		break;
982fc967d3c732e Lewis Hanly 2022-08-15  144  	case IRQ_TYPE_EDGE_RISING:
982fc967d3c732e Lewis Hanly 2022-08-15  145  		interrupt_type = MPFS_GPIO_TYPE_INT_EDGE_POS;
982fc967d3c732e Lewis Hanly 2022-08-15  146  		break;
982fc967d3c732e Lewis Hanly 2022-08-15  147  	case IRQ_TYPE_LEVEL_HIGH:
982fc967d3c732e Lewis Hanly 2022-08-15  148  		interrupt_type = MPFS_GPIO_TYPE_INT_LEVEL_HIGH;
982fc967d3c732e Lewis Hanly 2022-08-15  149  		break;
982fc967d3c732e Lewis Hanly 2022-08-15  150  	case IRQ_TYPE_LEVEL_LOW:
982fc967d3c732e Lewis Hanly 2022-08-15  151  		interrupt_type = MPFS_GPIO_TYPE_INT_LEVEL_LOW;
982fc967d3c732e Lewis Hanly 2022-08-15  152  		break;
982fc967d3c732e Lewis Hanly 2022-08-15  153  	}
982fc967d3c732e Lewis Hanly 2022-08-15  154  
982fc967d3c732e Lewis Hanly 2022-08-15  155  	raw_spin_lock_irqsave(&mpfs_gpio->lock, flags);
982fc967d3c732e Lewis Hanly 2022-08-15  156  
982fc967d3c732e Lewis Hanly 2022-08-15  157  	gpio_cfg = readl(mpfs_gpio->base + MPFS_GPIO_CTRL(gpio_index));
982fc967d3c732e Lewis Hanly 2022-08-15  158  	gpio_cfg &= ~MPFS_GPIO_TYPE_INT_MASK;
982fc967d3c732e Lewis Hanly 2022-08-15 @159  	gpio_cfg |= interrupt_type;
982fc967d3c732e Lewis Hanly 2022-08-15  160  	writel(gpio_cfg, mpfs_gpio->base + MPFS_GPIO_CTRL(gpio_index));
982fc967d3c732e Lewis Hanly 2022-08-15  161  
982fc967d3c732e Lewis Hanly 2022-08-15  162  	raw_spin_unlock_irqrestore(&mpfs_gpio->lock, flags);
982fc967d3c732e Lewis Hanly 2022-08-15  163  
982fc967d3c732e Lewis Hanly 2022-08-15  164  	return 0;
982fc967d3c732e Lewis Hanly 2022-08-15  165  }
982fc967d3c732e Lewis Hanly 2022-08-15  166  

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

                 reply	other threads:[~2024-09-25 17:50 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=202409260127.hHMbY486-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.