From: kernel test robot <lkp@intel.com>
To: Ohad Sharabi <osharabi@habana.ai>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org, Oded Gabbay <ogabbay@kernel.org>
Subject: [ogabbay:habanalabs-next 33/34] drivers/misc/habanalabs/gaudi/gaudi.c:5041:5: warning: no previous prototype for function 'gaudi_get_dma_desc_list_size'
Date: Tue, 12 Apr 2022 01:52:51 +0800 [thread overview]
Message-ID: <202204120146.AaaXilN7-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git habanalabs-next
head: e3e6111dba082a2d77e80ae99a2de75adff9b875
commit: 7d3600a8f9ffc668f66678211d41eadb224a4dd8 [33/34] habanalabs: use for_each_sgtable_dma_sg for dma sgt
config: x86_64-randconfig-a002-20220411 (https://download.01.org/0day-ci/archive/20220412/202204120146.AaaXilN7-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c6e83f560f06cdfe8aa47b248d8bdc58f947274b)
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/ogabbay/linux.git/commit/?id=7d3600a8f9ffc668f66678211d41eadb224a4dd8
git remote add ogabbay https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
git fetch --no-tags ogabbay habanalabs-next
git checkout 7d3600a8f9ffc668f66678211d41eadb224a4dd8
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/misc/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/misc/habanalabs/gaudi/gaudi.c:5041:5: warning: no previous prototype for function 'gaudi_get_dma_desc_list_size' [-Wmissing-prototypes]
u32 gaudi_get_dma_desc_list_size(struct hl_device *hdev,
^
drivers/misc/habanalabs/gaudi/gaudi.c:5041:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u32 gaudi_get_dma_desc_list_size(struct hl_device *hdev,
^
static
1 warning generated.
vim +/gaudi_get_dma_desc_list_size +5041 drivers/misc/habanalabs/gaudi/gaudi.c
5040
> 5041 u32 gaudi_get_dma_desc_list_size(struct hl_device *hdev,
5042 struct sg_table *sgt)
5043 {
5044 struct scatterlist *sg, *sg_next_iter;
5045 u32 count, dma_desc_cnt;
5046 u64 len, len_next;
5047 dma_addr_t addr, addr_next;
5048
5049 dma_desc_cnt = 0;
5050
5051 for_each_sgtable_dma_sg(sgt, sg, count) {
5052 len = sg_dma_len(sg);
5053 addr = sg_dma_address(sg);
5054
5055 if (len == 0)
5056 break;
5057
5058 while ((count + 1) < sgt->nents) {
5059 sg_next_iter = sg_next(sg);
5060 len_next = sg_dma_len(sg_next_iter);
5061 addr_next = sg_dma_address(sg_next_iter);
5062
5063 if (len_next == 0)
5064 break;
5065
5066 if ((addr + len == addr_next) &&
5067 (len + len_next <= DMA_MAX_TRANSFER_SIZE)) {
5068 len += len_next;
5069 count++;
5070 sg = sg_next_iter;
5071 } else {
5072 break;
5073 }
5074 }
5075
5076 dma_desc_cnt++;
5077 }
5078
5079 return dma_desc_cnt * sizeof(struct packet_lin_dma);
5080 }
5081
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-04-11 17:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202204120146.AaaXilN7-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=ogabbay@kernel.org \
--cc=osharabi@habana.ai \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).