linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: mpt3sas: drop unused variable in mpt3sas_send_mctp_passthru_req()
@ 2025-06-06 15:29 André Draszik
  2025-06-16 18:24 ` Martin K. Petersen
  2025-06-20  3:18 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: André Draszik @ 2025-06-06 15:29 UTC (permalink / raw)
  To: Sathya Prakash, Sreekanth Reddy, Suganath Prabu Subramani,
	James E.J. Bottomley, Martin K. Petersen, Shivasharan S
  Cc: Peter Griffin, Tudor Ambarus, MPT-FusionLinux.pdl, linux-scsi,
	linux-kernel, stable, André Draszik

With W=1, gcc complains correctly:

    mpt3sas_ctl.c: In function ‘mpt3sas_send_mctp_passthru_req’:
    mpt3sas_ctl.c:2917:29: error: variable ‘mpi_reply’ set but not used [-Werror=unused-but-set-variable]
     2917 |         MPI2DefaultReply_t *mpi_reply;
          |                             ^~~~~~~~~

Drop the unused assignment and variable.

Fixes: c72be4b5bb7c ("scsi: mpt3sas: Add support for MCTP Passthrough commands")
Cc: stable@vger.kernel.org
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
 drivers/scsi/mpt3sas/mpt3sas_ctl.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
index 02fc204b9bf7b276115bf6db52746155381799fd..3b951589feeb6c13094ea44b494ca3050a309b15 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
@@ -2914,7 +2914,6 @@ int mpt3sas_send_mctp_passthru_req(struct mpt3_passthru_command *command)
 {
 	struct MPT3SAS_ADAPTER *ioc;
 	MPI2RequestHeader_t *mpi_request = NULL, *request;
-	MPI2DefaultReply_t *mpi_reply;
 	Mpi26MctpPassthroughRequest_t *mctp_passthru_req;
 	u16 smid;
 	unsigned long timeout;
@@ -3022,8 +3021,6 @@ int mpt3sas_send_mctp_passthru_req(struct mpt3_passthru_command *command)
 		goto issue_host_reset;
 	}
 
-	mpi_reply = ioc->ctl_cmds.reply;
-
 	/* copy out xdata to user */
 	if (data_in_sz)
 		memcpy(command->data_in_buf_ptr, data_in, data_in_sz);

---
base-commit: a0bea9e39035edc56a994630e6048c8a191a99d8
change-id: 20250606-mpt3sas-15563809f705

Best regards,
-- 
André Draszik <andre.draszik@linaro.org>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: mpt3sas: drop unused variable in mpt3sas_send_mctp_passthru_req()
  2025-06-06 15:29 [PATCH] scsi: mpt3sas: drop unused variable in mpt3sas_send_mctp_passthru_req() André Draszik
@ 2025-06-16 18:24 ` Martin K. Petersen
  2025-06-20  3:18 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2025-06-16 18:24 UTC (permalink / raw)
  To: André Draszik
  Cc: Sathya Prakash, Sreekanth Reddy, Suganath Prabu Subramani,
	James E.J. Bottomley, Martin K. Petersen, Shivasharan S,
	Peter Griffin, Tudor Ambarus, MPT-FusionLinux.pdl, linux-scsi,
	linux-kernel, stable


André,

> With W=1, gcc complains correctly:
>
>     mpt3sas_ctl.c: In function ‘mpt3sas_send_mctp_passthru_req’:
>     mpt3sas_ctl.c:2917:29: error: variable ‘mpi_reply’ set but not used [-Werror=unused-but-set-variable]
>      2917 |         MPI2DefaultReply_t *mpi_reply;
>           |                             ^~~~~~~~~
>
> Drop the unused assignment and variable.

Applied to 6.17/scsi-staging, thanks!

-- 
Martin K. Petersen

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: mpt3sas: drop unused variable in mpt3sas_send_mctp_passthru_req()
  2025-06-06 15:29 [PATCH] scsi: mpt3sas: drop unused variable in mpt3sas_send_mctp_passthru_req() André Draszik
  2025-06-16 18:24 ` Martin K. Petersen
@ 2025-06-20  3:18 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2025-06-20  3:18 UTC (permalink / raw)
  To: Sathya Prakash, Sreekanth Reddy, Suganath Prabu Subramani,
	James E.J. Bottomley, Shivasharan S, André Draszik
  Cc: Martin K . Petersen, Peter Griffin, Tudor Ambarus,
	MPT-FusionLinux.pdl, linux-scsi, linux-kernel, stable

On Fri, 06 Jun 2025 16:29:43 +0100, André Draszik wrote:

> With W=1, gcc complains correctly:
> 
>     mpt3sas_ctl.c: In function ‘mpt3sas_send_mctp_passthru_req’:
>     mpt3sas_ctl.c:2917:29: error: variable ‘mpi_reply’ set but not used [-Werror=unused-but-set-variable]
>      2917 |         MPI2DefaultReply_t *mpi_reply;
>           |                             ^~~~~~~~~
> 
> [...]

Applied to 6.17/scsi-queue, thanks!

[1/1] scsi: mpt3sas: drop unused variable in mpt3sas_send_mctp_passthru_req()
      https://git.kernel.org/mkp/scsi/c/0ec996edf4fd

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-20  3:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-06 15:29 [PATCH] scsi: mpt3sas: drop unused variable in mpt3sas_send_mctp_passthru_req() André Draszik
2025-06-16 18:24 ` Martin K. Petersen
2025-06-20  3:18 ` 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).