Commit e505e140 authored by Lee Trager's avatar Lee Trager Committed by Paolo Abeni
Browse files

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: default avatarLee Trager <lee@trager.us>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Acked-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20250512190109.2475614-2-lee@trager.us


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 10465365
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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
		 */