public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Liming Sun <limings@nvidia.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Hans de Goede <hdegoede@redhat.com>,
	Vadim Pasternak <vadimp@nvidia.com>,
	David Thompson <davthompson@nvidia.com>
Subject: drivers/platform/mellanox/mlxbf-tmfifo.c:275:38: sparse: sparse: incorrect type in assignment (different base types)
Date: Thu, 4 Apr 2024 03:40:24 +0800	[thread overview]
Message-ID: <202404040339.S7CUIgf3-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c85af715cac0a951eea97393378e84bb49384734
commit: 78034cbece79c2d730ad0770b3b7f23eedbbecf5 platform/mellanox: mlxbf-tmfifo: Drop the Rx packet if no more descriptors
date:   7 months ago
config: arm64-randconfig-r112-20240404 (https://download.01.org/0day-ci/archive/20240404/202404040339.S7CUIgf3-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 546dc2245ffc4cccd0b05b58b7a5955e355a3b27)
reproduce: (https://download.01.org/0day-ci/archive/20240404/202404040339.S7CUIgf3-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/202404040339.S7CUIgf3-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/platform/mellanox/mlxbf-tmfifo.c:275:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __virtio32 [usertype] len @@     got unsigned long @@
   drivers/platform/mellanox/mlxbf-tmfifo.c:275:38: sparse:     expected restricted __virtio32 [usertype] len
   drivers/platform/mellanox/mlxbf-tmfifo.c:275:38: sparse:     got unsigned long

vim +275 drivers/platform/mellanox/mlxbf-tmfifo.c

   257	
   258	/* Allocate vrings for the FIFO. */
   259	static int mlxbf_tmfifo_alloc_vrings(struct mlxbf_tmfifo *fifo,
   260					     struct mlxbf_tmfifo_vdev *tm_vdev)
   261	{
   262		struct mlxbf_tmfifo_vring *vring;
   263		struct device *dev;
   264		dma_addr_t dma;
   265		int i, size;
   266		void *va;
   267	
   268		for (i = 0; i < ARRAY_SIZE(tm_vdev->vrings); i++) {
   269			vring = &tm_vdev->vrings[i];
   270			vring->fifo = fifo;
   271			vring->num = MLXBF_TMFIFO_VRING_SIZE;
   272			vring->align = SMP_CACHE_BYTES;
   273			vring->index = i;
   274			vring->vdev_id = tm_vdev->vdev.id.device;
 > 275			vring->drop_desc.len = VRING_DROP_DESC_MAX_LEN;
   276			dev = &tm_vdev->vdev.dev;
   277	
   278			size = vring_size(vring->num, vring->align);
   279			va = dma_alloc_coherent(dev->parent, size, &dma, GFP_KERNEL);
   280			if (!va) {
   281				mlxbf_tmfifo_free_vrings(fifo, tm_vdev);
   282				dev_err(dev->parent, "dma_alloc_coherent failed\n");
   283				return -ENOMEM;
   284			}
   285	
   286			vring->va = va;
   287			vring->dma = dma;
   288		}
   289	
   290		return 0;
   291	}
   292	

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

                 reply	other threads:[~2024-04-03 19:41 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=202404040339.S7CUIgf3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davthompson@nvidia.com \
    --cc=hdegoede@redhat.com \
    --cc=limings@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=vadimp@nvidia.com \
    /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