Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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@trager.us>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Acked-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20250512190109.2475614-2-lee@trager.us
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Lee Trager and committed by
Paolo Abeni
e505e140 10465365

+6
+6
lib/pldmfw/pldmfw.c
··· 728 728 struct pldmfw_record *record = data->matching_record; 729 729 const struct pldmfw_ops *ops = data->context->ops; 730 730 731 + if (!ops->send_package_data) 732 + return 0; 733 + 731 734 return ops->send_package_data(data->context, record->package_data, 732 735 record->package_data_len); 733 736 } ··· 756 753 757 754 /* Skip components which are not intended for this device */ 758 755 if (!test_bit(index, bitmap)) 756 + continue; 757 + 758 + if (!data->context->ops->send_component_table) 759 759 continue; 760 760 761 761 /* determine whether this is the start, middle, end, or both