lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20250510002851.3247880-2-lee@trager.us> Date: Fri, 9 May 2025 17:21:13 -0700 From: Lee Trager <lee@...ger.us> To: Alexander Duyck <alexanderduyck@...com>, Jakub Kicinski <kuba@...nel.org>, kernel-team@...a.com, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, Jonathan Corbet <corbet@....net>, Andrew Lunn <andrew+netdev@...n.ch>, Jacob Keller <jacob.e.keller@...el.com>, Mohsin Bashir <mohsin.bashr@...il.com>, Sanman Pradhan <sanman.p211993@...il.com>, Su Hui <suhui@...china.com>, Lee Trager <lee@...ger.us>, Al Viro <viro@...iv.linux.org.uk>, Michal Swiatkowski <michal.swiatkowski@...ux.intel.com> Cc: Andrew Lunn <andrew@...n.ch>, netdev@...r.kernel.org, linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org Subject: [PATCH net-next v4 1/5] pldmfw: Don't require send_package_data or send_component_table to be defined 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@...ger.us> Signed-off-by: Jakub Kicinski <kuba@...nel.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
Powered by blists - more mailing lists