All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sven Peter <sven@svenpeter.dev>
Cc: oe-kbuild-all@lists.linux.dev, Janne Grunau <j@jannau.net>
Subject: [asahilinux:bits/170-atcphy 4/17] drivers/phy/apple/atc.c:1571:13: warning: variable 'ret' set but not used
Date: Mon, 18 Nov 2024 17:18:55 +0800	[thread overview]
Message-ID: <202411181731.KU5zf9AI-lkp@intel.com> (raw)

tree:   https://github.com/AsahiLinux/linux bits/170-atcphy
head:   58c27a2b420c2f6e49fdef1ce8b065e01a10f00c
commit: 44d2e75b8057a2d871fb6b76134828645f25df45 [4/17] WIP: phy: apple: Add Apple Type-C PHY
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20241118/202411181731.KU5zf9AI-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241118/202411181731.KU5zf9AI-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/202411181731.KU5zf9AI-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/phy/apple/atc.c: In function 'atcphy_usb3_power_on':
>> drivers/phy/apple/atc.c:1571:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
    1571 |         int ret = 0;
         |             ^~~


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

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

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

                 reply	other threads:[~2024-11-18  9:19 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=202411181731.KU5zf9AI-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=j@jannau.net \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sven@svenpeter.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.