All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/input/misc/rt5120-pwrkey.c:82:9-34: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
@ 2024-01-28  0:25 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-01-28  0:25 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: ChiYuan Huang <cy_huang@richtek.com>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8a696a29c6905594e4abf78eaafcb62165ac61f1
commit: ed3d5bd20dcdfdbe110feeabf120cba7bd329ad8 Input: rt5120 - add power key support
date:   1 year, 5 months ago
:::::: branch date: 7 hours ago
:::::: commit date: 1 year, 5 months ago
config: arm-randconfig-r062-20240117 (https://download.01.org/0day-ci/archive/20240128/202401280843.6TiMAlBG-lkp@intel.com/config)
compiler: clang version 18.0.0git (https://github.com/llvm/llvm-project 9bde5becb44ea071f5e1fa1f5d4071dc8788b18c)

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/202401280843.6TiMAlBG-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/input/misc/rt5120-pwrkey.c:82:9-34: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
   drivers/input/misc/rt5120-pwrkey.c:91:9-34: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)

vim +82 drivers/input/misc/rt5120-pwrkey.c

ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   40  
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   41  static int rt5120_pwrkey_probe(struct platform_device *pdev)
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   42  {
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   43  	struct rt5120_priv *priv;
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   44  	struct device *dev = &pdev->dev;
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   45  	int press_irq, release_irq;
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   46  	int error;
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   47  
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   48  	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   49  	if (!priv)
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   50  		return -ENOMEM;
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   51  
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   52  	priv->regmap = dev_get_regmap(dev->parent, NULL);
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   53  	if (!priv->regmap) {
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   54  		dev_err(dev, "Failed to init regmap\n");
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   55  		return -ENODEV;
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   56  	}
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   57  
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   58  	press_irq = platform_get_irq_byname(pdev, "pwrkey-press");
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   59  	if (press_irq < 0)
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   60  		return press_irq;
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   61  
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   62  	release_irq = platform_get_irq_byname(pdev, "pwrkey-release");
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   63  	if (release_irq < 0)
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   64  		return release_irq;
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   65  
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   66  	/* Make input device be device resource managed */
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   67  	priv->input = devm_input_allocate_device(dev);
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   68  	if (!priv->input)
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   69  		return -ENOMEM;
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   70  
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   71  	priv->input->name = "rt5120_pwrkey";
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   72  	priv->input->phys = "rt5120_pwrkey/input0";
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   73  	priv->input->id.bustype = BUS_I2C;
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   74  	input_set_capability(priv->input, EV_KEY, KEY_POWER);
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   75  
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   76  	error = input_register_device(priv->input);
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   77  	if (error) {
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   78  		dev_err(dev, "Failed to register input device: %d\n", error);
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   79  		return error;
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   80  	}
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   81  
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12  @82  	error = devm_request_threaded_irq(dev, press_irq,
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   83  					  NULL, rt5120_pwrkey_handler,
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   84  					  0, "pwrkey-press", priv);
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   85  	if (error) {
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   86  		dev_err(dev,
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   87  			"Failed to register pwrkey press irq: %d\n", error);
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   88  		return error;
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   89  	}
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   90  
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   91  	error = devm_request_threaded_irq(dev, release_irq,
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   92  					  NULL, rt5120_pwrkey_handler,
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   93  					  0, "pwrkey-release", priv);
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   94  	if (error) {
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   95  		dev_err(dev,
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   96  			"Failed to register pwrkey release irq: %d\n", error);
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   97  		return error;
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   98  	}
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12   99  
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12  100  	return 0;
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12  101  }
ed3d5bd20dcdfd ChiYuan Huang 2022-08-12  102  

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-28  0:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-28  0:25 drivers/input/misc/rt5120-pwrkey.c:82:9-34: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ) 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.