All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pavel Begunkov <asml.silence@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [isilence:dmabuf-rw-v1-test 10/16] drivers/nvme/host/pci.c:661:4: error: call to undeclared function '__dma_sync_single_for_cpu'; ISO C99 and later do not support implicit function declarations
Date: Sat, 28 Jun 2025 01:14:17 +0800	[thread overview]
Message-ID: <202506280133.m6Dijaql-lkp@intel.com> (raw)

tree:   https://github.com/isilence/linux dmabuf-rw-v1-test
head:   949fb10351aae03bf6ca32fb3c4a714ebaefc9e9
commit: f968cc15459963b2511327450d713bef7ea9e0d3 [10/16] nvme-pci: implement support for user passed dma vec
config: i386-buildonly-randconfig-005-20250627 (https://download.01.org/0day-ci/archive/20250628/202506280133.m6Dijaql-lkp@intel.com/config)
compiler: clang version 20.1.7 (https://github.com/llvm/llvm-project 6146a88f60492b520a36f8f8f3231e15f3cc6082)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250628/202506280133.m6Dijaql-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/202506280133.m6Dijaql-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/nvme/host/pci.c:661:4: error: call to undeclared function '__dma_sync_single_for_cpu'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     661 |                         __dma_sync_single_for_cpu(dev, dma_addr, dma_len, dir);
         |                         ^
   drivers/nvme/host/pci.c:661:4: note: did you mean 'dma_sync_single_for_cpu'?
   include/linux/dma-mapping.h:415:20: note: 'dma_sync_single_for_cpu' declared here
     415 | static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t addr,
         |                    ^
>> drivers/nvme/host/pci.c:663:4: error: call to undeclared function '__dma_sync_single_for_device'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     663 |                         __dma_sync_single_for_device(dev, dma_addr,
         |                         ^
   drivers/nvme/host/pci.c:663:4: note: did you mean 'dma_sync_single_for_device'?
   include/linux/dma-mapping.h:419:20: note: 'dma_sync_single_for_device' declared here
     419 | static inline void dma_sync_single_for_device(struct device *dev,
         |                    ^
   drivers/nvme/host/pci.c:3424:41: warning: shift count >= width of type [-Wshift-count-overflow]
    3424 |                 dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
         |                                                       ^~~~~~~~~~~~~~~~
   include/linux/dma-mapping.h:73:54: note: expanded from macro 'DMA_BIT_MASK'
      73 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
         |                                                      ^ ~~~
   1 warning and 2 errors generated.


vim +/__dma_sync_single_for_cpu +661 drivers/nvme/host/pci.c

   639	
   640	static void nvme_sync_dma(struct nvme_dev *nvme_dev, struct request *req,
   641				  enum dma_data_direction dir)
   642	{
   643		bool for_cpu = dir == DMA_FROM_DEVICE;
   644		struct device *dev = nvme_dev->dev;
   645		struct bio *bio = req->bio;
   646		int offset, length;
   647		struct dmavec *dmav;
   648	
   649		if (!dma_dev_need_sync(dev))
   650			return;
   651	
   652		offset = bio->bi_iter.bi_bvec_done;
   653		length = blk_rq_payload_bytes(req);
   654		dmav = &bio->bi_dmavec[bio->bi_iter.bi_idx];
   655	
   656		while (length) {
   657			u64 dma_addr = dmav->addr + offset;
   658			int dma_len = min(dmav->len - offset, length);
   659	
   660			if (for_cpu)
 > 661				__dma_sync_single_for_cpu(dev, dma_addr, dma_len, dir);
   662			else
 > 663				__dma_sync_single_for_device(dev, dma_addr,
   664							     dma_len, dir);
   665	
   666			length -= dma_len;
   667		}
   668	}
   669	

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

                 reply	other threads:[~2025-06-27 17:14 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=202506280133.m6Dijaql-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=asml.silence@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.