* [asahilinux:bits/170-atcphy 3/4] drivers/phy/apple/atc.c:1571:6: warning: variable 'ret' set but not used
@ 2023-07-05 15:04 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-07-05 15:04 UTC (permalink / raw)
To: Sven Peter; +Cc: llvm, oe-kbuild-all, Hector Martin
tree: https://github.com/AsahiLinux/linux bits/170-atcphy
head: e3ed55ca947e67fac029ec3917d1f2ca6371d360
commit: 42ffc8978cdb02ee0131e1315bd7548f92f09690 [3/4] WIP: phy: apple: Add Apple Type-C PHY
config: arm64-randconfig-r024-20230705 (https://download.01.org/0day-ci/archive/20230705/202307052242.iiAtRcgJ-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230705/202307052242.iiAtRcgJ-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/202307052242.iiAtRcgJ-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/phy/apple/atc.c:1571:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
1571 | int ret = 0;
| ^
1 warning generated.
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-05 15:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-05 15:04 [asahilinux:bits/170-atcphy 3/4] drivers/phy/apple/atc.c:1571:6: warning: variable 'ret' set but not used kernel test robot
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).