All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Joseph CHANG <josright123@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Rob Herring <robh+dt@kernel.org>
Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] net: Add DM9051 driver
Date: Thu, 9 Dec 2021 05:09:48 +0800	[thread overview]
Message-ID: <202112090508.QK50XeZi-lkp@intel.com> (raw)
In-Reply-To: <20211202204656.4411-3-josright123@gmail.com>

Hi Joseph,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on ce83278f313ce65a9bbd780a3e07fa3f62d82525]

url:    https://github.com/0day-ci/linux/commits/Joseph-CHANG/ADD-DM9051-NET-DEVICE/20211208-193833
base:   ce83278f313ce65a9bbd780a3e07fa3f62d82525
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20211209/202112090508.QK50XeZi-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/0day-ci/linux/commit/9ee7a9a16698431c764b4b21a0839e87f3692078
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Joseph-CHANG/ADD-DM9051-NET-DEVICE/20211208-193833
        git checkout 9ee7a9a16698431c764b4b21a0839e87f3692078
        # 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@intel.com>

All errors (new ones prefixed by >>):

   drivers/net/ethernet/davicom/dm9051.c: In function 'dm9051_read_mac_to_dev':
>> drivers/net/ethernet/davicom/dm9051.c:255:35: error: assignment of read-only location '*(ndev->dev_addr + (sizetype)i)'
     255 |                 ndev->dev_addr[i] = ior(db, DM9051_PAR + i);
         |                                   ^
   drivers/net/ethernet/davicom/dm9051.c:260:43: error: assignment of read-only location '*(ndev->dev_addr + (sizetype)i)'
     260 |                         ndev->dev_addr[i] = ior(db, DM9051_PAR + i);
         |                                           ^
   drivers/net/ethernet/davicom/dm9051.c: In function 'dm_set_mac_lock':
   drivers/net/ethernet/davicom/dm9051.c:341:57: warning: passing argument 3 of 'dm_write_eeprom_func' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     341 |                         dm_write_eeprom_func(db, i / 2, &ndev->dev_addr[i]);
         |                                                         ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/davicom/dm9051.c:156:73: note: expected 'u8 *' {aka 'unsigned char *'} but argument is of type 'const unsigned char *'
     156 | static void dm_write_eeprom_func(struct board_info *db, int offset, u8 *data)
         |                                                                     ~~~~^~~~


vim +255 drivers/net/ethernet/davicom/dm9051.c

   245	
   246	/* functions process mac address is major from EEPROM
   247	 */
   248	static int dm9051_read_mac_to_dev(struct device *dev, struct net_device *ndev,
   249					  struct board_info *db)
   250	{
   251		int i;
   252		u8 mac_fix[ETH_ALEN] = { 0x00, 0x60, 0x6e, 0x90, 0x51, 0xee };
   253	
   254		for (i = 0; i < ETH_ALEN; i++)
 > 255			ndev->dev_addr[i] = ior(db, DM9051_PAR + i);
   256		if (!is_valid_ether_addr(ndev->dev_addr)) {
   257			for (i = 0; i < ETH_ALEN; i++)
   258				iow(db, DM9051_PAR + i, mac_fix[i]);
   259			for (i = 0; i < ETH_ALEN; i++)
   260				ndev->dev_addr[i] = ior(db, DM9051_PAR + i);
   261			dev_info(dev, "dm9 [reg_netdev][%s][chip MAC: %pM (%s)]\n",
   262				 ndev->name, ndev->dev_addr, "FIX-1");
   263			return 0;
   264		}
   265		return 1;
   266	}
   267	

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 2/2] net: Add DM9051 driver
Date: Thu, 09 Dec 2021 05:09:48 +0800	[thread overview]
Message-ID: <202112090508.QK50XeZi-lkp@intel.com> (raw)
In-Reply-To: <20211202204656.4411-3-josright123@gmail.com>

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

Hi Joseph,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on ce83278f313ce65a9bbd780a3e07fa3f62d82525]

