Skip to content

Commit 2dab32d

Browse files
Dr. David Alan Gilbertrleon
authored andcommitted
IB/hfi1: Remove unused hfi1_format_hwerrors
hfi1_format_hwerrors() was added in 2015 by commit 7724105 ("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>
1 parent 1950af3 commit 2dab32d

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

drivers/infiniband/hw/hfi1/hfi.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2339,20 +2339,6 @@ static inline u64 hfi1_pkt_base_sdma_integrity(struct hfi1_devdata *dd)
23392339
dev_err(&(dd)->pcidev->dev, "%s: port %u: " fmt, \
23402340
rvt_get_ibdev_name(&(dd)->verbs_dev.rdi), (port), ##__VA_ARGS__)
23412341

2342-
/*
2343-
* this is used for formatting hw error messages...
2344-
*/
2345-
struct hfi1_hwerror_msgs {
2346-
u64 mask;
2347-
const char *msg;
2348-
size_t sz;
2349-
};
2350-
2351-
/* in intr.c... */
2352-
void hfi1_format_hwerrors(u64 hwerrs,
2353-
const struct hfi1_hwerror_msgs *hwerrmsgs,
2354-
size_t nhwerrmsgs, char *msg, size_t lmsg);
2355-
23562342
#define USER_OPCODE_CHECK_VAL 0xC0
23572343
#define USER_OPCODE_CHECK_MASK 0xC0
23582344
#define OPCODE_CHECK_VAL_DISABLED 0x0

drivers/infiniband/hw/hfi1/intr.c

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -47,37 +47,6 @@ static void add_full_mgmt_pkey(struct hfi1_pportdata *ppd)
4747
hfi1_event_pkey_change(ppd->dd, ppd->port);
4848
}
4949

50-
/**
51-
* format_hwmsg - format a single hwerror message
52-
* @msg: message buffer
53-
* @msgl: length of message buffer
54-
* @hwmsg: message to add to message buffer
55-
*/
56-
static void format_hwmsg(char *msg, size_t msgl, const char *hwmsg)
57-
{
58-
strlcat(msg, "[", msgl);
59-
strlcat(msg, hwmsg, msgl);
60-
strlcat(msg, "]", msgl);
61-
}
62-
63-
/**
64-
* hfi1_format_hwerrors - format hardware error messages for display
65-
* @hwerrs: hardware errors bit vector
66-
* @hwerrmsgs: hardware error descriptions
67-
* @nhwerrmsgs: number of hwerrmsgs
68-
* @msg: message buffer
69-
* @msgl: message buffer length
70-
*/
71-
void hfi1_format_hwerrors(u64 hwerrs, const struct hfi1_hwerror_msgs *hwerrmsgs,
72-
size_t nhwerrmsgs, char *msg, size_t msgl)
73-
{
74-
int i;
75-
76-
for (i = 0; i < nhwerrmsgs; i++)
77-
if (hwerrs & hwerrmsgs[i].mask)
78-
format_hwmsg(msg, msgl, hwerrmsgs[i].msg);
79-
}
80-
8150
static void signal_ib_event(struct hfi1_pportdata *ppd, enum ib_event_type ev)
8251
{
8352
struct ib_event event;

0 commit comments

Comments
 (0)