From 9d2f53ef42c15f6e47b48246beb0a32c4ff3b3ed Mon Sep 17 00:00:00 2001
From: Jubin John <jubin.john@intel.com>
Date: Fri, 20 Nov 2015 18:13:08 -0500
Subject: [PATCH] staging/rdma/hfi1: Fix error in hfi1 driver build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

hfi1 driver build fails with the following error:
In function ‘handle_receive_interrupt’:
error: implicit declaration of function ‘skip_rcv_packet’ [-Werror=implicit-function-declaration]
    last = skip_rcv_packet(&packet, thread);
    ^
This is due to the inclusion of the skip_rcv_packet() in the
CONFIG_PRESCAN_RXQ ifdef block. This function is independent of
CONFIG_PRESCAN_RXQ and should be outside this block.

Fixes: 82c2611daaf0 ("staging/rdma/hfi1: Handle packets with invalid RHF on context 0")
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/rdma/hfi1/driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rdma/hfi1/driver.c b/drivers/staging/rdma/hfi1/driver.c
index 745817ea42e24..8485de1fce086 100644
--- a/drivers/staging/rdma/hfi1/driver.c
+++ b/drivers/staging/rdma/hfi1/driver.c
@@ -633,6 +633,7 @@ next:
 		update_ps_mdata(&mdata, rcd);
 	}
 }
+#endif /* CONFIG_PRESCAN_RXQ */
 
 static inline int skip_rcv_packet(struct hfi1_packet *packet, int thread)
 {
@@ -659,7 +660,6 @@ static inline int skip_rcv_packet(struct hfi1_packet *packet, int thread)
 
 	return ret;
 }
-#endif /* CONFIG_PRESCAN_RXQ */
 
 static inline int process_rcv_packet(struct hfi1_packet *packet, int thread)
 {
-- 
GitLab