linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: message: fusion: remove useless variable
@ 2021-04-12  5:59 Jiapeng Chong
  2021-04-16  2:51 ` Martin K. Petersen
  0 siblings, 1 reply; 3+ messages in thread
From: Jiapeng Chong @ 2021-04-12  5:59 UTC (permalink / raw)
  To: sathya.prakash
  Cc: sreekanth.reddy, suganath-prabu.subramani, MPT-FusionLinux.pdl,
	linux-scsi, linux-kernel, Jiapeng Chong

Fix the following gcc warning:

drivers/message/fusion/mptsas.c:783:14: warning: variable ‘vtarget’ set
but not used [-Wunused-but-set-variable].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/message/fusion/mptsas.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 5eb0b33..c54e823 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -780,13 +780,11 @@ static inline MPT_ADAPTER *rphy_to_ioc(struct sas_rphy *rphy)
 mptsas_add_device_component_starget(MPT_ADAPTER *ioc,
 	struct scsi_target *starget)
 {
-	VirtTarget	*vtarget;
 	struct sas_rphy	*rphy;
 	struct mptsas_phyinfo	*phy_info = NULL;
 	struct mptsas_enclosure	enclosure_info;
 
 	rphy = dev_to_rphy(starget->dev.parent);
-	vtarget = starget->hostdata;
 	phy_info = mptsas_find_phyinfo_by_sas_address(ioc,
 			rphy->identify.sas_address);
 	if (!phy_info)
-- 
1.8.3.1


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

* Re: [PATCH] scsi: message: fusion: remove useless variable
  2021-04-12  5:59 [PATCH] scsi: message: fusion: remove useless variable Jiapeng Chong
@ 2021-04-16  2:51 ` Martin K. Petersen
  0 siblings, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-04-16  2:51 UTC (permalink / raw)
  To: sathya.prakash, Jiapeng Chong
  Cc: Martin K . Petersen, linux-kernel, MPT-FusionLinux.pdl,
	suganath-prabu.subramani, linux-scsi, sreekanth.reddy

On Mon, 12 Apr 2021 13:59:06 +0800, Jiapeng Chong wrote:

> Fix the following gcc warning:
> 
> drivers/message/fusion/mptsas.c:783:14: warning: variable ‘vtarget’ set
> but not used [-Wunused-but-set-variable].

Applied to 5.13/scsi-queue, thanks!

[1/1] scsi: message: fusion: remove useless variable
      https://git.kernel.org/mkp/scsi/c/cf17ff267880

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* [PATCH] scsi: message: fusion: Remove useless variable
@ 2021-04-08  9:06 Jiapeng Chong
  0 siblings, 0 replies; 3+ messages in thread
From: Jiapeng Chong @ 2021-04-08  9:06 UTC (permalink / raw)
  To: sathya.prakash
  Cc: sreekanth.reddy, suganath-prabu.subramani, MPT-FusionLinux.pdl,
	linux-scsi, linux-kernel, Jiapeng Chong

Fix the following gcc warning:

drivers/message/fusion/mptbase.c:3087:9: warning: variable ‘status’ set
but not used [-Wunused-but-set-variable].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/message/fusion/mptbase.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 549797d..f37ea06 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -3084,7 +3084,7 @@ static int mpt_remove_dead_ioc_func(void *arg)
 	int			 req_sz;
 	int			 reply_sz;
 	int			 sz;
-	u32			 status, vv;
+	u32			 vv;
 	u8			 shiftFactor=1;
 
 	/* IOC *must* NOT be in RESET state! */
@@ -3142,7 +3142,6 @@ static int mpt_remove_dead_ioc_func(void *arg)
 		facts->IOCExceptions = le16_to_cpu(facts->IOCExceptions);
 		facts->IOCStatus = le16_to_cpu(facts->IOCStatus);
 		facts->IOCLogInfo = le32_to_cpu(facts->IOCLogInfo);
-		status = le16_to_cpu(facts->IOCStatus) & MPI_IOCSTATUS_MASK;
 		/* CHECKME! IOCStatus, IOCLogInfo */
 
 		facts->ReplyQueueDepth = le16_to_cpu(facts->ReplyQueueDepth);
-- 
1.8.3.1


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

end of thread, other threads:[~2021-04-16  2:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12  5:59 [PATCH] scsi: message: fusion: remove useless variable Jiapeng Chong
2021-04-16  2:51 ` Martin K. Petersen
  -- strict thread matches above, loose matches on Subject: below --
2021-04-08  9:06 [PATCH] scsi: message: fusion: Remove " Jiapeng Chong

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).