[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202111240700.v09U6VsG-lkp@intel.com>
Date: Wed, 24 Nov 2021 07:22:12 +0800
From: kernel test robot <lkp@...el.com>
To: Pawel Laszczak <pawell@...ence.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org, Peter Chen <peter.chen@....com>
Subject: drivers/usb/cdns3/cdnsp-gadget.c:1178:6: warning: variable 'temp_64'
set but not used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 136057256686de39cc3a07c2e39ef6bc43003ff6
commit: 3d82904559f4f5a2622db1b21de3edf2eded7664 usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver
date: 11 months ago
config: x86_64-buildonly-randconfig-r003-20211118 (https://download.01.org/0day-ci/archive/20211124/202111240700.v09U6VsG-lkp@intel.com/config.gz)
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.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
Powered by blists - more mailing lists