All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/net/ethernet/atheros/ag71xx.c:994:38: warning: passing argument 2 of 'ag71xx_hw_set_macaddr' discards 'const' qualifier from pointer target type
@ 2022-07-31 23:20 kernel test robot
  2022-08-01 15:47   ` Jakub Kicinski
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-07-31 23:20 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: kbuild-all, linux-kernel

Hi Jakub,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3d7cb6b04c3f3115719235cc6866b10326de34cd
commit: adeef3e32146a8d2a73c399dc6f5d76a449131b1 net: constify netdev->dev_addr
date:   8 months ago
config: mips-randconfig-r033-20220801 (https://download.01.org/0day-ci/archive/20220801/202208010713.jcG50gwa-lkp@intel.com/config)
compiler: mips-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=adeef3e32146a8d2a73c399dc6f5d76a449131b1
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout adeef3e32146a8d2a73c399dc6f5d76a449131b1
        # 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=mips SHELL=/bin/bash drivers/net/ethernet/atheros/

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

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/atheros/ag71xx.c: In function 'ag71xx_fast_reset':
>> drivers/net/ethernet/atheros/ag71xx.c:994:38: warning: passing argument 2 of 'ag71xx_hw_set_macaddr' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     994 |         ag71xx_hw_set_macaddr(ag, dev->dev_addr);
         |                                   ~~~^~~~~~~~~~
   drivers/net/ethernet/atheros/ag71xx.c:949:69: note: expected 'unsigned char *' but argument is of type 'const unsigned char *'
     949 | static void ag71xx_hw_set_macaddr(struct ag71xx *ag, unsigned char *mac)
         |                                                      ~~~~~~~~~~~~~~~^~~
   drivers/net/ethernet/atheros/ag71xx.c: In function 'ag71xx_open':
   drivers/net/ethernet/atheros/ag71xx.c:1452:39: warning: passing argument 2 of 'ag71xx_hw_set_macaddr' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
    1452 |         ag71xx_hw_set_macaddr(ag, ndev->dev_addr);
         |                                   ~~~~^~~~~~~~~~
   drivers/net/ethernet/atheros/ag71xx.c:949:69: note: expected 'unsigned char *' but argument is of type 'const unsigned char *'
     949 | static void ag71xx_hw_set_macaddr(struct ag71xx *ag, unsigned char *mac)
         |                                                      ~~~~~~~~~~~~~~~^~~


vim +994 drivers/net/ethernet/atheros/ag71xx.c

d51b6ce441d356 Oleksij Rempel 2019-05-24  961  
d51b6ce441d356 Oleksij Rempel 2019-05-24  962  static void ag71xx_fast_reset(struct ag71xx *ag)
d51b6ce441d356 Oleksij Rempel 2019-05-24  963  {
d51b6ce441d356 Oleksij Rempel 2019-05-24  964  	struct net_device *dev = ag->ndev;
d51b6ce441d356 Oleksij Rempel 2019-05-24  965  	u32 rx_ds;
d51b6ce441d356 Oleksij Rempel 2019-05-24  966  	u32 mii_reg;
d51b6ce441d356 Oleksij Rempel 2019-05-24  967  
d51b6ce441d356 Oleksij Rempel 2019-05-24  968  	ag71xx_hw_stop(ag);
d51b6ce441d356 Oleksij Rempel 2019-05-24  969  
d51b6ce441d356 Oleksij Rempel 2019-05-24  970  	mii_reg = ag71xx_rr(ag, AG71XX_REG_MII_CFG);
d51b6ce441d356 Oleksij Rempel 2019-05-24  971  	rx_ds = ag71xx_rr(ag, AG71XX_REG_RX_DESC);
d51b6ce441d356 Oleksij Rempel 2019-05-24  972  
d51b6ce441d356 Oleksij Rempel 2019-05-24  973  	ag71xx_tx_packets(ag, true);
d51b6ce441d356 Oleksij Rempel 2019-05-24  974  
d51b6ce441d356 Oleksij Rempel 2019-05-24  975  	reset_control_assert(ag->mac_reset);
d51b6ce441d356 Oleksij Rempel 2019-05-24  976  	usleep_range(10, 20);
d51b6ce441d356 Oleksij Rempel 2019-05-24  977  	reset_control_deassert(ag->mac_reset);
d51b6ce441d356 Oleksij Rempel 2019-05-24  978  	usleep_range(10, 20);
d51b6ce441d356 Oleksij Rempel 2019-05-24  979  
d51b6ce441d356 Oleksij Rempel 2019-05-24  980  	ag71xx_dma_reset(ag);
d51b6ce441d356 Oleksij Rempel 2019-05-24  981  	ag71xx_hw_setup(ag);
d51b6ce441d356 Oleksij Rempel 2019-05-24  982  	ag->tx_ring.curr = 0;
d51b6ce441d356 Oleksij Rempel 2019-05-24  983  	ag->tx_ring.dirty = 0;
d51b6ce441d356 Oleksij Rempel 2019-05-24  984  	netdev_reset_queue(ag->ndev);
d51b6ce441d356 Oleksij Rempel 2019-05-24  985  
d51b6ce441d356 Oleksij Rempel 2019-05-24  986  	/* setup max frame length */
d51b6ce441d356 Oleksij Rempel 2019-05-24  987  	ag71xx_wr(ag, AG71XX_REG_MAC_MFL,
d51b6ce441d356 Oleksij Rempel 2019-05-24  988  		  ag71xx_max_frame_len(ag->ndev->mtu));
d51b6ce441d356 Oleksij Rempel 2019-05-24  989  
d51b6ce441d356 Oleksij Rempel 2019-05-24  990  	ag71xx_wr(ag, AG71XX_REG_RX_DESC, rx_ds);
d51b6ce441d356 Oleksij Rempel 2019-05-24  991  	ag71xx_wr(ag, AG71XX_REG_TX_DESC, ag->tx_ring.descs_dma);
d51b6ce441d356 Oleksij Rempel 2019-05-24  992  	ag71xx_wr(ag, AG71XX_REG_MII_CFG, mii_reg);
d51b6ce441d356 Oleksij Rempel 2019-05-24  993  
d51b6ce441d356 Oleksij Rempel 2019-05-24 @994  	ag71xx_hw_set_macaddr(ag, dev->dev_addr);
d51b6ce441d356 Oleksij Rempel 2019-05-24  995  }
d51b6ce441d356 Oleksij Rempel 2019-05-24  996  

:::::: The code at line 994 was first introduced by commit
:::::: d51b6ce441d356369387d20bc1de5f2edb0ab71e net: ethernet: add ag71xx driver

:::::: TO: Oleksij Rempel <o.rempel@pengutronix.de>
:::::: CC: David S. Miller <davem@davemloft.net>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: drivers/net/ethernet/atheros/ag71xx.c:994:38: warning: passing argument 2 of 'ag71xx_hw_set_macaddr' discards 'const' qualifier from pointer target type
  2022-07-31 23:20 drivers/net/ethernet/atheros/ag71xx.c:994:38: warning: passing argument 2 of 'ag71xx_hw_set_macaddr' discards 'const' qualifier from pointer target type kernel test robot
@ 2022-08-01 15:47   ` Jakub Kicinski
  0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2022-08-01 15:47 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1415 bytes --]

