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, Julia Lawall <julia.lawall@inria.fr>
Subject: drivers/iio/accel/adxl380.c:1763:8-33: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
Date: Mon, 30 Sep 2024 21:26:20 +0800	[thread overview]
Message-ID: <202409302101.XJ9ZTVPr-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Antoniu Miclaus <antoniu.miclaus@analog.com>
CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>
CC: Ramona Gradinariu <ramona.gradinariu@analog.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   9852d85ec9d492ebef56dc5f229416c925758edc
commit: df36de13677a0ebd3ab31dd2c603f9eafdf8de7d iio: accel: add ADXL380 driver
date:   8 weeks ago
:::::: branch date: 15 hours ago
:::::: commit date: 8 weeks ago
config: x86_64-randconfig-102-20240930 (https://download.01.org/0day-ci/archive/20240930/202409302101.XJ9ZTVPr-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: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202409302101.XJ9ZTVPr-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/iio/accel/adxl380.c:1763:8-33: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)

vim +1763 drivers/iio/accel/adxl380.c

df36de13677a0e Antoniu Miclaus 2024-07-08  1717  
df36de13677a0e Antoniu Miclaus 2024-07-08  1718  static int adxl380_config_irq(struct iio_dev *indio_dev)
df36de13677a0e Antoniu Miclaus 2024-07-08  1719  {
df36de13677a0e Antoniu Miclaus 2024-07-08  1720  	struct adxl380_state *st = iio_priv(indio_dev);
df36de13677a0e Antoniu Miclaus 2024-07-08  1721  	unsigned long irq_flag;
df36de13677a0e Antoniu Miclaus 2024-07-08  1722  	struct irq_data *desc;
df36de13677a0e Antoniu Miclaus 2024-07-08  1723  	u32 irq_type;
df36de13677a0e Antoniu Miclaus 2024-07-08  1724  	u8 polarity;
df36de13677a0e Antoniu Miclaus 2024-07-08  1725  	int ret;
df36de13677a0e Antoniu Miclaus 2024-07-08  1726  
df36de13677a0e Antoniu Miclaus 2024-07-08  1727  	st->irq = fwnode_irq_get_byname(dev_fwnode(st->dev), "INT0");
df36de13677a0e Antoniu Miclaus 2024-07-08  1728  	if (st->irq > 0) {
df36de13677a0e Antoniu Miclaus 2024-07-08  1729  		st->int_map[0] = ADXL380_INT0_MAP0_REG;
df36de13677a0e Antoniu Miclaus 2024-07-08  1730  		st->int_map[1] = ADXL380_INT0_MAP1_REG;
df36de13677a0e Antoniu Miclaus 2024-07-08  1731  	} else {
df36de13677a0e Antoniu Miclaus 2024-07-08  1732  		st->irq = fwnode_irq_get_byname(dev_fwnode(st->dev), "INT1");
df36de13677a0e Antoniu Miclaus 2024-07-08  1733  		if (st->irq > 0)
df36de13677a0e Antoniu Miclaus 2024-07-08  1734  			return dev_err_probe(st->dev, -ENODEV,
df36de13677a0e Antoniu Miclaus 2024-07-08  1735  					     "no interrupt name specified");
df36de13677a0e Antoniu Miclaus 2024-07-08  1736  		st->int_map[0] = ADXL380_INT1_MAP0_REG;
df36de13677a0e Antoniu Miclaus 2024-07-08  1737  		st->int_map[1] = ADXL380_INT1_MAP1_REG;
df36de13677a0e Antoniu Miclaus 2024-07-08  1738  	}
df36de13677a0e Antoniu Miclaus 2024-07-08  1739  
df36de13677a0e Antoniu Miclaus 2024-07-08  1740  	desc = irq_get_irq_data(st->irq);
df36de13677a0e Antoniu Miclaus 2024-07-08  1741  	if (!desc)
df36de13677a0e Antoniu Miclaus 2024-07-08  1742  		return dev_err_probe(st->dev, -EINVAL, "Could not find IRQ %d\n", st->irq);
df36de13677a0e Antoniu Miclaus 2024-07-08  1743  
df36de13677a0e Antoniu Miclaus 2024-07-08  1744  	irq_type = irqd_get_trigger_type(desc);
df36de13677a0e Antoniu Miclaus 2024-07-08  1745  	if (irq_type == IRQ_TYPE_LEVEL_HIGH) {
df36de13677a0e Antoniu Miclaus 2024-07-08  1746  		polarity = 0;
df36de13677a0e Antoniu Miclaus 2024-07-08  1747  		irq_flag = IRQF_TRIGGER_HIGH | IRQF_ONESHOT;
df36de13677a0e Antoniu Miclaus 2024-07-08  1748  	} else if (irq_type == IRQ_TYPE_LEVEL_LOW) {
df36de13677a0e Antoniu Miclaus 2024-07-08  1749  		polarity = 1;
df36de13677a0e Antoniu Miclaus 2024-07-08  1750  		irq_flag = IRQF_TRIGGER_LOW | IRQF_ONESHOT;
df36de13677a0e Antoniu Miclaus 2024-07-08  1751  	} else {
df36de13677a0e Antoniu Miclaus 2024-07-08  1752  		return dev_err_probe(st->dev, -EINVAL,
df36de13677a0e Antoniu Miclaus 2024-07-08  1753  				     "Invalid interrupt 0x%x. Only level interrupts supported\n",
df36de13677a0e Antoniu Miclaus 2024-07-08  1754  				     irq_type);
df36de13677a0e Antoniu Miclaus 2024-07-08  1755  	}
df36de13677a0e Antoniu Miclaus 2024-07-08  1756  
df36de13677a0e Antoniu Miclaus 2024-07-08  1757  	ret = regmap_update_bits(st->regmap, ADXL380_INT0_REG,
df36de13677a0e Antoniu Miclaus 2024-07-08  1758  				 ADXL380_INT0_POL_MSK,
df36de13677a0e Antoniu Miclaus 2024-07-08  1759  				 FIELD_PREP(ADXL380_INT0_POL_MSK, polarity));
df36de13677a0e Antoniu Miclaus 2024-07-08  1760  	if (ret)
df36de13677a0e Antoniu Miclaus 2024-07-08  1761  		return ret;
df36de13677a0e Antoniu Miclaus 2024-07-08  1762  
df36de13677a0e Antoniu Miclaus 2024-07-08 @1763  	return devm_request_threaded_irq(st->dev, st->irq, NULL,
df36de13677a0e Antoniu Miclaus 2024-07-08  1764  					 adxl380_irq_handler, irq_flag,
df36de13677a0e Antoniu Miclaus 2024-07-08  1765  					 indio_dev->name, indio_dev);
df36de13677a0e Antoniu Miclaus 2024-07-08  1766  }
df36de13677a0e Antoniu Miclaus 2024-07-08  1767  

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

             reply	other threads:[~2024-09-30 13:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 13:26 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-09-02 18:34 drivers/iio/accel/adxl380.c:1763:8-33: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ) 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=202409302101.XJ9ZTVPr-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=julia.lawall@inria.fr \
    --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.