From: "Krzysztof Wilczyński" <kwilczynski@kernel.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Cc: mani@kernel.org, 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: Tue, 12 May 2026 14:29:18 +0900 [thread overview]
Message-ID: <20260512051926.GA1687877@rocinante> (raw)
In-Reply-To: <20260407124421.282766-3-mani@kernel.org>
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?
Thank you!
Krzysztof
next prev parent reply other threads:[~2026-05-12 5:29 UTC|newest]
Thread overview: 7+ 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 [this message]
2026-05-12 5:34 ` [PATCH 0/2] PCI: endpoint: pci-epf-{v}ntb: A couple of fixes 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=20260512051926.GA1687877@rocinante \
--to=kwilczynski@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=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mani@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