mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
IB/hfi1: Remove unused hfi1_format_hwerrors
hfi1_format_hwerrors() was added in 2015 by
commit 7724105686 ("IB/hfi1: add driver files")
but never used.
Remove it.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://patch.msgid.link/20241216211914.745111-1-linux@treblig.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
1950af31dc
commit
2dab32d1c7
|
|
@ -2339,20 +2339,6 @@ static inline u64 hfi1_pkt_base_sdma_integrity(struct hfi1_devdata *dd)
|
|||
dev_err(&(dd)->pcidev->dev, "%s: port %u: " fmt, \
|
||||
rvt_get_ibdev_name(&(dd)->verbs_dev.rdi), (port), ##__VA_ARGS__)
|
||||
|
||||
/*
|
||||
* this is used for formatting hw error messages...
|
||||
*/
|
||||
struct hfi1_hwerror_msgs {
|
||||
u64 mask;
|
||||
const char *msg;
|
||||
size_t sz;
|
||||
};
|
||||
|
||||
/* in intr.c... */
|
||||
void hfi1_format_hwerrors(u64 hwerrs,
|
||||
const struct hfi1_hwerror_msgs *hwerrmsgs,
|
||||
size_t nhwerrmsgs, char *msg, size_t lmsg);
|
||||
|
||||
#define USER_OPCODE_CHECK_VAL 0xC0
|
||||
#define USER_OPCODE_CHECK_MASK 0xC0
|
||||
#define OPCODE_CHECK_VAL_DISABLED 0x0
|
||||
|
|
|
|||
|
|
@ -47,37 +47,6 @@ static void add_full_mgmt_pkey(struct hfi1_pportdata *ppd)
|
|||
hfi1_event_pkey_change(ppd->dd, ppd->port);
|
||||
}
|
||||
|
||||
/**
|
||||
* format_hwmsg - format a single hwerror message
|
||||
* @msg: message buffer
|
||||
* @msgl: length of message buffer
|
||||
* @hwmsg: message to add to message buffer
|
||||
*/
|
||||
static void format_hwmsg(char *msg, size_t msgl, const char *hwmsg)
|
||||
{
|
||||
strlcat(msg, "[", msgl);
|
||||
strlcat(msg, hwmsg, msgl);
|
||||
strlcat(msg, "]", msgl);
|
||||
}
|
||||
|
||||
/**
|
||||
* hfi1_format_hwerrors - format hardware error messages for display
|
||||
* @hwerrs: hardware errors bit vector
|
||||
* @hwerrmsgs: hardware error descriptions
|
||||
* @nhwerrmsgs: number of hwerrmsgs
|
||||
* @msg: message buffer
|
||||
* @msgl: message buffer length
|
||||
*/
|
||||
void hfi1_format_hwerrors(u64 hwerrs, const struct hfi1_hwerror_msgs *hwerrmsgs,
|
||||
size_t nhwerrmsgs, char *msg, size_t msgl)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nhwerrmsgs; i++)
|
||||
if (hwerrs & hwerrmsgs[i].mask)
|
||||
format_hwmsg(msg, msgl, hwerrmsgs[i].msg);
|
||||
}
|
||||
|
||||
static void signal_ib_event(struct hfi1_pportdata *ppd, enum ib_event_type ev)
|
||||
{
|
||||
struct ib_event event;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user