From: Dan Carpenter <error27@gmail.com>
To: Bui Duc Phuc <phucduc.bui@gmail.com>
Cc: oe-kbuild@lists.linux.dev, lkp@intel.com,
oe-kbuild-all@lists.linux.dev, Jakub Kicinski <kuba@kernel.org>,
Simon Horman <horms@kernel.org>,
Suraj Gupta <suraj.gupta2@amd.com>
Subject: Re: [linux-next:master 4776/8910] drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2974 axienet_probe() warn: platform_get_irq() does not return zero
Date: Wed, 23 Sep 2026 11:07:11 +0300 [thread overview]
Message-ID: <arOIr1dTk46HVFFn@stanley.mountain> (raw)
In-Reply-To: <CAABR9nGwX8v2sdRCe1+NBVTS2O+7s3GiJpTVJ-0mK23p1YLUCA@mail.gmail.com>
On Wed, Sep 23, 2026 at 02:35:58PM +0700, Bui Duc Phuc wrote:
> It seems the analysis tool may have been mistaken in this case.
>
>
> > bb2b71024976a39 bui duc phuc 2026-09-09 @2974 if (!lp->rx_irq || !lp->tx_irq) {
> >
> > These should be checks for negative instead of zero.
> >
>
> The check is intended for the case where rx_irq and tx_irq are obtained from
> irq_of_parse_and_map(), which returns 0 on failure.
>
> > 95219aa538e11d5 Srikanth Thokala 2015-05-05 2975 dev_err(&pdev->dev, "could not determine irqs\n");
> > bb2b71024976a39 bui duc phuc 2026-09-09 2976 return -EINVAL;
> > 8a3b7a252dca9fb Daniel Borkmann 2012-01-19 2977 }
> > bb2b71024976a39 bui duc phuc 2026-09-09 2978 if (lp->rx_irq < 0)
> >
>
> This check handles the error return from platform_get_irq()
Ah. Right. That works. Sorry.
I kind of hate that we still have irq functions that return zero on
error instead of a normal error code. It's a historical artifact.
regards,
dan carpenter
prev parent reply other threads:[~2026-09-23 8:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 5:22 [linux-next:master 4776/8910] drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2974 axienet_probe() warn: platform_get_irq() does not return zero kernel test robot
2026-09-23 6:40 ` Dan Carpenter
2026-09-23 7:35 ` Bui Duc Phuc
2026-09-23 8:07 ` 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=arOIr1dTk46HVFFn@stanley.mountain \
--to=error27@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=phucduc.bui@gmail.com \
--cc=suraj.gupta2@amd.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 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.