url:    https://github.com/0day-ci/linux/commits/Joseph-CHANG/ADD-DM9051-NET-DEVICE/20211208-193833
base:   ce83278f313ce65a9bbd780a3e07fa3f62d82525
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20211209/202112090508.QK50XeZi-lkp(a)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/0day-ci/linux/commit/9ee7a9a16698431c764b4b21a0839e87f3692078
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Joseph-CHANG/ADD-DM9051-NET-DEVICE/20211208-193833
        git checkout 9ee7a9a16698431c764b4b21a0839e87f3692078
        # 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@intel.com>

All errors (new ones prefixed by >>):

   drivers/net/ethernet/davicom/dm9051.c: In function 'dm9051_read_mac_to_dev':
>> drivers/net/ethernet/davicom/dm9051.c:255:35: error: assignment of read-only location '*(ndev->dev_addr + (sizetype)i)'
     255 |                 ndev->dev_addr[i] = ior(db, DM9051_PAR + i);
         |                                   ^
   drivers/net/ethernet/davicom/dm9051.c:260:43: error: assignment of read-only location '*(ndev->dev_addr + (sizetype)i)'
     260 |                         ndev->dev_addr[i] = ior(db, DM9051_PAR + i);
         |                                           ^
   drivers/net/ethernet/davicom/dm9051.c: In function 'dm_set_mac_lock':
   drivers/net/ethernet/davicom/dm9051.c:341:57: warning: passing argument 3 of 'dm_write_eeprom_func' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     341 |                         dm_write_eeprom_func(db, i / 2, &ndev->dev_addr[i]);
         |                                                         ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/davicom/dm9051.c:156:73: note: expected 'u8 *' {aka 'unsigned char *'} but argument is of type 'const unsigned char *'
     156 | static void dm_write_eeprom_func(struct board_info *db, int offset, u8 *data)
         |                                                                     ~~~~^~~~


vim +255 drivers/net/ethernet/davicom/dm9051.c

   245	
   246	/* functions process mac address is major from EEPROM
   247	 */
   248	static int dm9051_read_mac_to_dev(struct device *dev, struct net_device *ndev,
   249					  struct board_info *db)
   250	{
   251		int i;
   252		u8 mac_fix[ETH_ALEN] = { 0x00, 0x60, 0x6e, 0x90, 0x51, 0xee };
   253	
   254		for (i = 0; i < ETH_ALEN; i++)
 > 255			ndev->dev_addr[i] = ior(db, DM9051_PAR + i);
   256		if (!is_valid_ether_addr(ndev->dev_addr)) {
   257			for (i = 0; i < ETH_ALEN; i++)
   258				iow(db, DM9051_PAR + i, mac_fix[i]);
   259			for (i = 0; i < ETH_ALEN; i++)
   260				ndev->dev_addr[i] = ior(db, DM9051_PAR + i);
   261			dev_info(dev, "dm9 [reg_netdev][%s][chip MAC: %pM (%s)]\n",
   262				 ndev->name, ndev->dev_addr, "FIX-1");
   263			return 0;
   264		}
   265		return 1;
   266	}
   267	

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

  parent reply	other threads:[~2021-12-08 21:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02 20:46 [PATCH 0/2] *** ADD DM9051 NET DEVICE *** Joseph CHANG
2021-12-02 20:46 ` [PATCH 1/2] yaml: Add dm9051 SPI network yaml file Joseph CHANG
2021-12-08 13:44   ` Rob Herring
2021-12-02 20:46 ` [PATCH 2/2] net: Add DM9051 driver Joseph CHANG
2021-12-08 14:41   ` kernel test robot
2021-12-08 14:41     ` kernel test robot
2021-12-08 21:09   ` kernel test robot [this message]
2021-12-08 21:09     ` kernel test robot
2021-12-09  2:08   ` Andrew Lunn
2021-12-08 21:39 ` [PATCH 0/2] *** ADD DM9051 NET DEVICE *** Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202112090508.QK50XeZi-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=josright123@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.