Re: [PATCH v2 2/3] cnic,bnx2,bnx2x: use UIO_MEM_DMA_COHERENT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nilesh,

kernel test robot noticed the following build warnings:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on char-misc/char-misc-next char-misc/char-misc-linus linus/master v6.7-rc8 next-20240104]
[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/Nilesh-Javali/uio-introduce-UIO_MEM_DMA_COHERENT-type/20240103-171531
base:   char-misc/char-misc-testing
patch link:    https://lore.kernel.org/r/20240103091137.27142-3-njavali%40marvell.com
patch subject: [PATCH v2 2/3] cnic,bnx2,bnx2x: use UIO_MEM_DMA_COHERENT
config: arc-allmodconfig (https://download.01.org/0day-ci/archive/20240105/202401051255.Qa1W34Jr-lkp@xxxxxxxxx/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240105/202401051255.Qa1W34Jr-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401051255.Qa1W34Jr-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/broadcom/cnic.c: In function 'cnic_init_uio':
>> drivers/net/ethernet/broadcom/cnic.c:1120:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    1120 |                 uinfo->mem[1].addr = (phys_addr_t)cp->bnx2x_def_status_blk &
         |                                      ^
   drivers/net/ethernet/broadcom/cnic.c:1130:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    1130 |         uinfo->mem[2].addr = (phys_addr_t)udev->l2_ring;
         |                              ^
   drivers/net/ethernet/broadcom/cnic.c:1135:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    1135 |         uinfo->mem[3].addr = (phys_addr_t)udev->l2_buf;
         |                              ^


vim +1120 drivers/net/ethernet/broadcom/cnic.c

  1088	
  1089	static int cnic_init_uio(struct cnic_dev *dev)
  1090	{
  1091		struct cnic_local *cp = dev->cnic_priv;
  1092		struct cnic_uio_dev *udev = cp->udev;
  1093		struct uio_info *uinfo;
  1094		int ret = 0;
  1095	
  1096		if (!udev)
  1097			return -ENOMEM;
  1098	
  1099		uinfo = &udev->cnic_uinfo;
  1100	
  1101		uinfo->mem[0].addr = pci_resource_start(dev->pcidev, 0);
  1102		uinfo->mem[0].internal_addr = dev->regview;
  1103		uinfo->mem[0].memtype = UIO_MEM_PHYS;
  1104	
  1105		if (test_bit(CNIC_F_BNX2_CLASS, &dev->flags)) {
  1106			uinfo->mem[0].size = MB_GET_CID_ADDR(TX_TSS_CID +
  1107							     TX_MAX_TSS_RINGS + 1);
  1108			uinfo->mem[1].addr = (unsigned long) cp->status_blk.gen &
  1109						CNIC_PAGE_MASK;
  1110			uinfo->mem[1].dma_addr = cp->status_blk_map;
  1111			if (cp->ethdev->drv_state & CNIC_DRV_STATE_USING_MSIX)
  1112				uinfo->mem[1].size = BNX2_SBLK_MSIX_ALIGN_SIZE * 9;
  1113			else
  1114				uinfo->mem[1].size = BNX2_SBLK_MSIX_ALIGN_SIZE;
  1115	
  1116			uinfo->name = "bnx2_cnic";
  1117		} else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) {
  1118			uinfo->mem[0].size = pci_resource_len(dev->pcidev, 0);
  1119	
> 1120			uinfo->mem[1].addr = (phys_addr_t)cp->bnx2x_def_status_blk &
  1121				CNIC_PAGE_MASK;
  1122			uinfo->mem[1].dma_addr = cp->status_blk_map;
  1123			uinfo->mem[1].size = sizeof(*cp->bnx2x_def_status_blk);
  1124	
  1125			uinfo->name = "bnx2x_cnic";
  1126		}
  1127	
  1128		uinfo->mem[1].memtype = UIO_MEM_DMA_COHERENT;
  1129	
  1130		uinfo->mem[2].addr = (phys_addr_t)udev->l2_ring;
  1131		uinfo->mem[2].dma_addr = udev->l2_ring_map;
  1132		uinfo->mem[2].size = udev->l2_ring_size;
  1133		uinfo->mem[2].memtype = UIO_MEM_DMA_COHERENT;
  1134	
  1135		uinfo->mem[3].addr = (phys_addr_t)udev->l2_buf;
  1136		uinfo->mem[3].dma_addr = udev->l2_buf_map;
  1137		uinfo->mem[3].size = udev->l2_buf_size;
  1138		uinfo->mem[3].memtype = UIO_MEM_DMA_COHERENT;
  1139	
  1140		uinfo->version = CNIC_MODULE_VERSION;
  1141		uinfo->irq = UIO_IRQ_CUSTOM;
  1142	
  1143		uinfo->open = cnic_uio_open;
  1144		uinfo->release = cnic_uio_close;
  1145	
  1146		if (udev->uio_dev == -1) {
  1147			if (!uinfo->priv) {
  1148				uinfo->priv = udev;
  1149	
  1150				ret = uio_register_device(&udev->pdev->dev, uinfo);
  1151			}
  1152		} else {
  1153			cnic_init_rings(dev);
  1154		}
  1155	
  1156		return ret;
  1157	}
  1158	

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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux