public inbox for linux-gpio@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: oe-kbuild@lists.linux.dev, 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: Re: [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 19:49:18 +0300	[thread overview]
Message-ID: <aaHLDnSHe--dR_63@stanley.mountain> (raw)
In-Reply-To: <aaGzzsLMeW2DTjiE@ashevche-desk.local>

On Fri, Feb 27, 2026 at 05:10:06PM +0200, Andy Shevchenko wrote:
> On Fri, Feb 27, 2026 at 02:40:45PM +0300, Dan Carpenter wrote:
> > 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()
> 
> False positive. This commit didn't change the previous behaviour. Perhaps
> smatch complained earlier?

Smatch only detected it when we changed to dev_err_probe().  We could
make a check to detect the bug in the original code I suppose.  Let
me add it as a todo.

KTODO: create static checker rule about positive returns from probe()

Description:  The cy8c95x0_irq_setup() is called from cy8c95x0_probe()
and probe() should only return zero or negative error codes.  Make a
list of positive returns.  Then check if this is a probe() function and
we're returning a positive.  Ask on the smatch@vger.kernel.org mailing
list if you want help writing this check.

regards,
dan carpenter


      reply	other threads:[~2026-02-27 16:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-27 11:40 [linusw-pinctrl:devel 16/22] drivers/pinctrl/pinctrl-cy8c95x0.c:1325 cy8c95x0_irq_setup() warn: passing positive error code '1' to 'dev_err_probe' Dan Carpenter
2026-02-27 15:10 ` Andy Shevchenko
2026-02-27 16:49   ` Dan Carpenter [this message]

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=aaHLDnSHe--dR_63@stanley.mountain \
    --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