From: James Lamanna <jlamanna@gmail.com>
To: sam@mendozajonas.com
Cc: linux-kernel@vger.kernel.org, James Lamanna <jlamanna@gmail.com>
Subject: [PATCH] ncsi: Support sparse package ids in ncsi_write_package_info
Date: Tue, 20 Aug 2024 07:05:41 +0000 [thread overview]
Message-ID: <20240820070541.156601-1-jlamanna@gmail.com> (raw)
For platforms with sparse package ids, where package_num < max(package_id)-1,
a check against package_num would prevent the return of package info.
This removes that check as it breaks these platforms and is an incorrect
comparison (package_id vs number of packages).
Invalid package_ids are checked in the following loop, and
-ENODEV is still returned if there are no matches.
Signed-off-by: James Lamanna <jlamanna@gmail.com>
---
net/ncsi/ncsi-netlink.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/net/ncsi/ncsi-netlink.c b/net/ncsi/ncsi-netlink.c
index 2f872d064396..62fabcc000c9 100644
--- a/net/ncsi/ncsi-netlink.c
+++ b/net/ncsi/ncsi-netlink.c
@@ -100,11 +100,6 @@ static int ncsi_write_package_info(struct sk_buff *skb,
bool found;
int rc;
- if (id > ndp->package_num - 1) {
- netdev_info(ndp->ndev.dev, "NCSI: No package with id %u\n", id);
- return -ENODEV;
- }
-
found = false;
NCSI_FOR_EACH_PACKAGE(ndp, np) {
if (np->id != id)
--
2.34.1
reply other threads:[~2024-08-20 7:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240820070541.156601-1-jlamanna@gmail.com \
--to=jlamanna@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@mendozajonas.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
all inboxes | Powered by JetHome®