mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Subject: Re: [PATCH net-next] net: ibm/emac: Constify struct mii_phy_def
Date: Thu, 8 Aug 2024 08:42:28 +0800	[thread overview]
Message-ID: <202408080850.QKqTbf5o-lkp@intel.com> (raw)
In-Reply-To: <dfc7876d660d700a840e64c35de0a6519e117539.1723031352.git.christophe.jaillet@wanadoo.fr>

Hi Christophe,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Christophe-JAILLET/net-ibm-emac-Constify-struct-mii_phy_def/20240807-195146
base:   net-next/main
patch link:    https://lore.kernel.org/r/dfc7876d660d700a840e64c35de0a6519e117539.1723031352.git.christophe.jaillet%40wanadoo.fr
patch subject: [PATCH net-next] net: ibm/emac: Constify struct mii_phy_def
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20240808/202408080850.QKqTbf5o-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 423aec6573df4424f90555468128e17073ddc69e)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240808/202408080850.QKqTbf5o-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408080850.QKqTbf5o-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/net/ethernet/ibm/emac/core.c:28:
   In file included from include/linux/pci.h:38:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/powerpc/include/asm/io.h:24:
   In file included from include/linux/mm.h:2228:
   include/linux/vmstat.h:500:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     500 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     501 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:507:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     507 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     508 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:519:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     519 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     520 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:528:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     528 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     529 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/ibm/emac/core.c:2648:23: error: cannot assign to non-static data member 'def' with const-qualified type 'const struct mii_phy_def *'
    2648 |         dev->phy.def->phy_id = dev->phy_dev->drv->phy_id;
         |         ~~~~~~~~~~~~~~~~~~~~ ^
   drivers/net/ethernet/ibm/emac/phy.h:50:28: note: non-static data member 'def' declared const here
      50 |         const struct mii_phy_def *def;
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/net/ethernet/ibm/emac/core.c:2649:28: error: cannot assign to non-static data member 'def' with const-qualified type 'const struct mii_phy_def *'
    2649 |         dev->phy.def->phy_id_mask = dev->phy_dev->drv->phy_id_mask;
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
   drivers/net/ethernet/ibm/emac/phy.h:50:28: note: non-static data member 'def' declared const here
      50 |         const struct mii_phy_def *def;
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/net/ethernet/ibm/emac/core.c:2650:21: error: cannot assign to non-static data member 'def' with const-qualified type 'const struct mii_phy_def *'
    2650 |         dev->phy.def->name = dev->phy_dev->drv->name;
         |         ~~~~~~~~~~~~~~~~~~ ^
   drivers/net/ethernet/ibm/emac/phy.h:50:28: note: non-static data member 'def' declared const here
      50 |         const struct mii_phy_def *def;
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/net/ethernet/ibm/emac/core.c:2651:20: error: cannot assign to non-static data member 'def' with const-qualified type 'const struct mii_phy_def *'
    2651 |         dev->phy.def->ops = &emac_dt_mdio_phy_ops;
         |         ~~~~~~~~~~~~~~~~~ ^
   drivers/net/ethernet/ibm/emac/phy.h:50:28: note: non-static data member 'def' declared const here
      50 |         const struct mii_phy_def *def;
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/net/ethernet/ibm/emac/core.c:2818:25: error: cannot assign to non-static data member 'def' with const-qualified type 'const struct mii_phy_def *'
    2818 |         dev->phy.def->features &= ~dev->phy_feat_exc;
         |         ~~~~~~~~~~~~~~~~~~~~~~ ^
   drivers/net/ethernet/ibm/emac/phy.h:50:28: note: non-static data member 'def' declared const here
      50 |         const struct mii_phy_def *def;
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   5 warnings and 5 errors generated.


vim +2648 drivers/net/ethernet/ibm/emac/core.c

a577ca6badb526 Christian Lamparter 2017-02-20  2632  
a577ca6badb526 Christian Lamparter 2017-02-20  2633  static int emac_dt_phy_connect(struct emac_instance *dev,
a577ca6badb526 Christian Lamparter 2017-02-20  2634  			       struct device_node *phy_handle)
a577ca6badb526 Christian Lamparter 2017-02-20  2635  {
a577ca6badb526 Christian Lamparter 2017-02-20  2636  	dev->phy.def = devm_kzalloc(&dev->ofdev->dev, sizeof(*dev->phy.def),
a577ca6badb526 Christian Lamparter 2017-02-20  2637  				    GFP_KERNEL);
a577ca6badb526 Christian Lamparter 2017-02-20  2638  	if (!dev->phy.def)
a577ca6badb526 Christian Lamparter 2017-02-20  2639  		return -ENOMEM;
a577ca6badb526 Christian Lamparter 2017-02-20  2640  
a577ca6badb526 Christian Lamparter 2017-02-20  2641  	dev->phy_dev = of_phy_connect(dev->ndev, phy_handle, &emac_adjust_link,
a577ca6badb526 Christian Lamparter 2017-02-20  2642  				      0, dev->phy_mode);
a577ca6badb526 Christian Lamparter 2017-02-20  2643  	if (!dev->phy_dev) {
a577ca6badb526 Christian Lamparter 2017-02-20  2644  		dev_err(&dev->ofdev->dev, "failed to connect to PHY.\n");
a577ca6badb526 Christian Lamparter 2017-02-20  2645  		return -ENODEV;
a577ca6badb526 Christian Lamparter 2017-02-20  2646  	}
a577ca6badb526 Christian Lamparter 2017-02-20  2647  
a577ca6badb526 Christian Lamparter 2017-02-20 @2648  	dev->phy.def->phy_id = dev->phy_dev->drv->phy_id;
a577ca6badb526 Christian Lamparter 2017-02-20  2649  	dev->phy.def->phy_id_mask = dev->phy_dev->drv->phy_id_mask;
a577ca6badb526 Christian Lamparter 2017-02-20  2650  	dev->phy.def->name = dev->phy_dev->drv->name;
a577ca6badb526 Christian Lamparter 2017-02-20  2651  	dev->phy.def->ops = &emac_dt_mdio_phy_ops;
3c1bcc8614db10 Andrew Lunn         2018-11-10  2652  	ethtool_convert_link_mode_to_legacy_u32(&dev->phy.features,
3c1bcc8614db10 Andrew Lunn         2018-11-10  2653  						dev->phy_dev->supported);
a577ca6badb526 Christian Lamparter 2017-02-20  2654  	dev->phy.address = dev->phy_dev->mdio.addr;
a577ca6badb526 Christian Lamparter 2017-02-20  2655  	dev->phy.mode = dev->phy_dev->interface;
a577ca6badb526 Christian Lamparter 2017-02-20  2656  	return 0;
a577ca6badb526 Christian Lamparter 2017-02-20  2657  }
a577ca6badb526 Christian Lamparter 2017-02-20  2658  

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

      parent reply	other threads:[~2024-08-08  0:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07 11:50 Christophe JAILLET
2024-08-07 13:57 ` Andrew Lunn
2024-08-07 23:00 ` kernel test robot
2024-08-08  6:32   ` Christophe JAILLET
2024-08-08  0:42 ` kernel test robot [this message]

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=202408080850.QKqTbf5o-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®