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

From: kernel test robot
Date: Fri Aug 26 2022 - 14:47:04 EST


Hi Maxime,

I love your patch! Perhaps something to improve:

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

url: https://github.com/intel-lab-lkp/linux/commits/Maxime-Chevallier/net-ipqess-introduce-Qualcomm-IPQESS-driver/20220826-234846
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 44387d1736c40a74085be354e2b5f37ca0689608
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20220827/202208270238.v4dYsRet-lkp@xxxxxxxxx/config)
compiler: s390-linux-gcc (GCC) 12.1.0
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/7a04850338791b6a0d192df5be0e4317e6961fc4
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Maxime-Chevallier/net-ipqess-introduce-Qualcomm-IPQESS-driver/20220826-234846
git checkout 7a04850338791b6a0d192df5be0e4317e6961fc4
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

In file included from include/linux/device.h:15,
from include/linux/dma-mapping.h:7,
from include/linux/skbuff.h:31,
from include/net/net_namespace.h:43,
from include/linux/netdevice.h:38,
from include/linux/if_vlan.h:10,
from drivers/net/ethernet/qualcomm/ipqess/ipqess.c:12:
drivers/net/ethernet/qualcomm/ipqess/ipqess.c: In function 'ipqess_rx_buf_prepare':
>> drivers/net/ethernet/qualcomm/ipqess/ipqess.c:180:30: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'dma_addr_t' {aka 'long long unsigned int'} [-Wformat=]
180 | "IPQESS DMA mapping failed for linear address %x",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
include/linux/dev_printk.h:174:17: note: in expansion of macro 'dev_err'
174 | dev_level(dev, fmt, ##__VA_ARGS__); \
| ^~~~~~~~~
include/linux/dev_printk.h:192:9: note: in expansion of macro 'dev_level_once'
192 | dev_level_once(dev_err, dev, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~
drivers/net/ethernet/qualcomm/ipqess/ipqess.c:179:17: note: in expansion of macro 'dev_err_once'
179 | dev_err_once(rx_ring->ppdev,
| ^~~~~~~~~~~~
drivers/net/ethernet/qualcomm/ipqess/ipqess.c:180:77: note: format string is defined here
180 | "IPQESS DMA mapping failed for linear address %x",
| ~^
| |
| unsigned int
| %llx
drivers/net/ethernet/qualcomm/ipqess/ipqess.c: In function 'ipqess_axi_probe':
>> drivers/net/ethernet/qualcomm/ipqess/ipqess.c:1181:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1181 | netdev->base_addr = (u32)ess->hw_addr;
| ^


vim +180 drivers/net/ethernet/qualcomm/ipqess/ipqess.c

170
171 static int ipqess_rx_buf_prepare(struct ipqess_buf *buf,
172 struct ipqess_rx_ring *rx_ring)
173 {
174 memset(buf->skb->data, 0, sizeof(struct ipqess_rx_desc));
175
176 buf->dma = dma_map_single(rx_ring->ppdev, buf->skb->data,
177 IPQESS_RX_HEAD_BUFF_SIZE, DMA_FROM_DEVICE);
178 if (dma_mapping_error(rx_ring->ppdev, buf->dma)) {
179 dev_err_once(rx_ring->ppdev,
> 180 "IPQESS DMA mapping failed for linear address %x",
181 buf->dma);
182 dev_kfree_skb_any(buf->skb);
183 buf->skb = NULL;
184 return -EFAULT;
185 }
186
187 buf->length = IPQESS_RX_HEAD_BUFF_SIZE;
188 rx_ring->hw_desc[rx_ring->head] = (struct ipqess_rx_desc *)buf->dma;
189 rx_ring->head = (rx_ring->head + 1) % IPQESS_RX_RING_SIZE;
190
191 ipqess_m32(rx_ring->ess, IPQESS_RFD_PROD_IDX_BITS,
192 (rx_ring->head + IPQESS_RX_RING_SIZE - 1) % IPQESS_RX_RING_SIZE,
193 IPQESS_REG_RFD_IDX_Q(rx_ring->idx));
194
195 return 0;
196 }
197

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