[xilinx-xlnx:xlnx_rebase_v5.15_LTS 1064/1079] drivers/net/ethernet/xilinx/xilinx_tsn_tadma.c:136:43: warning: cast to pointer from integer of different size
kernel test robot
lkp at intel.com
Wed Apr 6 04:02:31 PDT 2022
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
head: 26346d468f90100952de38511adf57513f801cf7
commit: 89383d4f1fcdcc886d4394a2318b0017b1185a61 [1064/1079] net: xilinx: Add TADMA driver support
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220406/202204061816.fDb1y9xf-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.2.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/Xilinx/linux-xlnx/commit/89383d4f1fcdcc886d4394a2318b0017b1185a61
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.15_LTS
git checkout 89383d4f1fcdcc886d4394a2318b0017b1185a61
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash drivers/net/ethernet/xilinx/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/xilinx/xilinx_tsn_tadma.c:24:
drivers/net/ethernet/xilinx/xilinx_axienet.h: In function 'axienet_dma_bdout':
drivers/net/ethernet/xilinx/xilinx_axienet.h:1215:9: error: implicit declaration of function 'writeq'; did you mean 'writeb'? [-Werror=implicit-function-declaration]
1215 | writeq(value, (q->dma_regs + reg));
| ^~~~~~
| writeb
drivers/net/ethernet/xilinx/xilinx_tsn_tadma.c: In function 'tadma_xmit_done':
>> drivers/net/ethernet/xilinx/xilinx_tsn_tadma.c:136:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
136 | dev_kfree_skb_irq((struct sk_buff *)
| ^
drivers/net/ethernet/xilinx/xilinx_tsn_tadma.c: In function 'axienet_tadma_xmit':
>> drivers/net/ethernet/xilinx/xilinx_tsn_tadma.c:515:62: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
515 | lp->tx_bd[sid][lp->tx_bd_head[sid]].tx_skb = (phys_addr_t)skb;
| ^
drivers/net/ethernet/xilinx/xilinx_tsn_tadma.c:548:57: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
548 | (phys_addr_t)skb;
| ^
cc1: some warnings being treated as errors
vim +136 drivers/net/ethernet/xilinx/xilinx_tsn_tadma.c
106
107 static void tadma_xmit_done(struct net_device *ndev, u8 sid, u32 cnt)
108 {
109 struct axienet_local *lp = netdev_priv(ndev);
110 u32 size = 0, packets = 0;
111 unsigned long flags;
112
113 spin_lock_irqsave(&lp->tadma_tx_lock, flags);
114
115 if (lp->tx_bd_head[sid] == lp->tx_bd_tail[sid]) {
116 spin_unlock_irqrestore(&lp->tadma_tx_lock, flags);
117 return;
118 }
119
120 while ((lp->tx_bd_head[sid] != lp->tx_bd_tail[sid]) && cnt) {
121 if (lp->tx_bd[sid][lp->tx_bd_tail[sid]].tx_desc_mapping ==
122 DESC_DMA_MAP_PAGE) {
123 dma_unmap_page(ndev->dev.parent,
124 lp->tx_bd[sid][lp->tx_bd_tail[sid]].phys,
125 lp->tx_bd[sid][lp->tx_bd_tail[sid]].len,
126 DMA_TO_DEVICE);
127 } else {
128 dma_unmap_single(ndev->dev.parent,
129 lp->tx_bd[sid][lp->tx_bd_tail[sid]].
130 phys,
131 lp->tx_bd[sid][lp->tx_bd_tail[sid]].
132 len,
133 DMA_TO_DEVICE);
134 }
135 if (lp->tx_bd[sid][lp->tx_bd_tail[sid]].tx_skb) {
> 136 dev_kfree_skb_irq((struct sk_buff *)
137 lp->tx_bd[sid][lp->tx_bd_tail[sid]].
138 tx_skb);
139 }
140
141 size += lp->tx_bd[sid][lp->tx_bd_tail[sid]].len;
142 packets++;
143 lp->tx_bd_tail[sid]++;
144 lp->tx_bd_tail[sid] %= lp->num_tadma_buffers;
145 cnt--;
146 }
147
148 ndev->stats.tx_packets += packets;
149 ndev->stats.tx_bytes += size;
150 spin_unlock_irqrestore(&lp->tadma_tx_lock, flags);
151 }
152
--
0-DAY CI Kernel Test Service
https://01.org/lkp
More information about the linux-arm-kernel
mailing list