lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 30 Jun 2023 21:46:56 +0800
From:   kernel test robot <lkp@...el.com>
To:     Vivek Pernamitta <quic_vpernami@...cinc.com>, mhi@...ts.linux.dev
Cc:     oe-kbuild-all@...ts.linux.dev, mrana@...cinc.com,
        quic_qianyu@...cinc.com, manivannan.sadhasivam@...aro.org,
        Vivek Pernamitta <quic_vpernami@...cinc.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH V1] net: mhi : Add support to enable ethernet interface

Hi Vivek,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]
[also build test WARNING on net/main linus/master v6.4 next-20230630]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Vivek-Pernamitta/net-mhi-Add-support-to-enable-ethernet-interface/20230630-174659
base:   net-next/main
patch link:    https://lore.kernel.org/r/1688118281-13032-1-git-send-email-quic_vpernami%40quicinc.com
patch subject: [PATCH V1] net: mhi : Add support to enable ethernet interface
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20230630/202306302115.IYBBlrFn-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230630/202306302115.IYBBlrFn-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306302115.IYBBlrFn-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/mhi_net.c: In function 'mhi_net_newlink':
>> drivers/net/mhi_net.c:327:37: warning: passing argument 1 of 'eth_random_addr' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     327 |                 eth_random_addr(ndev->dev_addr);
         |                                 ~~~~^~~~~~~~~~
   In file included from drivers/net/mhi_net.c:14:
   include/linux/etherdevice.h:230:40: note: expected 'u8 *' {aka 'unsigned char *'} but argument is of type 'const unsigned char *'
     230 | static inline void eth_random_addr(u8 *addr)
         |                                    ~~~~^~~~


vim +327 drivers/net/mhi_net.c

   320	
   321	static int mhi_net_newlink(struct mhi_device *mhi_dev, struct net_device *ndev, bool eth_dev)
   322	{
   323		struct mhi_net_dev *mhi_netdev;
   324		int err;
   325	
   326		if (eth_dev) {
 > 327			eth_random_addr(ndev->dev_addr);
   328			if (!is_valid_ether_addr(ndev->dev_addr))
   329				return -EADDRNOTAVAIL;
   330		}
   331	
   332		mhi_netdev = netdev_priv(ndev);
   333	
   334		dev_set_drvdata(&mhi_dev->dev, mhi_netdev);
   335		mhi_netdev->ndev = ndev;
   336		mhi_netdev->mdev = mhi_dev;
   337		mhi_netdev->skbagg_head = NULL;
   338		mhi_netdev->mru = mhi_dev->mhi_cntrl->mru;
   339		mhi_netdev->ethernet_if = eth_dev;
   340	
   341		INIT_DELAYED_WORK(&mhi_netdev->rx_refill, mhi_net_rx_refill_work);
   342		u64_stats_init(&mhi_netdev->stats.rx_syncp);
   343		u64_stats_init(&mhi_netdev->stats.tx_syncp);
   344	
   345		/* Start MHI channels */
   346		err = mhi_prepare_for_transfer(mhi_dev);
   347		if (err)
   348			return err;
   349	
   350		/* Number of transfer descriptors determines size of the queue */
   351		mhi_netdev->rx_queue_sz = mhi_get_free_desc_count(mhi_dev, DMA_FROM_DEVICE);
   352	
   353		err = register_netdev(ndev);
   354		if (err)
   355			return err;
   356	
   357		return 0;
   358	}
   359	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