Skip to content

Commit 1e4071f

Browse files
committed
ipmi: Export ipmb_checksum()
It will be needed by the upcoming ipmb direct addressing. Signed-off-by: Corey Minyard <[email protected]> Tested-by: Andrew Manley <[email protected]> Reviewed-by: Andrew Manley <[email protected]>
1 parent d154abd commit 1e4071f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

drivers/char/ipmi/ipmi_msghandler.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,7 @@ int ipmi_unregister_for_cmd(struct ipmi_user *user,
17101710
}
17111711
EXPORT_SYMBOL(ipmi_unregister_for_cmd);
17121712

1713-
static unsigned char
1713+
unsigned char
17141714
ipmb_checksum(unsigned char *data, int size)
17151715
{
17161716
unsigned char csum = 0;
@@ -1720,6 +1720,7 @@ ipmb_checksum(unsigned char *data, int size)
17201720

17211721
return -csum;
17221722
}
1723+
EXPORT_SYMBOL(ipmb_checksum);
17231724

17241725
static inline void format_ipmb_msg(struct ipmi_smi_msg *smi_msg,
17251726
struct kernel_ipmi_msg *msg,

include/linux/ipmi.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,4 +335,7 @@ extern int ipmi_get_smi_info(int if_num, struct ipmi_smi_info *data);
335335

336336
#define GET_DEVICE_ID_MAX_RETRY 5
337337

338+
/* Helper function for computing the IPMB checksum of some data. */
339+
unsigned char ipmb_checksum(unsigned char *data, int size);
340+
338341
#endif /* __LINUX_IPMI_H */

0 commit comments

Comments
 (0)