All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 1/3] net: phylink: switch to using fwnode_gpiod_get_index()
Date: Tue, 15 Oct 2019 21:02:50 +0800	[thread overview]
Message-ID: <201910152157.oLLYnUSc%lkp@intel.com> (raw)
In-Reply-To: <20191014174022.94605-2-dmitry.torokhov@gmail.com>

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

Hi Dmitry,

I love your patch! Yet something to improve:

[auto build test ERROR on net/master]
[cannot apply to v5.4-rc3 next-20191014]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Dmitry-Torokhov/net-phy-switch-to-using-fwnode_gpiod_get_index/20191015-020204
config: x86_64-randconfig-a002-201941 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

All errors (new ones prefixed by >>):

   drivers/net/phy/phylink.c: In function 'phylink_parse_fixedlink':
>> drivers/net/phy/phylink.c:171:11: error: implicit declaration of function 'fwnode_gpiod_get_index' [-Werror=implicit-function-declaration]
       desc = fwnode_gpiod_get_index(fixed_node, "link", 0,
              ^
   drivers/net/phy/phylink.c:171:9: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
       desc = fwnode_gpiod_get_index(fixed_node, "link", 0,
            ^
   cc1: some warnings being treated as errors

vim +/fwnode_gpiod_get_index +171 drivers/net/phy/phylink.c

   143	
   144	static int phylink_parse_fixedlink(struct phylink *pl,
   145					   struct fwnode_handle *fwnode)
   146	{
   147		struct fwnode_handle *fixed_node;
   148		const struct phy_setting *s;
   149		struct gpio_desc *desc;
   150		u32 speed;
   151		int ret;
   152	
   153		fixed_node = fwnode_get_named_child_node(fwnode, "fixed-link");
   154		if (fixed_node) {
   155			ret = fwnode_property_read_u32(fixed_node, "speed", &speed);
   156	
   157			pl->link_config.speed = speed;
   158			pl->link_config.duplex = DUPLEX_HALF;
   159	
   160			if (fwnode_property_read_bool(fixed_node, "full-duplex"))
   161				pl->link_config.duplex = DUPLEX_FULL;
   162	
   163			/* We treat the "pause" and "asym-pause" terminology as
   164			 * defining the link partner's ability. */
   165			if (fwnode_property_read_bool(fixed_node, "pause"))
   166				pl->link_config.pause |= MLO_PAUSE_SYM;
   167			if (fwnode_property_read_bool(fixed_node, "asym-pause"))
   168				pl->link_config.pause |= MLO_PAUSE_ASYM;
   169	
   170			if (ret == 0) {
 > 171				desc = fwnode_gpiod_get_index(fixed_node, "link", 0,
   172							      GPIOD_IN, "?");
   173	
   174				if (!IS_ERR(desc))
   175					pl->link_gpio = desc;
   176				else if (desc == ERR_PTR(-EPROBE_DEFER))
   177					ret = -EPROBE_DEFER;
   178			}
   179			fwnode_handle_put(fixed_node);
   180	
   181			if (ret)
   182				return ret;
   183		} else {
   184			u32 prop[5];
   185	
   186			ret = fwnode_property_read_u32_array(fwnode, "fixed-link",
   187							     NULL, 0);
   188			if (ret != ARRAY_SIZE(prop)) {
   189				phylink_err(pl, "broken fixed-link?\n");
   190				return -EINVAL;
   191			}
   192	
   193			ret = fwnode_property_read_u32_array(fwnode, "fixed-link",
   194							     prop, ARRAY_SIZE(prop));
   195			if (!ret) {
   196				pl->link_config.duplex = prop[1] ?
   197							DUPLEX_FULL : DUPLEX_HALF;
   198				pl->link_config.speed = prop[2];
   199				if (prop[3])
   200					pl->link_config.pause |= MLO_PAUSE_SYM;
   201				if (prop[4])
   202					pl->link_config.pause |= MLO_PAUSE_ASYM;
   203			}
   204		}
   205	
   206		if (pl->link_config.speed > SPEED_1000 &&
   207		    pl->link_config.duplex != DUPLEX_FULL)
   208			phylink_warn(pl, "fixed link specifies half duplex for %dMbps link?\n",
   209				     pl->link_config.speed);
   210	
   211		bitmap_fill(pl->supported, __ETHTOOL_LINK_MODE_MASK_NBITS);
   212		linkmode_copy(pl->link_config.advertising, pl->supported);
   213		phylink_validate(pl, pl->supported, &pl->link_config);
   214	
   215		s = phy_lookup_setting(pl->link_config.speed, pl->link_config.duplex,
   216				       pl->supported, true);
   217		linkmode_zero(pl->supported);
   218		phylink_set(pl->supported, MII);
   219		phylink_set(pl->supported, Pause);
   220		phylink_set(pl->supported, Asym_Pause);
   221		if (s) {
   222			__set_bit(s->bit, pl->supported);
   223		} else {
   224			phylink_warn(pl, "fixed link %s duplex %dMbps not recognised\n",
   225				     pl->link_config.duplex == DUPLEX_FULL ? "full" : "half",
   226				     pl->link_config.speed);
   227		}
   228	
   229		linkmode_and(pl->link_config.advertising, pl->link_config.advertising,
   230			     pl->supported);
   231	
   232		pl->link_config.link = 1;
   233		pl->link_config.an_complete = 1;
   234	
   235		return 0;
   236	}
   237	

---
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: 30982 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: kbuild-all@lists.01.org, Linus Walleij <linus.walleij@linaro.org>,
	netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
	linux-kernel@vger.kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>
Subject: Re: [PATCH v2 1/3] net: phylink: switch to using fwnode_gpiod_get_index()
Date: Tue, 15 Oct 2019 21:02:50 +0800	[thread overview]
Message-ID: <201910152157.oLLYnUSc%lkp@intel.com> (raw)
In-Reply-To: <20191014174022.94605-2-dmitry.torokhov@gmail.com>

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

Hi Dmitry,

I love your patch! Yet something to improve:

[auto build test ERROR on net/master]
[cannot apply to v5.4-rc3 next-20191014]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Dmitry-Torokhov/net-phy-switch-to-using-fwnode_gpiod_get_index/20191015-020204
config: x86_64-randconfig-a002-201941 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

All errors (new ones prefixed by >>):

   drivers/net/phy/phylink.c: In function 'phylink_parse_fixedlink':
>> drivers/net/phy/phylink.c:171:11: error: implicit declaration of function 'fwnode_gpiod_get_index' [-Werror=implicit-function-declaration]
       desc = fwnode_gpiod_get_index(fixed_node, "link", 0,
              ^
   drivers/net/phy/phylink.c:171:9: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
       desc = fwnode_gpiod_get_index(fixed_node, "link", 0,
            ^
   cc1: some warnings being treated as errors

vim +/fwnode_gpiod_get_index +171 drivers/net/phy/phylink.c

   143	
   144	static int phylink_parse_fixedlink(struct phylink *pl,
   145					   struct fwnode_handle *fwnode)
   146	{
   147		struct fwnode_handle *fixed_node;
   148		const struct phy_setting *s;
   149		struct gpio_desc *desc;
   150		u32 speed;
   151		int ret;
   152	
   153		fixed_node = fwnode_get_named_child_node(fwnode, "fixed-link");
   154		if (fixed_node) {
   155			ret = fwnode_property_read_u32(fixed_node, "speed", &speed);
   156	
   157			pl->link_config.speed = speed;
   158			pl->link_config.duplex = DUPLEX_HALF;
   159	
   160			if (fwnode_property_read_bool(fixed_node, "full-duplex"))
   161				pl->link_config.duplex = DUPLEX_FULL;
   162	
   163			/* We treat the "pause" and "asym-pause" terminology as
   164			 * defining the link partner's ability. */
   165			if (fwnode_property_read_bool(fixed_node, "pause"))
   166				pl->link_config.pause |= MLO_PAUSE_SYM;
   167			if (fwnode_property_read_bool(fixed_node, "asym-pause"))
   168				pl->link_config.pause |= MLO_PAUSE_ASYM;
   169	
   170			if (ret == 0) {
 > 171				desc = fwnode_gpiod_get_index(fixed_node, "link", 0,
   172							      GPIOD_IN, "?");
   173	
   174				if (!IS_ERR(desc))
   175					pl->link_gpio = desc;
   176				else if (desc == ERR_PTR(-EPROBE_DEFER))
   177					ret = -EPROBE_DEFER;
   178			}
   179			fwnode_handle_put(fixed_node);
   180	
   181			if (ret)
   182				return ret;
   183		} else {
   184			u32 prop[5];
   185	
   186			ret = fwnode_property_read_u32_array(fwnode, "fixed-link",
   187							     NULL, 0);
   188			if (ret != ARRAY_SIZE(prop)) {
   189				phylink_err(pl, "broken fixed-link?\n");
   190				return -EINVAL;
   191			}
   192	
   193			ret = fwnode_property_read_u32_array(fwnode, "fixed-link",
   194							     prop, ARRAY_SIZE(prop));
   195			if (!ret) {
   196				pl->link_config.duplex = prop[1] ?
   197							DUPLEX_FULL : DUPLEX_HALF;
   198				pl->link_config.speed = prop[2];
   199				if (prop[3])
   200					pl->link_config.pause |= MLO_PAUSE_SYM;
   201				if (prop[4])
   202					pl->link_config.pause |= MLO_PAUSE_ASYM;
   203			}
   204		}
   205	
   206		if (pl->link_config.speed > SPEED_1000 &&
   207		    pl->link_config.duplex != DUPLEX_FULL)
   208			phylink_warn(pl, "fixed link specifies half duplex for %dMbps link?\n",
   209				     pl->link_config.speed);
   210	
   211		bitmap_fill(pl->supported, __ETHTOOL_LINK_MODE_MASK_NBITS);
   212		linkmode_copy(pl->link_config.advertising, pl->supported);
   213		phylink_validate(pl, pl->supported, &pl->link_config);
   214	
   215		s = phy_lookup_setting(pl->link_config.speed, pl->link_config.duplex,
   216				       pl->supported, true);
   217		linkmode_zero(pl->supported);
   218		phylink_set(pl->supported, MII);
   219		phylink_set(pl->supported, Pause);
   220		phylink_set(pl->supported, Asym_Pause);
   221		if (s) {
   222			__set_bit(s->bit, pl->supported);
   223		} else {
   224			phylink_warn(pl, "fixed link %s duplex %dMbps not recognised\n",
   225				     pl->link_config.duplex == DUPLEX_FULL ? "full" : "half",
   226				     pl->link_config.speed);
   227		}
   228	
   229		linkmode_and(pl->link_config.advertising, pl->link_config.advertising,
   230			     pl->supported);
   231	
   232		pl->link_config.link = 1;
   233		pl->link_config.an_complete = 1;
   234	
   235		return 0;
   236	}
   237	

---
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: 30982 bytes --]

  parent reply	other threads:[~2019-10-15 13:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 17:40 [PATCH v2 0/3] net: phy: switch to using fwnode_gpiod_get_index Dmitry Torokhov
2019-10-14 17:40 ` [PATCH v2 1/3] net: phylink: switch to using fwnode_gpiod_get_index() Dmitry Torokhov
2019-10-14 17:55   ` Russell King - ARM Linux admin
2019-10-14 20:30   ` kbuild test robot
2019-10-14 20:30     ` kbuild test robot
2019-10-15 13:02   ` kbuild test robot [this message]
2019-10-15 13:02     ` kbuild test robot
2019-10-14 17:40 ` [PATCH v2 2/3] net: phy: fixed_phy: fix use-after-free when checking link GPIO Dmitry Torokhov
2019-10-15 12:54   ` Andrew Lunn
2019-10-14 17:40 ` [PATCH v2 3/3] net: phy: fixed_phy: switch to using fwnode_gpiod_get_index Dmitry Torokhov
2019-10-14 22:37   ` kbuild test robot
2019-10-14 22:37     ` kbuild test robot
2019-10-16  3:18 ` [PATCH v2 0/3] net: phy: " David Miller
2019-11-05  0:40 ` Dmitry Torokhov
2019-11-05  0:55   ` Russell King - ARM Linux admin
2019-11-05 17:27     ` Dmitry Torokhov
2019-11-05 18:04       ` David Miller
2019-11-05 18:20         ` Dmitry Torokhov
2019-11-13 21:26           ` Dmitry Torokhov

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=201910152157.oLLYnUSc%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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.