* [ogabbay:next 15/16] drivers/misc/habanalabs/common/firmware_if.c:1195:14: sparse: sparse: incorrect type in argument 2 (different base types)
@ 2021-05-02 9:51 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-05-02 9:51 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6664 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git next
head: 0d0e8e8ec8dfdbbeba5f62002d609c11082893dc
commit: 47bd5c6d3178737e4ce9d0781063848c9ca116b6 [15/16] habanalabs: load boot fit to device
config: x86_64-randconfig-s021-20210502 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git/commit/?id=47bd5c6d3178737e4ce9d0781063848c9ca116b6
git remote add ogabbay https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
git fetch --no-tags ogabbay next
git checkout 47bd5c6d3178737e4ce9d0781063848c9ca116b6
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/misc/habanalabs/common/firmware_if.c:181:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] fence @@ got unsigned int @@
drivers/misc/habanalabs/common/firmware_if.c:181:20: sparse: expected restricted __le32 [usertype] fence
drivers/misc/habanalabs/common/firmware_if.c:181:20: sparse: got unsigned int
>> drivers/misc/habanalabs/common/firmware_if.c:1195:14: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int [usertype] reg @@ got restricted __le32 [usertype] cpu_cmd_status_to_host @@
drivers/misc/habanalabs/common/firmware_if.c:1195:14: sparse: expected unsigned int [usertype] reg
drivers/misc/habanalabs/common/firmware_if.c:1195:14: sparse: got restricted __le32 [usertype] cpu_cmd_status_to_host
>> drivers/misc/habanalabs/common/firmware_if.c:1195:14: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int [usertype] reg @@ got restricted __le32 [usertype] cpu_cmd_status_to_host @@
drivers/misc/habanalabs/common/firmware_if.c:1195:14: sparse: expected unsigned int [usertype] reg
drivers/misc/habanalabs/common/firmware_if.c:1195:14: sparse: got restricted __le32 [usertype] cpu_cmd_status_to_host
vim +1195 drivers/misc/habanalabs/common/firmware_if.c
08cd6811265925 Ohad Sharabi 2021-04-08 1169
08cd6811265925 Ohad Sharabi 2021-04-08 1170 /**
08cd6811265925 Ohad Sharabi 2021-04-08 1171 * hl_fw_dynamic_wait_for_status - wait for status in dynamic FW load
08cd6811265925 Ohad Sharabi 2021-04-08 1172 *
08cd6811265925 Ohad Sharabi 2021-04-08 1173 * @hdev: pointer to the habanalabs device structure
08cd6811265925 Ohad Sharabi 2021-04-08 1174 * @fw_loader: managing structure for loading device's FW
08cd6811265925 Ohad Sharabi 2021-04-08 1175 * @expected_status: expected status to wait for
08cd6811265925 Ohad Sharabi 2021-04-08 1176 * @timeout: timeout for status wait
08cd6811265925 Ohad Sharabi 2021-04-08 1177 *
08cd6811265925 Ohad Sharabi 2021-04-08 1178 * @return 0 on success, otherwise non-zero error code
08cd6811265925 Ohad Sharabi 2021-04-08 1179 *
08cd6811265925 Ohad Sharabi 2021-04-08 1180 * waiting for status from FW include polling the FW status register until
08cd6811265925 Ohad Sharabi 2021-04-08 1181 * expected status is received or timeout occurs (whatever occurs first).
08cd6811265925 Ohad Sharabi 2021-04-08 1182 */
08cd6811265925 Ohad Sharabi 2021-04-08 1183 static int hl_fw_dynamic_wait_for_status(struct hl_device *hdev,
08cd6811265925 Ohad Sharabi 2021-04-08 1184 struct fw_load_mgr *fw_loader,
08cd6811265925 Ohad Sharabi 2021-04-08 1185 enum comms_sts expected_status,
08cd6811265925 Ohad Sharabi 2021-04-08 1186 u32 timeout)
08cd6811265925 Ohad Sharabi 2021-04-08 1187 {
47bd5c6d317873 Ohad Sharabi 2021-04-11 1188 struct cpu_dyn_regs *dyn_regs;
08cd6811265925 Ohad Sharabi 2021-04-08 1189 u32 status;
08cd6811265925 Ohad Sharabi 2021-04-08 1190 int rc;
08cd6811265925 Ohad Sharabi 2021-04-08 1191
47bd5c6d317873 Ohad Sharabi 2021-04-11 1192 dyn_regs = &fw_loader->dynamic_loader.comm_desc.cpu_dyn_regs;
47bd5c6d317873 Ohad Sharabi 2021-04-11 1193
08cd6811265925 Ohad Sharabi 2021-04-08 1194 /* Wait for expected status */
08cd6811265925 Ohad Sharabi 2021-04-08 @1195 rc = hl_poll_timeout(
08cd6811265925 Ohad Sharabi 2021-04-08 1196 hdev,
47bd5c6d317873 Ohad Sharabi 2021-04-11 1197 dyn_regs->cpu_cmd_status_to_host,
08cd6811265925 Ohad Sharabi 2021-04-08 1198 status,
08cd6811265925 Ohad Sharabi 2021-04-08 1199 FIELD_GET(COMMS_STATUS_STATUS_MASK, status) == expected_status,
08cd6811265925 Ohad Sharabi 2021-04-08 1200 10000,
08cd6811265925 Ohad Sharabi 2021-04-08 1201 timeout);
08cd6811265925 Ohad Sharabi 2021-04-08 1202
08cd6811265925 Ohad Sharabi 2021-04-08 1203 if (rc) {
08cd6811265925 Ohad Sharabi 2021-04-08 1204 hl_fw_dynamic_report_error_status(hdev, status,
08cd6811265925 Ohad Sharabi 2021-04-08 1205 expected_status);
08cd6811265925 Ohad Sharabi 2021-04-08 1206 return -EIO;
08cd6811265925 Ohad Sharabi 2021-04-08 1207 }
08cd6811265925 Ohad Sharabi 2021-04-08 1208
47bd5c6d317873 Ohad Sharabi 2021-04-11 1209 /*
47bd5c6d317873 Ohad Sharabi 2021-04-11 1210 * skip storing FW response for NOOP to preserve the actual desired
47bd5c6d317873 Ohad Sharabi 2021-04-11 1211 * FW status
47bd5c6d317873 Ohad Sharabi 2021-04-11 1212 */
47bd5c6d317873 Ohad Sharabi 2021-04-11 1213 if (expected_status == COMMS_STS_NOOP)
08cd6811265925 Ohad Sharabi 2021-04-08 1214 return 0;
47bd5c6d317873 Ohad Sharabi 2021-04-11 1215
47bd5c6d317873 Ohad Sharabi 2021-04-11 1216 rc = hl_fw_dynamic_extract_fw_response(hdev, fw_loader,
47bd5c6d317873 Ohad Sharabi 2021-04-11 1217 &fw_loader->dynamic_loader.response,
47bd5c6d317873 Ohad Sharabi 2021-04-11 1218 status);
47bd5c6d317873 Ohad Sharabi 2021-04-11 1219 return rc;
08cd6811265925 Ohad Sharabi 2021-04-08 1220 }
08cd6811265925 Ohad Sharabi 2021-04-08 1221
:::::: The code at line 1195 was first introduced by commit
:::::: 08cd6811265925e075a52e639e017b87dc91cb65 habanalabs: dynamic fw load reset protocol
:::::: TO: Ohad Sharabi <osharabi@habana.ai>
:::::: CC: Oded Gabbay <ogabbay@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39728 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-02 9:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-02 9:51 [ogabbay:next 15/16] drivers/misc/habanalabs/common/firmware_if.c:1195:14: sparse: sparse: incorrect type in argument 2 (different base types) 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.