Skip to content

Commit

Permalink
ipmi: Export ipmb_checksum()
Browse files Browse the repository at this point in the history
It will be needed by the upcoming ipmb direct addressing.

Signed-off-by: Corey Minyard <minyard@acm.org>
Tested-by: Andrew Manley <andrew.manley@sealingtech.com>
Reviewed-by: Andrew Manley <andrew.manley@sealingtech.com>
  • Loading branch information
Corey Minyard authored and Corey Minyard committed Oct 5, 2021
1 parent d154abd commit 1e4071f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/char/ipmi/ipmi_msghandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1710,7 +1710,7 @@ int ipmi_unregister_for_cmd(struct ipmi_user *user,
}
EXPORT_SYMBOL(ipmi_unregister_for_cmd);

static unsigned char
unsigned char
ipmb_checksum(unsigned char *data, int size)
{
unsigned char csum = 0;
Expand All @@ -1720,6 +1720,7 @@ ipmb_checksum(unsigned char *data, int size)

return -csum;
}
EXPORT_SYMBOL(ipmb_checksum);

static inline void format_ipmb_msg(struct ipmi_smi_msg *smi_msg,
struct kernel_ipmi_msg *msg,
Expand Down
3 changes: 3 additions & 0 deletions include/linux/ipmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,4 +335,7 @@ extern int ipmi_get_smi_info(int if_num, struct ipmi_smi_info *data);

#define GET_DEVICE_ID_MAX_RETRY 5

/* Helper function for computing the IPMB checksum of some data. */
unsigned char ipmb_checksum(unsigned char *data, int size);

#endif /* __LINUX_IPMI_H */

0 comments on commit 1e4071f

Please sign in to comment.