The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* drivers/net/ethernet/allwinner/sun4i-emac.c:940:60: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t' {aka 'long long unsigned int'}
@ 2021-12-29  9:18 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-12-29  9:18 UTC (permalink / raw)
  To: Conley Lee; +Cc: kbuild-all, linux-kernel, 0day robot

tree:   https://github.com/0day-ci/linux/commits/UPDATE-20211229-095330/conleylee-foxmail-com/sun4i-emac-c-add-dma-support/20211224-225057
head:   c1054aa82226f85551abd3193d686b3e263e75d2
commit: c1054aa82226f85551abd3193d686b3e263e75d2 sun4i-emac.c: add dma support
date:   7 hours ago
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20211229/202112291759.0LDxIUcf-lkp@intel.com/config)
compiler: aarch64-linux-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/0day-ci/linux/commit/c1054aa82226f85551abd3193d686b3e263e75d2
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review UPDATE-20211229-095330/conleylee-foxmail-com/sun4i-emac-c-add-dma-support/20211224-225057
        git checkout c1054aa82226f85551abd3193d686b3e263e75d2
        # 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=arm64 SHELL=/bin/bash drivers/net/ethernet/allwinner/

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

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/allwinner/sun4i-emac.c: In function 'emac_configure_dma':
>> drivers/net/ethernet/allwinner/sun4i-emac.c:940:60: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
     940 |         netdev_info(ndev, "get io resource from device: 0x%x, size = %u\n",
         |                                                           ~^
         |                                                            |
         |                                                            unsigned int
         |                                                           %llx
     941 |                     regs->start, resource_size(regs));
         |                     ~~~~~~~~~~~                             
         |                         |
         |                         resource_size_t {aka long long unsigned int}
>> drivers/net/ethernet/allwinner/sun4i-emac.c:940:71: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
     940 |         netdev_info(ndev, "get io resource from device: 0x%x, size = %u\n",
         |                                                                      ~^
         |                                                                       |
         |                                                                       unsigned int
         |                                                                      %llu
     941 |                     regs->start, resource_size(regs));
         |                                  ~~~~~~~~~~~~~~~~~~~                   
         |                                  |
         |                                  resource_size_t {aka long long unsigned int}


vim +940 drivers/net/ethernet/allwinner/sun4i-emac.c

   924	
   925	static int emac_configure_dma(struct emac_board_info *db)
   926	{
   927		struct platform_device *pdev = db->pdev;
   928		struct net_device *ndev = db->ndev;
   929		struct dma_slave_config conf = {};
   930		struct resource *regs;
   931		int err = 0;
   932	
   933		regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   934		if (!regs) {
   935			netdev_err(ndev, "get io resource from device failed.\n");
   936			err = -ENOMEM;
   937			goto out_clear_chan;
   938		}
   939	
 > 940		netdev_info(ndev, "get io resource from device: 0x%x, size = %u\n",
   941			    regs->start, resource_size(regs));
   942		db->emac_rx_fifo = regs->start + EMAC_RX_IO_DATA_REG;
   943	
   944		db->rx_chan = dma_request_chan(&pdev->dev, "rx");
   945		if (IS_ERR(db->rx_chan)) {
   946			netdev_err(ndev,
   947				   "failed to request dma channel. dma is disabled\n");
   948			err = PTR_ERR(db->rx_chan);
   949			goto out_clear_chan;
   950		}
   951	
   952		conf.direction = DMA_DEV_TO_MEM;
   953		conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
   954		conf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
   955		conf.src_addr = db->emac_rx_fifo;
   956		conf.dst_maxburst = 4;
   957		conf.src_maxburst = 4;
   958		conf.device_fc = false;
   959	
   960		err = dmaengine_slave_config(db->rx_chan, &conf);
   961		if (err) {
   962			netdev_err(ndev, "config dma slave failed\n");
   963			err = -EINVAL;
   964			goto out_slave_configure_err;
   965		}
   966	
   967		return err;
   968	
   969	out_slave_configure_err:
   970		dma_release_channel(db->rx_chan);
   971	
   972	out_clear_chan:
   973		db->rx_chan = NULL;
   974		return err;
   975	}
   976	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-29  9:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-29  9:18 drivers/net/ethernet/allwinner/sun4i-emac.c:940:60: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t' {aka 'long long unsigned int'} kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox