public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [rdma:wip/leon-for-next 30/32] drivers/infiniband/hw/hns/hns_roce_hw_v2.c:964:6: warning: no previous prototype for function 'hns_roce_v2_drain_rq'
@ 2026-01-14 19:39 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-01-14 19:39 UTC (permalink / raw)
  To: Chengchang Tang
  Cc: llvm, oe-kbuild-all, Doug Ledford, Jason Gunthorpe, linux-rdma,
	Leon Romanovsky, Junxian Huang

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git wip/leon-for-next
head:   c6b61cad07189d4556a968a305056263b73025f4
commit: cfa74ad31baad3027410b6e75c8e47092aef8d97 [30/32] RDMA/hns: Support drain SQ and RQ
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20260115/202601150334.jRDP5xSy-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260115/202601150334.jRDP5xSy-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601150334.jRDP5xSy-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> 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 
   2 warnings generated.


vim +/hns_roce_v2_drain_rq +964 drivers/infiniband/hw/hns/hns_roce_hw_v2.c

   963	
 > 964	void hns_roce_v2_drain_rq(struct ib_qp *ibqp)
   965	{
   966		struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device);
   967		struct ib_qp_attr attr = { .qp_state = IB_QPS_ERR };
   968		struct hns_roce_qp *hr_qp = to_hr_qp(ibqp);
   969		struct hns_roce_drain_cqe rdrain = {};
   970		const struct ib_recv_wr *bad_rwr;
   971		struct ib_cq *cq = ibqp->recv_cq;
   972		struct ib_recv_wr rwr = {};
   973		int ret;
   974	
   975		ret = ib_modify_qp(ibqp, &attr, IB_QP_STATE);
   976		if (ret && hr_dev->state < HNS_ROCE_DEVICE_STATE_RST_DOWN) {
   977			ibdev_err_ratelimited(&hr_dev->ib_dev,
   978					      "failed to modify qp during drain rq, ret = %d.\n",
   979					      ret);
   980			return;
   981		}
   982	
   983		rwr.wr_cqe = &rdrain.cqe;
   984		rdrain.cqe.done = hns_roce_drain_qp_done;
   985		init_completion(&rdrain.done);
   986	
   987		if (hr_dev->state >= HNS_ROCE_DEVICE_STATE_RST_DOWN)
   988			ret = hns_roce_push_drain_wr(&hr_qp->rq, cq, rwr.wr_id);
   989		else
   990			ret = hns_roce_v2_post_recv(ibqp, &rwr, &bad_rwr);
   991		if (ret) {
   992			ibdev_err_ratelimited(&hr_dev->ib_dev,
   993					      "failed to post recv for drain rq, ret = %d.\n",
   994					      ret);
   995			return;
   996		}
   997	
   998		handle_drain_completion(cq, &rdrain, hr_dev);
   999	}
  1000	
> 1001	void hns_roce_v2_drain_sq(struct ib_qp *ibqp)
  1002	{
  1003		struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device);
  1004		struct ib_qp_attr attr = { .qp_state = IB_QPS_ERR };
  1005		struct hns_roce_qp *hr_qp = to_hr_qp(ibqp);
  1006		struct hns_roce_drain_cqe sdrain = {};
  1007		const struct ib_send_wr *bad_swr;
  1008		struct ib_cq *cq = ibqp->send_cq;
  1009		struct ib_rdma_wr swr = {
  1010			.wr = {
  1011				.next = NULL,
  1012				{ .wr_cqe	= &sdrain.cqe, },
  1013				.opcode	= IB_WR_RDMA_WRITE,
  1014			},
  1015		};
  1016		int ret;
  1017	
  1018		ret = ib_modify_qp(ibqp, &attr, IB_QP_STATE);
  1019		if (ret && hr_dev->state < HNS_ROCE_DEVICE_STATE_RST_DOWN) {
  1020			ibdev_err_ratelimited(&hr_dev->ib_dev,
  1021					      "failed to modify qp during drain sq, ret = %d.\n",
  1022					      ret);
  1023			return;
  1024		}
  1025	
  1026		sdrain.cqe.done = hns_roce_drain_qp_done;
  1027		init_completion(&sdrain.done);
  1028	
  1029		if (hr_dev->state >= HNS_ROCE_DEVICE_STATE_RST_DOWN)
  1030			ret = hns_roce_push_drain_wr(&hr_qp->sq, cq, swr.wr.wr_id);
  1031		else
  1032			ret = hns_roce_v2_post_send(ibqp, &swr.wr, &bad_swr);
  1033		if (ret) {
  1034			ibdev_err_ratelimited(&hr_dev->ib_dev,
  1035					      "failed to post send for drain sq, ret = %d.\n",
  1036					      ret);
  1037			return;
  1038		}
  1039	
  1040		handle_drain_completion(cq, &sdrain, hr_dev);
  1041	}
  1042	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-01-14 19:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-14 19:39 [rdma:wip/leon-for-next 30/32] drivers/infiniband/hw/hns/hns_roce_hw_v2.c:964:6: warning: no previous prototype for function 'hns_roce_v2_drain_rq' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox