From: Manivannan Sadhasivam <mani@kernel.org>
To: "Krzysztof Wilczyński" <kwilczynski@kernel.org>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>,
kishon@kernel.org, bhelgaas@google.com, jdmason@kudzu.us,
dave.jiang@intel.com, allenbh@gmail.com, ntb@lists.linux.dev,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
den@valinux.co.jp, Frank.li@nxp.com
Subject: Re: [PATCH 2/2] PCI: endpoint: pci-epf-ntb: Add check to detect 'db_count' value of 0
Date: Wed, 27 May 2026 10:24:06 +0200 [thread overview]
Message-ID: <wqog727cep7dhodxvpp3jfnfy3ce6kag64dahjd2vawxbkjrju@35immqrbyekm> (raw)
In-Reply-To: <20260512051926.GA1687877@rocinante>
On Tue, May 12, 2026 at 02:29:18PM +0900, Krzysztof Wilczyński wrote:
> Hello,
>
> > @@ -1297,12 +1300,12 @@ static int epf_ntb_configure_interrupt(struct epf_ntb *ntb,
> > vfunc_no = ntb_epc->vfunc_no;
> >
> > db_count = ntb->db_count;
> > - if (db_count > MAX_DB_COUNT) {
> > - dev_err(dev, "DB count cannot be more than %d\n", MAX_DB_COUNT);
> > + if (!db_count || db_count > MAX_DB_COUNT) {
> > + dev_err(dev, "DB count %d out of range (1 - %d)\n",
> > + db_count, MAX_DB_COUNT);
> > return -EINVAL;
> > }
>
> Something that I was wondering about here: would it make sense to also
> remove this variable from here, too? Even though it's referenced below
> here (which is why I think you left it here). Thoughts?
>
Makes sense. I removed 'db_count' variable while applying, thanks for spotting!
- Mani
--
மணிவண்ணன் சதாசிவம்
next prev parent reply other threads:[~2026-05-27 8:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 12:44 [PATCH 0/2] PCI: endpoint: pci-epf-{v}ntb: A couple of fixes Manivannan Sadhasivam
2026-04-07 12:44 ` [PATCH 1/2] PCI: endpoint: pci-epf-vntb: Add check to detect 'db_count' value of 0 Manivannan Sadhasivam
2026-04-09 3:42 ` Frank Li
2026-05-12 5:01 ` Koichiro Den
2026-04-07 12:44 ` [PATCH 2/2] PCI: endpoint: pci-epf-ntb: " Manivannan Sadhasivam
2026-05-12 5:29 ` Krzysztof Wilczyński
2026-05-27 8:24 ` Manivannan Sadhasivam [this message]
2026-05-12 5:34 ` [PATCH 0/2] PCI: endpoint: pci-epf-{v}ntb: A couple of fixes Krzysztof Wilczyński
2026-05-27 8:26 ` Manivannan Sadhasivam
2026-05-27 8:18 ` Manivannan Sadhasivam
2026-05-27 8:27 ` Krzysztof Wilczyński
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=wqog727cep7dhodxvpp3jfnfy3ce6kag64dahjd2vawxbkjrju@35immqrbyekm \
--to=mani@kernel.org \
--cc=Frank.li@nxp.com \
--cc=allenbh@gmail.com \
--cc=bhelgaas@google.com \
--cc=dave.jiang@intel.com \
--cc=den@valinux.co.jp \
--cc=jdmason@kudzu.us \
--cc=kishon@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=manivannan.sadhasivam@oss.qualcomm.com \
--cc=ntb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).