On Mon, 1 Aug 2022 07:20:16 +0800 kernel test robot wrote:
> Hi Jakub,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   3d7cb6b04c3f3115719235cc6866b10326de34cd
> commit: adeef3e32146a8d2a73c399dc6f5d76a449131b1 net: constify netdev->dev_addr
> date:   8 months ago
> config: mips-randconfig-r033-20220801 (https://download.01.org/0day-ci/archive/20220801/202208010713.jcG50gwa-lkp(a)intel.com/config)
> compiler: mips-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=adeef3e32146a8d2a73c399dc6f5d76a449131b1
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout adeef3e32146a8d2a73c399dc6f5d76a449131b1
>         # 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=mips SHELL=/bin/bash drivers/net/ethernet/atheros/

That's fixed by 225b0ed27e6 FWIW but the fix went into the wrong tree.
Luckily the merge window is upon us.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: drivers/net/ethernet/atheros/ag71xx.c:994:38: warning: passing argument 2 of 'ag71xx_hw_set_macaddr' discards 'const' qualifier from pointer target type
@ 2022-08-01 15:47   ` Jakub Kicinski
  0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2022-08-01 15:47 UTC (permalink / raw)
  To: kernel test robot; +Cc: kbuild-all, linux-kernel

On Mon, 1 Aug 2022 07:20:16 +0800 kernel test robot wrote:
> Hi Jakub,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   3d7cb6b04c3f3115719235cc6866b10326de34cd
> commit: adeef3e32146a8d2a73c399dc6f5d76a449131b1 net: constify netdev->dev_addr
> date:   8 months ago
> config: mips-randconfig-r033-20220801 (https://download.01.org/0day-ci/archive/20220801/202208010713.jcG50gwa-lkp@intel.com/config)
> compiler: mips-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=adeef3e32146a8d2a73c399dc6f5d76a449131b1
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout adeef3e32146a8d2a73c399dc6f5d76a449131b1
>         # 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=mips SHELL=/bin/bash drivers/net/ethernet/atheros/

That's fixed by 225b0ed27e6 FWIW but the fix went into the wrong tree.
Luckily the merge window is upon us.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-01 15:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-31 23:20 drivers/net/ethernet/atheros/ag71xx.c:994:38: warning: passing argument 2 of 'ag71xx_hw_set_macaddr' discards 'const' qualifier from pointer target type kernel test robot
2022-08-01 15:47 ` Jakub Kicinski
2022-08-01 15:47   ` Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.