From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: [linux-next:master 2327/10559] drivers/i2c/i2c-smbus.c:202:8-33: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
Date: Sun, 10 Nov 2024 17:00:25 +0800 [thread overview]
Message-ID: <202411101614.GsphiMNE-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Wolfram Sang <wsa-dev@sang-engineering.com>
CC: Andi Shyti <andi.shyti@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 929beafbe7acce3267c06115e13e03ff6e50548a
commit: 270cc3c54e229758b7c079e3aa3ef171e6d8698b [2327/10559] i2c: support gpio-binding for SMBAlerts
:::::: branch date: 2 days ago
:::::: commit date: 5 weeks ago
config: arc-randconfig-r061-20241110 (https://download.01.org/0day-ci/archive/20241110/202411101614.GsphiMNE-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 13.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/202411101614.GsphiMNE-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/i2c/i2c-smbus.c:202:8-33: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
vim +202 drivers/i2c/i2c-smbus.c
b5527a7766f050 Jean Delvare 2010-03-02 164
b5527a7766f050 Jean Delvare 2010-03-02 165 /* Setup SMBALERT# infrastructure */
a00f6d3723f561 Stephen Kitt 2022-10-12 166 static int smbalert_probe(struct i2c_client *ara)
b5527a7766f050 Jean Delvare 2010-03-02 167 {
6d4028c644edc0 Jingoo Han 2013-07-30 168 struct i2c_smbus_alert_setup *setup = dev_get_platdata(&ara->dev);
b5527a7766f050 Jean Delvare 2010-03-02 169 struct i2c_smbus_alert *alert;
b5527a7766f050 Jean Delvare 2010-03-02 170 struct i2c_adapter *adapter = ara->adapter;
270cc3c54e2297 Wolfram Sang 2024-09-09 171 unsigned long irqflags = IRQF_SHARED | IRQF_ONESHOT;
270cc3c54e2297 Wolfram Sang 2024-09-09 172 struct gpio_desc *gpiod;
9b9f2b8bc2ac98 Phil Reid 2017-08-24 173 int res, irq;
b5527a7766f050 Jean Delvare 2010-03-02 174
71b578452ec6b2 Julia Lawall 2012-10-05 175 alert = devm_kzalloc(&ara->dev, sizeof(struct i2c_smbus_alert),
71b578452ec6b2 Julia Lawall 2012-10-05 176 GFP_KERNEL);
b5527a7766f050 Jean Delvare 2010-03-02 177 if (!alert)
b5527a7766f050 Jean Delvare 2010-03-02 178 return -ENOMEM;
b5527a7766f050 Jean Delvare 2010-03-02 179
69d17246ab255d Phil Reid 2017-08-24 180 if (setup) {
9b9f2b8bc2ac98 Phil Reid 2017-08-24 181 irq = setup->irq;
69d17246ab255d Phil Reid 2017-08-24 182 } else {
a263a84088f689 Akhil R 2022-01-28 183 irq = fwnode_irq_get_byname(dev_fwnode(adapter->dev.parent),
a263a84088f689 Akhil R 2022-01-28 184 "smbus_alert");
270cc3c54e2297 Wolfram Sang 2024-09-09 185 if (irq <= 0) {
270cc3c54e2297 Wolfram Sang 2024-09-09 186 gpiod = devm_gpiod_get(adapter->dev.parent, "smbalert", GPIOD_IN);
270cc3c54e2297 Wolfram Sang 2024-09-09 187 if (IS_ERR(gpiod))
270cc3c54e2297 Wolfram Sang 2024-09-09 188 return PTR_ERR(gpiod);
270cc3c54e2297 Wolfram Sang 2024-09-09 189
270cc3c54e2297 Wolfram Sang 2024-09-09 190 irq = gpiod_to_irq(gpiod);
69d17246ab255d Phil Reid 2017-08-24 191 if (irq <= 0)
69d17246ab255d Phil Reid 2017-08-24 192 return irq;
270cc3c54e2297 Wolfram Sang 2024-09-09 193
270cc3c54e2297 Wolfram Sang 2024-09-09 194 irqflags |= IRQF_TRIGGER_FALLING;
270cc3c54e2297 Wolfram Sang 2024-09-09 195 }
69d17246ab255d Phil Reid 2017-08-24 196 }
69d17246ab255d Phil Reid 2017-08-24 197
9b9f2b8bc2ac98 Phil Reid 2017-08-24 198 INIT_WORK(&alert->alert, smbalert_work);
b5527a7766f050 Jean Delvare 2010-03-02 199 alert->ara = ara;
b5527a7766f050 Jean Delvare 2010-03-02 200
9b9f2b8bc2ac98 Phil Reid 2017-08-24 201 if (irq > 0) {
270cc3c54e2297 Wolfram Sang 2024-09-09 @202 res = devm_request_threaded_irq(&ara->dev, irq, NULL, smbus_alert,
270cc3c54e2297 Wolfram Sang 2024-09-09 203 irqflags, "smbus_alert", alert);
71b578452ec6b2 Julia Lawall 2012-10-05 204 if (res)
b5527a7766f050 Jean Delvare 2010-03-02 205 return res;
b5527a7766f050 Jean Delvare 2010-03-02 206 }
b5527a7766f050 Jean Delvare 2010-03-02 207
b5527a7766f050 Jean Delvare 2010-03-02 208 i2c_set_clientdata(ara, alert);
9b9f2b8bc2ac98 Phil Reid 2017-08-24 209 dev_info(&adapter->dev, "supports SMBALERT#\n");
b5527a7766f050 Jean Delvare 2010-03-02 210
b5527a7766f050 Jean Delvare 2010-03-02 211 return 0;
b5527a7766f050 Jean Delvare 2010-03-02 212 }
b5527a7766f050 Jean Delvare 2010-03-02 213
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-11-10 9:00 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=202411101614.GsphiMNE-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.