[leon-rdma:rdma-next 15/40] drivers/infiniband/hw/hns/hns_roce_hw_v2.c:5805:5: warning: no previous prototype for 'hns_roce_v2_query_mpt'

From: kernel test robot
Date: Tue Aug 23 2022 - 15:45:09 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git rdma-next
head: 07c7704e6a8741b28f249e1f53c6c1f66b718687
commit: 436aa2aa24f6efe8f918709daa71f47d2d0713ae [15/40] RDMA/hns: Support MR's restrack raw ops for hns driver
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20220824/202208240240.7nXzYHkq-lkp@xxxxxxxxx/config)
compiler: s390-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/commit/?id=436aa2aa24f6efe8f918709daa71f47d2d0713ae
git remote add leon-rdma https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git
git fetch --no-tags leon-rdma rdma-next
git checkout 436aa2aa24f6efe8f918709daa71f47d2d0713ae
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash drivers/infiniband/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:5805:5: warning: no previous prototype for 'hns_roce_v2_query_mpt' [-Wmissing-prototypes]
5805 | int hns_roce_v2_query_mpt(struct hns_roce_dev *hr_dev, u32 key, void *buffer)
| ^~~~~~~~~~~~~~~~~~~~~


vim +/hns_roce_v2_query_mpt +5805 drivers/infiniband/hw/hns/hns_roce_hw_v2.c

5804
> 5805 int hns_roce_v2_query_mpt(struct hns_roce_dev *hr_dev, u32 key, void *buffer)
5806 {
5807 struct hns_roce_v2_mpt_entry *context;
5808 struct hns_roce_cmd_mailbox *mailbox;
5809 int ret;
5810
5811 mailbox = hns_roce_alloc_cmd_mailbox(hr_dev);
5812 if (IS_ERR(mailbox))
5813 return PTR_ERR(mailbox);
5814
5815 context = mailbox->buf;
5816 ret = hns_roce_cmd_mbox(hr_dev, 0, mailbox->dma, HNS_ROCE_CMD_QUERY_MPT,
5817 key_to_hw_index(key));
5818 if (ret) {
5819 ibdev_err(&hr_dev->ib_dev,
5820 "failed to process cmd when querying MPT, ret = %d.\n",
5821 ret);
5822 goto err_mailbox;
5823 }
5824
5825 memcpy(buffer, context, sizeof(*context));
5826
5827 err_mailbox:
5828 hns_roce_free_cmd_mailbox(hr_dev, mailbox);
5829
5830 return ret;
5831 }
5832

--
0-DAY CI Kernel Test Service
https://01.org/lkp