All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [lunn:v6.3-rc3-net-next-ethtool-eee-v5 19/24] drivers/net/usb/lan78xx.c:2103:28: warning: unused variable 'phydev'
Date: Tue, 28 Mar 2023 12:17:37 +0800	[thread overview]
Message-ID: <202303281202.HNpfdToO-lkp@intel.com> (raw)

tree:   https://github.com/lunn/linux.git v6.3-rc3-net-next-ethtool-eee-v5
head:   77147a26b8a2f5214b87c01a2682aa44cc4d8814
commit: 5cf88bf4cd568a0c7a7d047e25283e77e5a0dfc8 [19/24] net: usb: lan78xx: Fixup EEE
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230328/202303281202.HNpfdToO-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/lunn/linux/commit/5cf88bf4cd568a0c7a7d047e25283e77e5a0dfc8
        git remote add lunn https://github.com/lunn/linux.git
        git fetch --no-tags lunn v6.3-rc3-net-next-ethtool-eee-v5
        git checkout 5cf88bf4cd568a0c7a7d047e25283e77e5a0dfc8
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 olddefconfig
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/usb/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303281202.HNpfdToO-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/usb/lan78xx.c: In function 'lan78xx_link_status_change':
   drivers/net/usb/lan78xx.c:2107:50: error: expected ')' before ';' token
    2107 |         ret = lan78xx_read_reg(dev, MAC_CR, &data;
         |                               ~                  ^
         |                                                  )
   drivers/net/usb/lan78xx.c:2117:34: error: expected ';' before '}' token
    2117 |         phy_print_status(phydev);
         |                                  ^
         |                                  ;
    2118 | }
         | ~                                 
   drivers/net/usb/lan78xx.c:2105:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
    2105 |         int ret;
         |             ^~~
>> drivers/net/usb/lan78xx.c:2103:28: warning: unused variable 'phydev' [-Wunused-variable]
    2103 |         struct phy_device *phydev = net->phydev;
         |                            ^~~~~~


vim +/phydev +2103 drivers/net/usb/lan78xx.c

ce85e13ad6ef47 Woojung.Huh@microchip.com 2015-09-16  2099  
ce85e13ad6ef47 Woojung.Huh@microchip.com 2015-09-16  2100  static void lan78xx_link_status_change(struct net_device *net)
ce85e13ad6ef47 Woojung.Huh@microchip.com 2015-09-16  2101  {
5cf88bf4cd568a Andrew Lunn               2023-02-15  2102  	struct lan78xx_net *dev = netdev_priv(net);
14437e3fa284f4 Woojung Huh               2016-04-25 @2103  	struct phy_device *phydev = net->phydev;
5cf88bf4cd568a Andrew Lunn               2023-02-15  2104  	u32 data;
5cf88bf4cd568a Andrew Lunn               2023-02-15  2105  	int ret;
5cf88bf4cd568a Andrew Lunn               2023-02-15  2106  
5cf88bf4cd568a Andrew Lunn               2023-02-15  2107  	ret = lan78xx_read_reg(dev, MAC_CR, &data;
5cf88bf4cd568a Andrew Lunn               2023-02-15  2108  	if (ret < 0)
5cf88bf4cd568a Andrew Lunn               2023-02-15  2109  		return;
5cf88bf4cd568a Andrew Lunn               2023-02-15  2110  
5cf88bf4cd568a Andrew Lunn               2023-02-15  2111  	if (phydev->eee_active)
5cf88bf4cd568a Andrew Lunn               2023-02-15  2112  		data |=  MAC_CR_EEE_EN_;
5cf88bf4cd568a Andrew Lunn               2023-02-15  2113  	else
5cf88bf4cd568a Andrew Lunn               2023-02-15  2114  		data &= ~MAC_CR_EEE_EN_;
5cf88bf4cd568a Andrew Lunn               2023-02-15  2115  	lan78xx_write_reg(dev, MAC_CR, data);
14437e3fa284f4 Woojung Huh               2016-04-25  2116  
e57cf3639c323e Yuiko Oshino              2023-03-01  2117  	phy_print_status(phydev);
55d7de9de6c30a Woojung.Huh@microchip.com 2015-07-30  2118  }
55d7de9de6c30a Woojung.Huh@microchip.com 2015-07-30  2119  

:::::: The code at line 2103 was first introduced by commit
:::::: 14437e3fa284f465dbbc8611fd4331ca8d60e986 lan78xx: workaround of forced 100 Full/Half duplex mode error

:::::: TO: Woojung Huh <woojung.huh@microchip.com>
:::::: CC: David S. Miller <davem@davemloft.net>

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

                 reply	other threads:[~2023-03-28  4:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202303281202.HNpfdToO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew@lunn.ch \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.