lkml.org 
[lkml]   [2022]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/usb/cdns3/cdnsp-gadget.c:1178:6: warning: variable 'temp_64' set but not used
Hi Pawel,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c9e6606c7fe92b50a02ce51dda82586ebdf99b48
commit: 3d82904559f4f5a2622db1b21de3edf2eded7664 usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver
date: 1 year ago
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20220104/202201040405.a1EVUrln-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 104a827ea6de0cbe0f5faef4407552ede31d165c)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3d82904559f4f5a2622db1b21de3edf2eded7664
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 3d82904559f4f5a2622db1b21de3edf2eded7664
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/i915/ drivers/net/ethernet/intel/ice/ drivers/usb/cdns3/

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

All warnings (new ones prefixed by >>):

>> drivers/usb/cdns3/cdnsp-gadget.c:1178:6: warning: variable 'temp_64' set but not used [-Wunused-but-set-variable]
u64 temp_64;
^
1 warning generated.


vim +/temp_64 +1178 drivers/usb/cdns3/cdnsp-gadget.c

1173
1174 static int cdnsp_run(struct cdnsp_device *pdev,
1175 enum usb_device_speed speed)
1176 {
1177 u32 fs_speed = 0;
> 1178 u64 temp_64;
1179 u32 temp;
1180 int ret;
1181
1182 temp_64 = cdnsp_read_64(&pdev->ir_set->erst_dequeue);
1183 temp_64 &= ~ERST_PTR_MASK;
1184 temp = readl(&pdev->ir_set->irq_control);
1185 temp &= ~IMOD_INTERVAL_MASK;
1186 temp |= ((IMOD_DEFAULT_INTERVAL / 250) & IMOD_INTERVAL_MASK);
1187 writel(temp, &pdev->ir_set->irq_control);
1188
1189 temp = readl(&pdev->port3x_regs->mode_addr);
1190
1191 switch (speed) {
1192 case USB_SPEED_SUPER_PLUS:
1193 temp |= CFG_3XPORT_SSP_SUPPORT;
1194 break;
1195 case USB_SPEED_SUPER:
1196 temp &= ~CFG_3XPORT_SSP_SUPPORT;
1197 break;
1198 case USB_SPEED_HIGH:
1199 break;
1200 case USB_SPEED_FULL:
1201 fs_speed = PORT_REG6_FORCE_FS;
1202 break;
1203 default:
1204 dev_err(pdev->dev, "invalid maximum_speed parameter %d\n",
1205 speed);
1206 fallthrough;
1207 case USB_SPEED_UNKNOWN:
1208 /* Default to superspeed. */
1209 speed = USB_SPEED_SUPER;
1210 break;
1211 }
1212
1213 if (speed >= USB_SPEED_SUPER) {
1214 writel(temp, &pdev->port3x_regs->mode_addr);
1215 cdnsp_set_link_state(pdev, &pdev->usb3_port.regs->portsc,
1216 XDEV_RXDETECT);
1217 } else {
1218 cdnsp_disable_port(pdev, &pdev->usb3_port.regs->portsc);
1219 }
1220
1221 cdnsp_set_link_state(pdev, &pdev->usb2_port.regs->portsc,
1222 XDEV_RXDETECT);
1223
1224 cdnsp_gadget_ep0_desc.wMaxPacketSize = cpu_to_le16(512);
1225
1226 writel(PORT_REG6_L1_L0_HW_EN | fs_speed, &pdev->port20_regs->port_reg6);
1227
1228 ret = cdnsp_start(pdev);
1229 if (ret) {
1230 ret = -ENODEV;
1231 goto err;
1232 }
1233
1234 temp = readl(&pdev->op_regs->command);
1235 temp |= (CMD_INTE);
1236 writel(temp, &pdev->op_regs->command);
1237
1238 temp = readl(&pdev->ir_set->irq_pending);
1239 writel(IMAN_IE_SET(temp), &pdev->ir_set->irq_pending);
1240
1241 return 0;
1242 err:
1243 cdnsp_halt(pdev);
1244 return ret;
1245 }
1246

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

\
 
 \ /
  Last update: 2022-01-03 21:31    [W:0.033 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site