All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/iio/accel/adxl380.c:1763:8-33: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
@ 2024-09-30 13:26 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-09-30 13:26 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Julia Lawall

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/iio/accel/adxl380.c:1763:8-33: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
@ 2026-09-02 18:34 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-09-02 18:34 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Julia Lawall

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:   89a312991dc6e638a36adc43ccb91dbc25504c04
commit: df36de13677a0ebd3ab31dd2c603f9eafdf8de7d iio: accel: add ADXL380 driver
date:   2 years, 1 month ago
:::::: branch date: 22 hours ago
:::::: commit date: 2 years, 1 month ago
config: mips-randconfig-r051-20260823 (https://download.01.org/0day-ci/archive/20260903/202609030222.a7bv52e2-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 935bfc708590c60147a79c7df145bb6e68b1d388)

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
| Fixes: df36de13677a ("iio: accel: add ADXL380 driver")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202609030222.a7bv52e2-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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-02 18:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2024-09-30 13:26 kernel test robot

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.