All of lore.kernel.org
 help / color / mirror / Atom feed
* [asahilinux:bits/170-atcphy 3/4] drivers/phy/apple/atc.c:1568:6: warning: variable 'ret' set but not used
@ 2023-03-09  5:21 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-03-09  5:21 UTC (permalink / raw)
  To: Sven Peter; +Cc: llvm, oe-kbuild-all, Hector Martin

tree:   https://github.com/AsahiLinux/linux bits/170-atcphy
head:   8f9e579d464e5177c80afd27daccf6fd83ee7d83
commit: a733dfba96c49ca607193fe85342aa2e4a526a34 [3/4] WIP: phy: apple: Add Apple Type-C PHY
config: arm64-randconfig-r023-20230308 (https://download.01.org/0day-ci/archive/20230309/202303091328.mMDBpiMk-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7)
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
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/AsahiLinux/linux/commit/a733dfba96c49ca607193fe85342aa2e4a526a34
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux bits/170-atcphy
        git checkout a733dfba96c49ca607193fe85342aa2e4a526a34
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/phy/apple/

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/202303091328.mMDBpiMk-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/phy/apple/atc.c:1568:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
           int ret = 0;
               ^
   1 warning generated.


vim +/ret +1568 drivers/phy/apple/atc.c

  1563	
  1564	static int atcphy_usb3_power_on(struct phy *phy)
  1565	{
  1566		struct apple_atcphy *atcphy = phy_get_drvdata(phy);
  1567		enum atcphy_pipehandler_state state;
> 1568		int ret = 0;
  1569	
  1570		/*
  1571		 * Both usb role switch and mux set work will be running concurrently.
  1572		 * Make sure atcphy_mux_set_work is done bringing up ATCPHY before
  1573		 * trying to switch dwc3 to the correct PHY.
  1574		 */
  1575		mutex_lock(&atcphy->lock);
  1576		if (atcphy->mode != atcphy->target_mode) {
  1577			reinit_completion(&atcphy->atcphy_online_event);
  1578			mutex_unlock(&atcphy->lock);
  1579			wait_for_completion_timeout(&atcphy->atcphy_online_event,
  1580						msecs_to_jiffies(1000));
  1581			mutex_lock(&atcphy->lock);
  1582		}
  1583	
  1584		if (atcphy->mode != atcphy->target_mode) {
  1585			dev_err(atcphy->dev, "ATCPHY did not come up; won't allow dwc3 to come up.\n");
  1586			return -EINVAL;
  1587		}
  1588	
  1589		atcphy->dwc3_online = true;
  1590		state = atcphy_modes[atcphy->mode].pipehandler_state;
  1591		switch (state) {
  1592		case ATCPHY_PIPEHANDLER_STATE_USB2:
  1593		case ATCPHY_PIPEHANDLER_STATE_USB3:
  1594			ret = atcphy_configure_pipehandler(atcphy, state);
  1595			break;
  1596	
  1597		case ATCPHY_PIPEHANDLER_STATE_INVALID:
  1598		default:
  1599			dev_warn(atcphy->dev, "Invalid state %d in usb3_set_phy\n",
  1600				 state);
  1601			ret = -EINVAL;
  1602		}
  1603	
  1604		mutex_unlock(&atcphy->lock);
  1605	
  1606		return 0;
  1607	}
  1608	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [asahilinux:bits/170-atcphy 3/4] drivers/phy/apple/atc.c:1568:6: warning: variable 'ret' set but not used
@ 2023-04-04  5:50 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-04-04  5:50 UTC (permalink / raw)
  To: Sven Peter; +Cc: llvm, oe-kbuild-all, Hector Martin

tree:   https://github.com/AsahiLinux/linux bits/170-atcphy
head:   da07f9d3f701c3bc19ad994b291b6808f36ed542
commit: be52206a8e1804d0b783b504d9723814ad2025d6 [3/4] WIP: phy: apple: Add Apple Type-C PHY
config: arm64-randconfig-r032-20230403 (https://download.01.org/0day-ci/archive/20230404/202304041309.SD7FvIC1-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7)
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
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/AsahiLinux/linux/commit/be52206a8e1804d0b783b504d9723814ad2025d6
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux bits/170-atcphy
        git checkout be52206a8e1804d0b783b504d9723814ad2025d6
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/phy/apple/

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/202304041309.SD7FvIC1-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/phy/apple/atc.c:1568:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
           int ret = 0;
               ^
   1 warning generated.


vim +/ret +1568 drivers/phy/apple/atc.c

  1563	
  1564	static int atcphy_usb3_power_on(struct phy *phy)
  1565	{
  1566		struct apple_atcphy *atcphy = phy_get_drvdata(phy);
  1567		enum atcphy_pipehandler_state state;
> 1568		int ret = 0;
  1569	
  1570		/*
  1571		 * Both usb role switch and mux set work will be running concurrently.
  1572		 * Make sure atcphy_mux_set_work is done bringing up ATCPHY before
  1573		 * trying to switch dwc3 to the correct PHY.
  1574		 */
  1575		mutex_lock(&atcphy->lock);
  1576		if (atcphy->mode != atcphy->target_mode) {
  1577			reinit_completion(&atcphy->atcphy_online_event);
  1578			mutex_unlock(&atcphy->lock);
  1579			wait_for_completion_timeout(&atcphy->atcphy_online_event,
  1580						msecs_to_jiffies(1000));
  1581			mutex_lock(&atcphy->lock);
  1582		}
  1583	
  1584		if (atcphy->mode != atcphy->target_mode) {
  1585			dev_err(atcphy->dev, "ATCPHY did not come up; won't allow dwc3 to come up.\n");
  1586			return -EINVAL;
  1587		}
  1588	
  1589		atcphy->dwc3_online = true;
  1590		state = atcphy_modes[atcphy->mode].pipehandler_state;
  1591		switch (state) {
  1592		case ATCPHY_PIPEHANDLER_STATE_USB2:
  1593		case ATCPHY_PIPEHANDLER_STATE_USB3:
  1594			ret = atcphy_configure_pipehandler(atcphy, state);
  1595			break;
  1596	
  1597		case ATCPHY_PIPEHANDLER_STATE_INVALID:
  1598		default:
  1599			dev_warn(atcphy->dev, "Invalid state %d in usb3_set_phy\n",
  1600				 state);
  1601			ret = -EINVAL;
  1602		}
  1603	
  1604		mutex_unlock(&atcphy->lock);
  1605	
  1606		return 0;
  1607	}
  1608	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-04  5:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-09  5:21 [asahilinux:bits/170-atcphy 3/4] drivers/phy/apple/atc.c:1568:6: warning: variable 'ret' set but not used kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2023-04-04  5:50 kernel test robot

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.