Re: [PATCH net-next 3/5] net: ipqess: introduce the Qualcomm IPQESS driver

From: kernel test robot
Date: Tue Oct 24 2023 - 11:56:20 EST


Hi Romain,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url: https://github.com/intel-lab-lkp/linux/commits/Romain-Gantois/net-dt-bindings-Introduce-the-Qualcomm-IPQESS-Ethernet-switch/20231023-235323
base: net-next/main
patch link: https://lore.kernel.org/r/20231023155013.512999-4-romain.gantois%40bootlin.com
patch subject: [PATCH net-next 3/5] net: ipqess: introduce the Qualcomm IPQESS driver
config: arc-allmodconfig (https://download.01.org/0day-ci/archive/20231024/202310242300.y8Z3ImgQ-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/20231024/202310242300.y8Z3ImgQ-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/202310242300.y8Z3ImgQ-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

drivers/net/ethernet/qualcomm/ipqess/ipqess_edma.c: In function 'ipqess_edma_rx_buf_prepare':
>> drivers/net/ethernet/qualcomm/ipqess/ipqess_edma.c:156:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
156 | (struct ipqess_edma_rx_desc *)buf->dma;
| ^


vim +156 drivers/net/ethernet/qualcomm/ipqess/ipqess_edma.c

139
140 static int ipqess_edma_rx_buf_prepare(struct ipqess_edma_buf *buf,
141 struct ipqess_edma_rx_ring *rx_ring)
142 {
143 memset(buf->skb->data, 0, sizeof(struct ipqess_edma_rx_desc));
144
145 buf->dma = dma_map_single(rx_ring->ppdev, buf->skb->data,
146 IPQESS_EDMA_RX_HEAD_BUFF_SIZE,
147 DMA_FROM_DEVICE);
148 if (dma_mapping_error(rx_ring->ppdev, buf->dma)) {
149 dev_kfree_skb_any(buf->skb);
150 buf->skb = NULL;
151 return -EFAULT;
152 }
153
154 buf->length = IPQESS_EDMA_RX_HEAD_BUFF_SIZE;
155 rx_ring->hw_desc[rx_ring->head] =
> 156 (struct ipqess_edma_rx_desc *)buf->dma;
157 rx_ring->head = (rx_ring->head + 1) % IPQESS_EDMA_RX_RING_SIZE;
158
159 ipqess_edma_m32(rx_ring->edma, IPQESS_EDMA_RFD_PROD_IDX_BITS,
160 (rx_ring->head + IPQESS_EDMA_RX_RING_SIZE - 1)
161 % IPQESS_EDMA_RX_RING_SIZE,
162 IPQESS_EDMA_REG_RFD_IDX_Q(rx_ring->idx));
163
164 return 0;
165 }
166

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