提交 d791d294 编写于 作者: G Grzegorz Andrejczuk 提交者: Jason Gunthorpe

IB/hfi1: Return void in packet receiving functions

Packet receiving functions returns int value, and yet the return values
are not used at all.

This patch converts the functions to return void.

Link: https://lore.kernel.org/r/20200106134222.119356.84098.stgit@awfm-01.aw.intel.comReviewed-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: NGrzegorz Andrejczuk <grzegorz.andrejczuk@intel.com>
Signed-off-by: NKaike Wan <kaike.wan@intel.com>
Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
上级 13d2a838
...@@ -1553,23 +1553,22 @@ void handle_eflags(struct hfi1_packet *packet) ...@@ -1553,23 +1553,22 @@ void handle_eflags(struct hfi1_packet *packet)
* The following functions are called by the interrupt handler. They are type * The following functions are called by the interrupt handler. They are type
* specific handlers for each packet type. * specific handlers for each packet type.
*/ */
static int process_receive_ib(struct hfi1_packet *packet) static void process_receive_ib(struct hfi1_packet *packet)
{ {
if (hfi1_setup_9B_packet(packet)) if (hfi1_setup_9B_packet(packet))
return RHF_RCV_CONTINUE; return;
if (unlikely(hfi1_dbg_should_fault_rx(packet))) if (unlikely(hfi1_dbg_should_fault_rx(packet)))
return RHF_RCV_CONTINUE; return;
trace_hfi1_rcvhdr(packet); trace_hfi1_rcvhdr(packet);
if (unlikely(rhf_err_flags(packet->rhf))) { if (unlikely(rhf_err_flags(packet->rhf))) {
handle_eflags(packet); handle_eflags(packet);
return RHF_RCV_CONTINUE; return;
} }
hfi1_ib_rcv(packet); hfi1_ib_rcv(packet);
return RHF_RCV_CONTINUE;
} }
static inline bool hfi1_is_vnic_packet(struct hfi1_packet *packet) static inline bool hfi1_is_vnic_packet(struct hfi1_packet *packet)
...@@ -1585,23 +1584,23 @@ static inline bool hfi1_is_vnic_packet(struct hfi1_packet *packet) ...@@ -1585,23 +1584,23 @@ static inline bool hfi1_is_vnic_packet(struct hfi1_packet *packet)
return false; return false;
} }
static int process_receive_bypass(struct hfi1_packet *packet) static void process_receive_bypass(struct hfi1_packet *packet)
{ {
struct hfi1_devdata *dd = packet->rcd->dd; struct hfi1_devdata *dd = packet->rcd->dd;
if (hfi1_is_vnic_packet(packet)) { if (hfi1_is_vnic_packet(packet)) {
hfi1_vnic_bypass_rcv(packet); hfi1_vnic_bypass_rcv(packet);
return RHF_RCV_CONTINUE; return;
} }
if (hfi1_setup_bypass_packet(packet)) if (hfi1_setup_bypass_packet(packet))
return RHF_RCV_CONTINUE; return;
trace_hfi1_rcvhdr(packet); trace_hfi1_rcvhdr(packet);
if (unlikely(rhf_err_flags(packet->rhf))) { if (unlikely(rhf_err_flags(packet->rhf))) {
handle_eflags(packet); handle_eflags(packet);
return RHF_RCV_CONTINUE; return;
} }
if (hfi1_16B_get_l2(packet->hdr) == 0x2) { if (hfi1_16B_get_l2(packet->hdr) == 0x2) {
...@@ -1624,17 +1623,16 @@ static int process_receive_bypass(struct hfi1_packet *packet) ...@@ -1624,17 +1623,16 @@ static int process_receive_bypass(struct hfi1_packet *packet)
(OPA_EI_STATUS_SMASK | BAD_L2_ERR); (OPA_EI_STATUS_SMASK | BAD_L2_ERR);
} }
} }
return RHF_RCV_CONTINUE;
} }
static int process_receive_error(struct hfi1_packet *packet) static void process_receive_error(struct hfi1_packet *packet)
{ {
/* KHdrHCRCErr -- KDETH packet with a bad HCRC */ /* KHdrHCRCErr -- KDETH packet with a bad HCRC */
if (unlikely( if (unlikely(
hfi1_dbg_fault_suppress_err(&packet->rcd->dd->verbs_dev) && hfi1_dbg_fault_suppress_err(&packet->rcd->dd->verbs_dev) &&
(rhf_rcv_type_err(packet->rhf) == RHF_RCV_TYPE_ERROR || (rhf_rcv_type_err(packet->rhf) == RHF_RCV_TYPE_ERROR ||
packet->rhf & RHF_DC_ERR))) packet->rhf & RHF_DC_ERR)))
return RHF_RCV_CONTINUE; return;
hfi1_setup_ib_header(packet); hfi1_setup_ib_header(packet);
handle_eflags(packet); handle_eflags(packet);
...@@ -1642,32 +1640,29 @@ static int process_receive_error(struct hfi1_packet *packet) ...@@ -1642,32 +1640,29 @@ static int process_receive_error(struct hfi1_packet *packet)
if (unlikely(rhf_err_flags(packet->rhf))) if (unlikely(rhf_err_flags(packet->rhf)))
dd_dev_err(packet->rcd->dd, dd_dev_err(packet->rcd->dd,
"Unhandled error packet received. Dropping.\n"); "Unhandled error packet received. Dropping.\n");
return RHF_RCV_CONTINUE;
} }
static int kdeth_process_expected(struct hfi1_packet *packet) static void kdeth_process_expected(struct hfi1_packet *packet)
{ {
hfi1_setup_9B_packet(packet); hfi1_setup_9B_packet(packet);
if (unlikely(hfi1_dbg_should_fault_rx(packet))) if (unlikely(hfi1_dbg_should_fault_rx(packet)))
return RHF_RCV_CONTINUE; return;
if (unlikely(rhf_err_flags(packet->rhf))) { if (unlikely(rhf_err_flags(packet->rhf))) {
struct hfi1_ctxtdata *rcd = packet->rcd; struct hfi1_ctxtdata *rcd = packet->rcd;
if (hfi1_handle_kdeth_eflags(rcd, rcd->ppd, packet)) if (hfi1_handle_kdeth_eflags(rcd, rcd->ppd, packet))
return RHF_RCV_CONTINUE; return;
} }
hfi1_kdeth_expected_rcv(packet); hfi1_kdeth_expected_rcv(packet);
return RHF_RCV_CONTINUE;
} }
static int kdeth_process_eager(struct hfi1_packet *packet) static void kdeth_process_eager(struct hfi1_packet *packet)
{ {
hfi1_setup_9B_packet(packet); hfi1_setup_9B_packet(packet);
if (unlikely(hfi1_dbg_should_fault_rx(packet))) if (unlikely(hfi1_dbg_should_fault_rx(packet)))
return RHF_RCV_CONTINUE; return;
trace_hfi1_rcvhdr(packet); trace_hfi1_rcvhdr(packet);
if (unlikely(rhf_err_flags(packet->rhf))) { if (unlikely(rhf_err_flags(packet->rhf))) {
...@@ -1675,18 +1670,16 @@ static int kdeth_process_eager(struct hfi1_packet *packet) ...@@ -1675,18 +1670,16 @@ static int kdeth_process_eager(struct hfi1_packet *packet)
show_eflags_errs(packet); show_eflags_errs(packet);
if (hfi1_handle_kdeth_eflags(rcd, rcd->ppd, packet)) if (hfi1_handle_kdeth_eflags(rcd, rcd->ppd, packet))
return RHF_RCV_CONTINUE; return;
} }
hfi1_kdeth_eager_rcv(packet); hfi1_kdeth_eager_rcv(packet);
return RHF_RCV_CONTINUE;
} }
static int process_receive_invalid(struct hfi1_packet *packet) static void process_receive_invalid(struct hfi1_packet *packet)
{ {
dd_dev_err(packet->rcd->dd, "Invalid packet type %d. Dropping\n", dd_dev_err(packet->rcd->dd, "Invalid packet type %d. Dropping\n",
rhf_rcv_type(packet->rhf)); rhf_rcv_type(packet->rhf));
return RHF_RCV_CONTINUE;
} }
#define HFI1_RCVHDR_DUMP_MAX 5 #define HFI1_RCVHDR_DUMP_MAX 5
......
...@@ -199,7 +199,7 @@ struct exp_tid_set { ...@@ -199,7 +199,7 @@ struct exp_tid_set {
struct hfi1_ctxtdata; struct hfi1_ctxtdata;
typedef int (*intr_handler)(struct hfi1_ctxtdata *rcd, int data); typedef int (*intr_handler)(struct hfi1_ctxtdata *rcd, int data);
typedef int (*rhf_rcv_function_ptr)(struct hfi1_packet *packet); typedef void (*rhf_rcv_function_ptr)(struct hfi1_packet *packet);
struct tid_queue { struct tid_queue {
struct list_head queue_head; struct list_head queue_head;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册