Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: message: fusion: Remove unused variable retval

The following warning showed up when compiling with W=1.

drivers/message/fusion/mptctl.c: In function ‘mptctl_hp_hostinfo’:
drivers/message/fusion/mptctl.c:2337:8: warning: variable ‘retval’ set but not used [-Wunused-but-set-variable]
int retval;

Fixing by removing the variable.

Link: https://lore.kernel.org/r/20220317030325.30526-1-alexander.vorwerk@stud.uni-goettingen.de
Signed-off-by: Alexander Vorwerk <alexander.vorwerk@stud.uni-goettingen.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Alexander Vorwerk and committed by
Martin K. Petersen
ce781c3f 8c36b054

-3
-3
drivers/message/fusion/mptctl.c
··· 2334 2334 ToolboxIstwiReadWriteRequest_t *IstwiRWRequest; 2335 2335 MPT_FRAME_HDR *mf = NULL; 2336 2336 unsigned long timeleft; 2337 - int retval; 2338 2337 u32 msgcontext; 2339 2338 2340 2339 /* Reset long to int. Should affect IA64 and SPARC only ··· 2487 2488 ioc->add_sge((char *)&IstwiRWRequest->SGL, 2488 2489 (MPT_SGE_FLAGS_SSIMPLE_READ|4), buf_dma); 2489 2490 2490 - retval = 0; 2491 2491 SET_MGMT_MSG_CONTEXT(ioc->ioctl_cmds.msg_context, 2492 2492 IstwiRWRequest->MsgContext); 2493 2493 INITIALIZE_MGMT_STATUS(ioc->ioctl_cmds.status) ··· 2496 2498 timeleft = wait_for_completion_timeout(&ioc->ioctl_cmds.done, 2497 2499 HZ*MPT_IOCTL_DEFAULT_TIMEOUT); 2498 2500 if (!(ioc->ioctl_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) { 2499 - retval = -ETIME; 2500 2501 printk(MYIOC_s_WARN_FMT "%s: failed\n", ioc->name, __func__); 2501 2502 if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) { 2502 2503 mpt_free_msg_frame(ioc, mf);