* [PATCH] message: fusion: Remove unused variable retval
@ 2022-03-17 3:03 Alexander Vorwerk
2022-05-03 0:51 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Vorwerk @ 2022-03-17 3:03 UTC (permalink / raw)
To: jejb, martin.petersen; +Cc: linux-scsi, linux-kernel, Alexander Vorwerk
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.
Signed-off-by: Alexander Vorwerk <alexander.vorwerk@stud.uni-goettingen.de>
---
drivers/message/fusion/mptctl.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index 03c8fb1795c2..f9ee957072c3 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -2334,7 +2334,6 @@ mptctl_hp_hostinfo(MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size)
ToolboxIstwiReadWriteRequest_t *IstwiRWRequest;
MPT_FRAME_HDR *mf = NULL;
unsigned long timeleft;
- int retval;
u32 msgcontext;
/* Reset long to int. Should affect IA64 and SPARC only
@@ -2488,7 +2487,6 @@ mptctl_hp_hostinfo(MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size)
ioc->add_sge((char *)&IstwiRWRequest->SGL,
(MPT_SGE_FLAGS_SSIMPLE_READ|4), buf_dma);
- retval = 0;
SET_MGMT_MSG_CONTEXT(ioc->ioctl_cmds.msg_context,
IstwiRWRequest->MsgContext);
INITIALIZE_MGMT_STATUS(ioc->ioctl_cmds.status)
@@ -2498,7 +2496,6 @@ mptctl_hp_hostinfo(MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size)
timeleft = wait_for_completion_timeout(&ioc->ioctl_cmds.done,
HZ*MPT_IOCTL_DEFAULT_TIMEOUT);
if (!(ioc->ioctl_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
- retval = -ETIME;
printk(MYIOC_s_WARN_FMT "%s: failed\n", ioc->name, __func__);
if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) {
mpt_free_msg_frame(ioc, mf);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] message: fusion: Remove unused variable retval
2022-03-17 3:03 [PATCH] message: fusion: Remove unused variable retval Alexander Vorwerk
@ 2022-05-03 0:51 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2022-05-03 0:51 UTC (permalink / raw)
To: jejb, Alexander Vorwerk; +Cc: Martin K . Petersen, linux-kernel, linux-scsi
On Thu, 17 Mar 2022 04:03:25 +0100, Alexander Vorwerk wrote:
> 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.
>
> [...]
Applied to 5.19/scsi-queue, thanks!
[1/1] message: fusion: Remove unused variable retval
https://git.kernel.org/mkp/scsi/c/ce781c3f05cd
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-06 0:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17 3:03 [PATCH] message: fusion: Remove unused variable retval Alexander Vorwerk
2022-05-03 0:51 ` Martin K. Petersen
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).