* [PATCH for-next] RDMA/hns: Add 'static' declaration
@ 2026-01-15 2:41 Junxian Huang
2026-01-15 10:42 ` Leon Romanovsky
0 siblings, 1 reply; 2+ messages in thread
From: Junxian Huang @ 2026-01-15 2:41 UTC (permalink / raw)
To: jgg, leon; +Cc: linux-rdma, linuxarm, huangjunxian6, tangchengchang
Fix the following warnings:
>> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:964:6: warning: no previous prototype for function 'hns_roce_v2_drain_rq' [-Wmissing-prototypes]
void hns_roce_v2_drain_rq(struct ib_qp *ibqp)
^
drivers/infiniband/hw/hns/hns_roce_hw_v2.c:964:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void hns_roce_v2_drain_rq(struct ib_qp *ibqp)
^
static
>> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:1001:6: warning: no previous prototype for function 'hns_roce_v2_drain_sq' [-Wmissing-prototypes]
void hns_roce_v2_drain_sq(struct ib_qp *ibqp)
^
drivers/infiniband/hw/hns/hns_roce_hw_v2.c:1001:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void hns_roce_v2_drain_sq(struct ib_qp *ibqp)
^
static
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202601150334.jRDP5xSy-lkp@intel.com/
Fixes: cfa74ad31baa ("RDMA/hns: Support drain SQ and RQ")
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
---
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 5233546ff330..5d0a8662249d 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -961,7 +961,7 @@ static void handle_drain_completion(struct ib_cq *ibcq,
wait_for_completion(&drain->done);
}
-void hns_roce_v2_drain_rq(struct ib_qp *ibqp)
+static void hns_roce_v2_drain_rq(struct ib_qp *ibqp)
{
struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device);
struct ib_qp_attr attr = { .qp_state = IB_QPS_ERR };
@@ -998,7 +998,7 @@ void hns_roce_v2_drain_rq(struct ib_qp *ibqp)
handle_drain_completion(cq, &rdrain, hr_dev);
}
-void hns_roce_v2_drain_sq(struct ib_qp *ibqp)
+static void hns_roce_v2_drain_sq(struct ib_qp *ibqp)
{
struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device);
struct ib_qp_attr attr = { .qp_state = IB_QPS_ERR };
--
2.33.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH for-next] RDMA/hns: Add 'static' declaration
2026-01-15 2:41 [PATCH for-next] RDMA/hns: Add 'static' declaration Junxian Huang
@ 2026-01-15 10:42 ` Leon Romanovsky
0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2026-01-15 10:42 UTC (permalink / raw)
To: Junxian Huang; +Cc: jgg, linux-rdma, linuxarm, tangchengchang
On Thu, Jan 15, 2026 at 10:41:54AM +0800, Junxian Huang wrote:
> Fix the following warnings:
>
> >> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:964:6: warning: no previous prototype for function 'hns_roce_v2_drain_rq' [-Wmissing-prototypes]
> void hns_roce_v2_drain_rq(struct ib_qp *ibqp)
> ^
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:964:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> void hns_roce_v2_drain_rq(struct ib_qp *ibqp)
> ^
> static
> >> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:1001:6: warning: no previous prototype for function 'hns_roce_v2_drain_sq' [-Wmissing-prototypes]
> void hns_roce_v2_drain_sq(struct ib_qp *ibqp)
> ^
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:1001:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> void hns_roce_v2_drain_sq(struct ib_qp *ibqp)
> ^
> static
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202601150334.jRDP5xSy-lkp@intel.com/
> Fixes: cfa74ad31baa ("RDMA/hns: Support drain SQ and RQ")
> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
> ---
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
I squashed it and rebased my wip/leon-for-next branch.
Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-15 10:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-15 2:41 [PATCH for-next] RDMA/hns: Add 'static' declaration Junxian Huang
2026-01-15 10:42 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox