public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCHv2 7/7] nvme-pci: implement dma_map support
       [not found] <20220802193633.289796-8-kbusch@fb.com>
@ 2022-08-14 14:55 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-08-14 14:55 UTC (permalink / raw)
  To: Keith Busch; +Cc: llvm, kbuild-all

Hi Keith,

I love your patch! Perhaps something to improve:

[auto build test WARNING on axboe-block/for-next]
[cannot apply to linus/master v5.19 next-20220812]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Keith-Busch/dma-mapping-optimisations/20220803-034125
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: i386-randconfig-a004 (https://download.01.org/0day-ci/archive/20220814/202208142218.6F204p6b-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 495519e5f8232d144ed26e9c18dbcbac6a5f25eb)
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://github.com/intel-lab-lkp/linux/commit/fa76dbaaa42ba2c354d69638edefd09550d5fb38
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Keith-Busch/dma-mapping-optimisations/20220803-034125
        git checkout fa76dbaaa42ba2c354d69638edefd09550d5fb38
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/nvme/host/

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

All warnings (new ones prefixed by >>):

   drivers/nvme/host/pci.c:964:7: warning: variable 'nprps_left' is uninitialized when used here [-Wuninitialized]
                   if (nprps_left <= last_prp + 1) {
                       ^~~~~~~~~~
   drivers/nvme/host/pci.c:894:45: note: initialize the variable 'nprps_left' to silence this warning
           int i, offset, j, length, nprps, nprps_left;
                                                      ^
                                                       = 0
>> drivers/nvme/host/pci.c:1994:9: warning: variable 'ppv' set but not used [-Wunused-but-set-variable]
           int i, ppv;
                  ^
   2 warnings generated.


vim +/ppv +1994 drivers/nvme/host/pci.c

  1987	
  1988	static void nvme_pci_dma_unmap(struct request_queue *q, void *dma_tag)
  1989	{
  1990		const int nvme_pages = 1 << (PAGE_SIZE - NVME_CTRL_PAGE_SIZE);
  1991		struct nvme_ns *ns = q->queuedata;
  1992		struct nvme_dev *dev = to_nvme_dev(ns->ctrl);
  1993		struct nvme_dma_mapping *mapping = dma_tag;
> 1994		int i, ppv;
  1995	
  1996		for (i = 0; i < mapping->nr_pages; i += nvme_pages) {
  1997			__u64 dma_addr = le64_to_cpu(mapping->prps[i]);
  1998			ppv = nvme_pages;
  1999	
  2000			if (i == 0)
  2001				ppv -= mapping->offset >> NVME_CTRL_PAGE_SHIFT;
  2002			dma_unmap_page(dev->dev, dma_addr,
  2003				       PAGE_SIZE - offset_in_page(dma_addr), 0);
  2004		}
  2005	
  2006		dma_free_coherent(dev->dev, mapping->nr_pages * sizeof(*mapping->prps),
  2007				  (void *)mapping->prps, mapping->prp_dma_addr);
  2008		kfree(mapping);
  2009		put_device(dev->dev);
  2010	}
  2011	#endif
  2012	

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

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

only message in thread, other threads:[~2022-08-14 14:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220802193633.289796-8-kbusch@fb.com>
2022-08-14 14:55 ` [PATCHv2 7/7] nvme-pci: implement dma_map support 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