From: Simon Horman <horms@kernel•org>
To: Harshit Mogalapalli <harshit.m.mogalapalli@oracle•com>
Cc: Sunil Goutham <sgoutham@marvell•com>,
Linu Cherian <lcherian@marvell•com>,
Geetha sowjanya <gakula@marvell•com>,
Jerin Jacob <jerinj@marvell•com>, hariprasad <hkelam@marvell•com>,
Subbaraya Sundeep <sbhatta@marvell•com>,
Andrew Lunn <andrew+netdev@lunn•ch>,
"David S. Miller" <davem@davemloft•net>,
Eric Dumazet <edumazet@google•com>,
Jakub Kicinski <kuba@kernel•org>, Paolo Abeni <pabeni@redhat•com>,
Nithya Mani <nmani@marvell•com>,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org,
dan.carpenter@linaro•org, kernel-janitors@vger•kernel.org,
error27@gmail•com
Subject: Re: [PATCH v2] Octeontx2-af: Fix pci_alloc_irq_vectors() return value check
Date: Wed, 15 Oct 2025 17:15:59 +0100 [thread overview]
Message-ID: <aO_Iv3FshxBPkmjs@horms.kernel.org> (raw)
In-Reply-To: <20251015090117.1557870-1-harshit.m.mogalapalli@oracle.com>
On Wed, Oct 15, 2025 at 02:01:17AM -0700, Harshit Mogalapalli wrote:
> In cgx_probe() when pci_alloc_irq_vectors() fails the error value will
> be negative and that check is sufficient.
>
> err = pci_alloc_irq_vectors(pdev, nvec, nvec, PCI_IRQ_MSIX);
> if (err < 0 || err != nvec) {
> ...
> }
>
> When pci_alloc_irq_vectors() fail to allocate nvec number of vectors,
> -ENOSPC is returned, so it would be safe to remove the check that
> compares err with nvec.
>
> Fixes: 1463f382f58d ("octeontx2-af: Add support for CGX link management")
> Suggested-by: Paolo Abeni <pabeni@redhat•com>
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle•com>
> ---
> Only compile tested.
>
> v1->v2: Improve the commit message
Thanks for the update.
Reviewed-by: Simon Horman <horms@kernel•org>
next prev parent reply other threads:[~2025-10-15 16:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-15 9:01 [PATCH v2] Octeontx2-af: Fix pci_alloc_irq_vectors() return value check Harshit Mogalapalli
2025-10-15 16:15 ` Simon Horman [this message]
2025-10-16 22:50 ` patchwork-bot+netdevbpf
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=aO_Iv3FshxBPkmjs@horms.kernel.org \
--to=horms@kernel$(echo .)org \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=dan.carpenter@linaro$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=error27@gmail$(echo .)com \
--cc=gakula@marvell$(echo .)com \
--cc=harshit.m.mogalapalli@oracle$(echo .)com \
--cc=hkelam@marvell$(echo .)com \
--cc=jerinj@marvell$(echo .)com \
--cc=kernel-janitors@vger$(echo .)kernel.org \
--cc=kuba@kernel$(echo .)org \
--cc=lcherian@marvell$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=nmani@marvell$(echo .)com \
--cc=pabeni@redhat$(echo .)com \
--cc=sbhatta@marvell$(echo .)com \
--cc=sgoutham@marvell$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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