[xilinx-xlnx:xlnx_rebase_v5.15_LTS 225/936] drivers/net/ethernet/xilinx/xilinx_axienet.h:973:9: error: implicit declaration of function 'writeq'; did you mean 'writeb'?

kernel test robot lkp at intel.com
Thu Feb 17 23:43:27 PST 2022


Hi Saurabh,

FYI, the error/warning still remains.

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
head:   886c70d87387be99d999c90f7fe576273cdb8a7b
commit: ee94241b2118ddd38a456b2b805fc584b57de58f [225/936] net: axienet: added multichannel DMA support
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220218/202202181525.yiWJtdlq-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/ee94241b2118ddd38a456b2b805fc584b57de58f
        git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.15_LTS
        git checkout ee94241b2118ddd38a456b2b805fc584b57de58f
        # 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

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   In file included from drivers/net/ethernet/xilinx/xilinx_axienet_main.c:48:
   drivers/net/ethernet/xilinx/xilinx_axienet.h: In function 'axienet_dma_bdout':
>> drivers/net/ethernet/xilinx/xilinx_axienet.h:973:9: error: implicit declaration of function 'writeq'; did you mean 'writeb'? [-Werror=implicit-function-declaration]
     973 |         writeq(value, (q->dma_regs + reg));
         |         ^~~~~~
         |         writeb
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c: In function 'axienet_tx_hwtstamp':
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c:533:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     533 |                 skb_hwtstamps((struct sk_buff *)cur_p->ptp_tx_skb);
         |                               ^
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c:586:26: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     586 |                 skb_pull((struct sk_buff *)cur_p->ptp_tx_skb,
         |                          ^
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c:589:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     589 |         skb_tstamp_tx((struct sk_buff *)cur_p->ptp_tx_skb, shhwtstamps);
         |                       ^
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c:590:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     590 |         dev_kfree_skb_any((struct sk_buff *)cur_p->ptp_tx_skb);
         |                           ^
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c: In function 'axienet_start_xmit_done':
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c:691:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     691 |                         dev_kfree_skb_irq((struct sk_buff *)cur_p->tx_skb);
         |                                           ^
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c: In function 'axienet_skb_tstsmp':
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c:897:53: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     897 |                                 cur_p->ptp_tx_skb = (phys_addr_t)skb_get(skb);
         |                                                     ^
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c: In function 'axienet_queue_xmit':
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1000:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    1000 |             (((phys_addr_t)skb->data & 0x3) || num_frag > 0)) {
         |               ^
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1046:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    1046 |         cur_p->tx_skb = (phys_addr_t)skb;
         |                         ^
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1047:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    1047 |         cur_p->tx_skb = (phys_addr_t)skb;
         |                         ^
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c: In function 'axienet_recv':
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1137:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    1137 |                 skb = (struct sk_buff *)(cur_p->sw_id_offset);
         |                       ^
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1219:39: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    1219 |                 cur_p->sw_id_offset = (phys_addr_t)new_skb;
         |                                       ^
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c: In function 'axienet_probe':
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2981:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
    2981 |         struct resource txtsres, rxtsres;
         |         ^~~~~~
   cc1: some warnings being treated as errors
--
   In file included from drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c:18:
   drivers/net/ethernet/xilinx/xilinx_axienet.h: In function 'axienet_dma_bdout':
>> drivers/net/ethernet/xilinx/xilinx_axienet.h:973:9: error: implicit declaration of function 'writeq'; did you mean 'writeb'? [-Werror=implicit-function-declaration]
     973 |         writeq(value, (q->dma_regs + reg));
         |         ^~~~~~
         |         writeb
   cc1: some warnings being treated as errors
--
   In file included from drivers/net/ethernet/xilinx/xilinx_axienet_dma.c:16:
   drivers/net/ethernet/xilinx/xilinx_axienet.h: In function 'axienet_dma_bdout':
>> drivers/net/ethernet/xilinx/xilinx_axienet.h:973:9: error: implicit declaration of function 'writeq'; did you mean 'writeb'? [-Werror=implicit-function-declaration]
     973 |         writeq(value, (q->dma_regs + reg));
         |         ^~~~~~
         |         writeb
   In file included from include/net/net_namespace.h:39,
                    from include/linux/netdevice.h:37,
                    from drivers/net/ethernet/xilinx/xilinx_axienet.h:12,
                    from drivers/net/ethernet/xilinx/xilinx_axienet_dma.c:16:
   drivers/net/ethernet/xilinx/xilinx_axienet_dma.c: In function 'axienet_bd_free':
   drivers/net/ethernet/xilinx/xilinx_axienet_dma.c:35:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      35 |                 dev_kfree_skb((struct sk_buff *)
         |                               ^
   include/linux/skbuff.h:1211:45: note: in definition of macro 'dev_kfree_skb'
    1211 | #define dev_kfree_skb(a)        consume_skb(a)
         |                                             ^
   drivers/net/ethernet/xilinx/xilinx_axienet_dma.c: In function '__dma_rxq_init':
   drivers/net/ethernet/xilinx/xilinx_axienet_dma.c:167:46: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     167 |                 q->rx_bd_v[i].sw_id_offset = (phys_addr_t)skb;
         |                                              ^
   drivers/net/ethernet/xilinx/xilinx_axienet_dma.c: In function 'axienet_dma_err_handler':
   drivers/net/ethernet/xilinx/xilinx_axienet_dma.c:412:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     412 |                         dev_kfree_skb_irq((struct sk_buff *)cur_p->tx_skb);
         |                                           ^
   cc1: some warnings being treated as errors
--
   In file included from drivers/net/ethernet/xilinx/xilinx_axienet_mcdma.c:23:
   drivers/net/ethernet/xilinx/xilinx_axienet.h: In function 'axienet_dma_bdout':
>> drivers/net/ethernet/xilinx/xilinx_axienet.h:973:9: error: implicit declaration of function 'writeq'; did you mean 'writeb'? [-Werror=implicit-function-declaration]
     973 |         writeq(value, (q->dma_regs + reg));
         |         ^~~~~~
         |         writeb
   In file included from include/linux/netlink.h:7,
                    from include/linux/ethtool.h:18,
                    from include/linux/phy.h:16,
                    from include/linux/of_mdio.h:12,
                    from drivers/net/ethernet/xilinx/xilinx_axienet_mcdma.c:17:
   drivers/net/ethernet/xilinx/xilinx_axienet_mcdma.c: In function 'axienet_mcdma_rx_bd_free':
   drivers/net/ethernet/xilinx/xilinx_axienet_mcdma.c:143:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     143 |                 dev_kfree_skb((struct sk_buff *)
         |                               ^
   include/linux/skbuff.h:1211:45: note: in definition of macro 'dev_kfree_skb'
    1211 | #define dev_kfree_skb(a)        consume_skb(a)
         |                                             ^
   drivers/net/ethernet/xilinx/xilinx_axienet_mcdma.c: In function 'axienet_mcdma_rx_q_init':
   drivers/net/ethernet/xilinx/xilinx_axienet_mcdma.c:277:47: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     277 |                 q->rxq_bd_v[i].sw_id_offset = (phys_addr_t)skb;
         |                                               ^
   drivers/net/ethernet/xilinx/xilinx_axienet_mcdma.c: In function 'axienet_mcdma_err_handler':
   drivers/net/ethernet/xilinx/xilinx_axienet_mcdma.c:621:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     621 |                         dev_kfree_skb_irq((struct sk_buff *)cur_p->tx_skb);
         |                                           ^
   cc1: some warnings being treated as errors


vim +973 drivers/net/ethernet/xilinx/xilinx_axienet.h

   959	
   960	/**
   961	 * axienet_dma_bdout - Memory mapped Axi DMA register Buffer Descriptor write.
   962	 * @q:		Pointer to DMA queue structure
   963	 * @reg:	Address offset from the base address of the Axi DMA core
   964	 * @value:	Value to be written into the Axi DMA register
   965	 *
   966	 * This function writes the desired value into the corresponding Axi DMA
   967	 * register.
   968	 */
   969	static inline void axienet_dma_bdout(struct axienet_dma_q *q,
   970					     off_t reg, dma_addr_t value)
   971	{
   972	#if defined(CONFIG_PHYS_ADDR_T_64BIT)
 > 973		writeq(value, (q->dma_regs + reg));
   974	#else
   975		writel(value, (q->dma_regs + reg));
   976	#endif
   977	}
   978	/* Function prototypes visible in xilinx_axienet_mdio.c for other files */
   979	int axienet_mdio_enable(struct axienet_local *lp);
   980	void axienet_mdio_disable(struct axienet_local *lp);
   981	int axienet_mdio_setup(struct axienet_local *lp);
   982	void axienet_mdio_teardown(struct axienet_local *lp);
   983	int axienet_mdio_wait_until_ready(struct axienet_local *lp);
   984	void __maybe_unused axienet_bd_free(struct net_device *ndev,
   985					    struct axienet_dma_q *q);
   986	int __maybe_unused axienet_dma_q_init(struct net_device *ndev,
   987					      struct axienet_dma_q *q);
   988	void axienet_dma_err_handler(unsigned long data);
   989	irqreturn_t __maybe_unused axienet_tx_irq(int irq, void *_ndev);
   990	irqreturn_t __maybe_unused axienet_rx_irq(int irq, void *_ndev);
   991	void axienet_start_xmit_done(struct net_device *ndev, struct axienet_dma_q *q);
   992	void axienet_dma_bd_release(struct net_device *ndev);
   993	void __axienet_device_reset(struct axienet_dma_q *q);
   994	void axienet_set_mac_address(struct net_device *ndev, const void *address);
   995	void axienet_set_multicast_list(struct net_device *ndev);
   996	int xaxienet_rx_poll(struct napi_struct *napi, int quota);
   997	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



More information about the linux-arm-kernel mailing list