From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-gpio@vger.kernel.org, Linus Walleij <linusw@kernel.org>,
Patrick Rudolph <patrick.rudolph@9elements.com>
Subject: [linusw-pinctrl:devel 16/22] drivers/pinctrl/pinctrl-cy8c95x0.c:1325 cy8c95x0_irq_setup() warn: passing positive error code '1' to 'dev_err_probe'
Date: Fri, 27 Feb 2026 14:40:45 +0300 [thread overview]
Message-ID: <202602271847.vVWkqLBD-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
head: a901e8705f89f3616fad3bb6aeddba33be86b08a
commit: 014884732095b982412d13d3220c3fe8483b9b3e [16/22] pinctrl: cy8c95x0: Unify messages with help of dev_err_probe()
config: x86_64-randconfig-161-20260227 (https://download.01.org/0day-ci/archive/20260227/202602271847.vVWkqLBD-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch version: v0.5.0-8994-gd50c5a4c
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 <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202602271847.vVWkqLBD-lkp@intel.com/
smatch warnings:
drivers/pinctrl/pinctrl-cy8c95x0.c:1325 cy8c95x0_irq_setup() warn: passing positive error code '1' to 'dev_err_probe'
vim +1325 drivers/pinctrl/pinctrl-cy8c95x0.c
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1309 static int cy8c95x0_irq_setup(struct cy8c95x0_pinctrl *chip, int irq)
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1310 {
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1311 struct gpio_irq_chip *girq = &chip->gpio_chip.irq;
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1312 DECLARE_BITMAP(pending_irqs, MAX_LINE);
970dacb3b9f0fe Andy Shevchenko 2026-02-23 1313 struct device *dev = chip->dev;
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1314 int ret;
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1315
5ffb2da4a38fd8 Andy Shevchenko 2026-02-23 1316 ret = devm_mutex_init(chip->dev, &chip->irq_lock);
5ffb2da4a38fd8 Andy Shevchenko 2026-02-23 1317 if (ret)
5ffb2da4a38fd8 Andy Shevchenko 2026-02-23 1318 return ret;
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1319
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1320 bitmap_zero(pending_irqs, MAX_LINE);
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1321
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1322 /* Read IRQ status register to clear all pending interrupts */
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1323 ret = cy8c95x0_irq_pending(chip, pending_irqs);
014884732095b9 Andy Shevchenko 2026-02-23 1324 if (ret)
014884732095b9 Andy Shevchenko 2026-02-23 @1325 return dev_err_probe(dev, ret, "failed to clear irq status register\n");
cy8c95x0_irq_pending() returns true/false not error codes. This was a
bug in the original code as well, but it only was detected because of
the conversion to dev_err_probe().
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1326
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1327 /* Mask all interrupts */
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1328 bitmap_fill(chip->irq_mask, MAX_LINE);
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1329
f5d620254c9787 Andy Shevchenko 2022-09-02 1330 gpio_irq_chip_set_chip(girq, &cy8c95x0_irqchip);
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1331
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1332 /* This will let us handle the parent IRQ in the driver */
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1333 girq->parent_handler = NULL;
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1334 girq->num_parents = 0;
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1335 girq->parents = NULL;
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1336 girq->default_type = IRQ_TYPE_NONE;
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1337 girq->handler = handle_simple_irq;
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1338 girq->threaded = true;
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1339
970dacb3b9f0fe Andy Shevchenko 2026-02-23 1340 return devm_request_threaded_irq(dev, irq, NULL, cy8c95x0_irq_handler,
1ddee69108d305 Andy Shevchenko 2025-01-17 1341 IRQF_ONESHOT | IRQF_SHARED,
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1342 dev_name(chip->dev), chip);
e6cbbe42944de9 Patrick Rudolph 2022-08-16 1343 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-02-27 11:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 11:40 Dan Carpenter [this message]
2026-02-27 15:10 ` [linusw-pinctrl:devel 16/22] drivers/pinctrl/pinctrl-cy8c95x0.c:1325 cy8c95x0_irq_setup() warn: passing positive error code '1' to 'dev_err_probe' Andy Shevchenko
2026-02-27 16:49 ` Dan Carpenter
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=202602271847.vVWkqLBD-lkp@intel.com \
--to=dan.carpenter@linaro.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=patrick.rudolph@9elements.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox