netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: kbuild-all@01.org, andrew@lunn.ch,
	vivien.didelot@savoirfairelinux.com, netdev@vger.kernel.org,
	f.fainelli@gmail.com, buytenh@marvell.com,
	buytenh@wantstofly.org, nico@marvell.com
Subject: Re: [RFD] mv88e6060: Allow the driver to be probed from device tree
Date: Fri, 7 Dec 2018 02:32:01 +0800	[thread overview]
Message-ID: <201812070218.O9FSheSi%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181206130246.GC22343@amd>

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

Hi Pavel,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]
[also build test WARNING on v4.20-rc5 next-20181206]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Pavel-Machek/mv88e6060-Allow-the-driver-to-be-probed-from-device-tree/20181207-013430
config: i386-randconfig-x007-201848 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/net/dsa/mv88e6060.c: In function 'mv88e6060_probe':
>> drivers/net/dsa/mv88e6060.c:316:16: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      char *name = mv88e6060_get_name(mdiodev->bus, addr);
                   ^~~~~~~~~~~~~~~~~~
>> drivers/net/dsa/mv88e6060.c:317:34: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'struct mii_bus *' [-Wformat=]
      printk("e6060: got name %s @ %lx %lx\n", name, mdiodev->bus, addr);
                                   ~~^               ~~~~~~~~~~~~
>> drivers/net/dsa/mv88e6060.c:317:38: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'int' [-Wformat=]
      printk("e6060: got name %s @ %lx %lx\n", name, mdiodev->bus, addr);
                                       ~~^
                                       %x
   drivers/net/dsa/mv88e6060.c:307:6: warning: unused variable 'err' [-Wunused-variable]
     int err;
         ^~~
   drivers/net/dsa/mv88e6060.c:306:6: warning: unused variable 'eeprom_len' [-Wunused-variable]
     u32 eeprom_len;
         ^~~~~~~~~~
   drivers/net/dsa/mv88e6060.c:304:31: warning: unused variable 'compat_info' [-Wunused-variable]
     const struct mv88e6060_info *compat_info;
                                  ^~~~~~~~~~~
   drivers/net/dsa/mv88e6060.c:303:22: warning: unused variable 'np' [-Wunused-variable]
     struct device_node *np = dev->of_node;
                         ^~
   drivers/net/dsa/mv88e6060.c: In function 'mv88e6060_remove':
   drivers/net/dsa/mv88e6060.c:344:25: warning: unused variable 'chip' [-Wunused-variable]
     struct mv88e6060_chip *chip = ds->priv;
                            ^~~~
   Cyclomatic Complexity 1 include/linux/device.h:devm_kzalloc
   Cyclomatic Complexity 1 include/linux/device.h:dev_get_drvdata
   Cyclomatic Complexity 1 include/linux/device.h:dev_set_drvdata
   Cyclomatic Complexity 1 include/linux/etherdevice.h:eth_random_addr
   Cyclomatic Complexity 1 include/net/dsa.h:dsa_to_port
   Cyclomatic Complexity 1 include/net/dsa.h:dsa_is_cpu_port
   Cyclomatic Complexity 1 include/net/dsa.h:dsa_is_user_port
   Cyclomatic Complexity 3 include/net/dsa.h:dsa_user_ports
   Cyclomatic Complexity 1 drivers/net/dsa/mv88e6060.c:mv88e6060_get_tag_protocol
   Cyclomatic Complexity 2 drivers/net/dsa/mv88e6060.c:alloc_priv
   Cyclomatic Complexity 2 drivers/net/dsa/mv88e6060.c:mv88e6060_port_to_phy_addr
   Cyclomatic Complexity 1 drivers/net/dsa/mv88e6060.c:mv88e6060_init
   Cyclomatic Complexity 0 drivers/net/dsa/mv88e6060.c:mv88e6060_remove
   Cyclomatic Complexity 1 drivers/net/dsa/mv88e6060.c:reg_read
   Cyclomatic Complexity 2 drivers/net/dsa/mv88e6060.c:mv88e6060_phy_read
   Cyclomatic Complexity 1 drivers/net/dsa/mv88e6060.c:reg_write
   Cyclomatic Complexity 2 drivers/net/dsa/mv88e6060.c:mv88e6060_phy_write
   Cyclomatic Complexity 3 drivers/net/dsa/mv88e6060.c:mv88e6060_setup_global
   Cyclomatic Complexity 4 drivers/net/dsa/mv88e6060.c:mv88e6060_setup_addr
   Cyclomatic Complexity 6 drivers/net/dsa/mv88e6060.c:mv88e6060_setup_port
   Cyclomatic Complexity 13 drivers/net/dsa/mv88e6060.c:mv88e6060_switch_reset
   Cyclomatic Complexity 6 drivers/net/dsa/mv88e6060.c:mv88e6060_setup
   Cyclomatic Complexity 5 drivers/net/dsa/mv88e6060.c:mv88e6060_get_name
   Cyclomatic Complexity 3 drivers/net/dsa/mv88e6060.c:mv88e6060_probe
   Cyclomatic Complexity 3 drivers/net/dsa/mv88e6060.c:mv88e6060_drv_probe
   Cyclomatic Complexity 1 drivers/net/dsa/mv88e6060.c:mv88e6060_cleanup
   Cyclomatic Complexity 1 drivers/net/dsa/mv88e6060.c:_GLOBAL__sub_I_00100_0_mv88e6060.c
   Cyclomatic Complexity 1 drivers/net/dsa/mv88e6060.c:_GLOBAL__sub_D_00100_1_mv88e6060.c

vim +/const +316 drivers/net/dsa/mv88e6060.c

   299	
   300	static int mv88e6060_probe(struct mdio_device *mdiodev)
   301	{
   302		struct device *dev = &mdiodev->dev;
   303		struct device_node *np = dev->of_node;
   304		const struct mv88e6060_info *compat_info;
   305		struct mv88e6060_priv *chip;
   306		u32 eeprom_len;
   307		int err;
   308	
   309		int addr = 0x10 /* mdiodev->addr */ ;
   310	
   311		chip = alloc_priv(dev, mdiodev->bus, addr);
   312		if (!chip)
   313			return -ENOMEM;
   314	
   315		{
 > 316			char *name = mv88e6060_get_name(mdiodev->bus, addr);
 > 317			printk("e6060: got name %s @ %lx %lx\n", name, mdiodev->bus, addr);
   318		}
   319		{
   320		  	struct dsa_switch *ds;
   321	
   322			ds = dsa_switch_alloc(dev, 6);
   323			if (!ds)
   324				return -ENOMEM;
   325	
   326			ds->priv = chip;
   327			ds->dev = dev;
   328			ds->ops = &mv88e6060_switch_ops;
   329			ds->ageing_time_min = 15000;
   330			ds->ageing_time_max = 15000 * U8_MAX;
   331	
   332			dev_set_drvdata(dev, ds);
   333	
   334			return dsa_register_switch(ds);
   335		}
   336	
   337		printk("e6060: probe ok\n");
   338		return 0;
   339	}
   340	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23961 bytes --]

  reply	other threads:[~2018-12-06 18:32 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 19:51 DSA support for Marvell 88e6065 switch Pavel Machek
2018-11-15 20:26 ` Andrew Lunn
2018-11-18 18:07   ` Pavel Machek
2018-11-18 18:20     ` Andrew Lunn
2018-11-18 20:15       ` Pavel Machek
2018-11-19  3:25         ` Andrew Lunn
2018-11-22 13:21           ` Pavel Machek
2018-11-22 15:33             ` Lennert Buytenhek
2018-11-22 20:27               ` Pavel Machek
2018-12-03  1:42                 ` Lennert Buytenhek
2018-12-05 20:46                   ` Pavel Machek
2018-12-05 22:20                     ` Florian Fainelli
2018-12-06 14:40                       ` Pavel Machek
2019-01-29 22:57       ` mv88e6xxx -- DSA support for Marvell 88e6065 switch (and maybe 88e6060?) Pavel Machek
2019-01-29 23:12         ` Andrew Lunn
2019-01-29 23:21         ` Vivien Didelot
2018-12-06 13:00 ` Well supported DSA switches, support for Marvell 88e6065 switch Pavel Machek
2018-12-06 13:01   ` [PATCH] mv88e6060: Warn about errors Pavel Machek
2018-12-06 20:21     ` David Miller
2018-12-06 20:36       ` Pavel Machek
2018-12-06 13:02   ` [RFD] mv88e6060: Allow the driver to be probed from device tree Pavel Machek
2018-12-06 18:32     ` kbuild test robot [this message]
2018-12-15  8:41     ` kbuild test robot
2018-12-06 13:03   ` mv88e6060: Turn e6060 driver into e6065 driver Pavel Machek
2018-12-06 20:23     ` David Miller
2018-12-06 20:35       ` Pavel Machek
2018-12-06 13:05   ` [PATCH] dsa device tree bindings: fix typo and wrong example Pavel Machek
2018-12-06 13:28     ` Vokáč Michal
2019-01-07 18:49       ` Pavel Machek
2019-01-07 18:53         ` Florian Fainelli
2018-12-06 13:06   ` [RFC] tag_daddr: add tagging scheme used by Marvel 88e6065 switch Pavel Machek

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=201812070218.O9FSheSi%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=andrew@lunn.ch \
    --cc=buytenh@marvell.com \
    --cc=buytenh@wantstofly.org \
    --cc=f.fainelli@gmail.com \
    --cc=kbuild-all@01.org \
    --cc=netdev@vger.kernel.org \
    --cc=nico@marvell.com \
    --cc=pavel@ucw.cz \
    --cc=vivien.didelot@savoirfairelinux.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;
as well as URLs for NNTP newsgroup(s).