From: Lee Trager <lee@trager.us>
To: Alexander Duyck <alexanderduyck@fb.com>,
Jakub Kicinski <kuba@kernel.org>,
kernel-team@meta.com, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Jacob Keller <jacob.e.keller@intel.com>,
Mohsin Bashir <mohsin.bashr@gmail.com>,
Sanman Pradhan <sanman.p211993@gmail.com>,
Su Hui <suhui@nfschina.com>, Lee Trager <lee@trager.us>,
Al Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>,
netdev@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next v5 1/5] pldmfw: Don't require send_package_data or send_component_table to be defined
Date: Mon, 12 May 2025 11:53:57 -0700 [thread overview]
Message-ID: <20250512190109.2475614-2-lee@trager.us> (raw)
In-Reply-To: <20250512190109.2475614-1-lee@trager.us>
Not all drivers require send_package_data or send_component_table when
updating firmware. Instead of forcing drivers to implement a stub allow
these functions to go undefined.
Signed-off-by: Lee Trager <lee@trager.us>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
---
lib/pldmfw/pldmfw.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/pldmfw/pldmfw.c b/lib/pldmfw/pldmfw.c
index 6264e2013f25..b45ceb725780 100644
--- a/lib/pldmfw/pldmfw.c
+++ b/lib/pldmfw/pldmfw.c
@@ -728,6 +728,9 @@ pldm_send_package_data(struct pldmfw_priv *data)
struct pldmfw_record *record = data->matching_record;
const struct pldmfw_ops *ops = data->context->ops;
+ if (!ops->send_package_data)
+ return 0;
+
return ops->send_package_data(data->context, record->package_data,
record->package_data_len);
}
@@ -755,6 +758,9 @@ pldm_send_component_tables(struct pldmfw_priv *data)
if (!test_bit(index, bitmap))
continue;
+ if (!data->context->ops->send_component_table)
+ continue;
+
/* determine whether this is the start, middle, end, or both
* the start and end of the component tables
*/
--
2.47.1
next prev parent reply other threads:[~2025-05-12 19:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 18:53 [PATCH net-next v5 0/5] eth: fbnic: Add devlink dev flash support Lee Trager
2025-05-12 18:53 ` Lee Trager [this message]
2025-05-12 19:08 ` [PATCH net-next v5 1/5] pldmfw: Don't require send_package_data or send_component_table to be defined Jacob Keller
2025-05-12 18:53 ` [PATCH net-next v5 2/5] eth: fbnic: Accept minimum anti-rollback version from firmware Lee Trager
2025-05-12 18:53 ` [PATCH net-next v5 3/5] eth: fbnic: Add support for multiple concurrent completion messages Lee Trager
2025-05-12 19:08 ` Jacob Keller
2025-05-12 18:54 ` [PATCH net-next v5 4/5] eth: fbnic: Add mailbox support for PLDM updates Lee Trager
2025-05-12 18:54 ` [PATCH net-next v5 5/5] eth: fbnic: Add devlink dev flash support Lee Trager
2025-05-12 19:13 ` Jacob Keller
2025-05-13 13:45 ` Simon Horman
2025-05-15 10:58 ` Paolo Abeni
2025-05-15 11:54 ` [PATCH net-next v5 0/5] " Paolo Abeni
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=20250512190109.2475614-2-lee@trager.us \
--to=lee@trager.us \
--cc=alexanderduyck@fb.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mohsin.bashr@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sanman.p211993@gmail.com \
--cc=suhui@nfschina.com \
--cc=viro@zeniv.linux.org.uk \
/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®