linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] [SCSI] mpt3sas: remove unused variables
@ 2012-12-03 13:18 Wei Yongjun
  0 siblings, 0 replies; 5+ messages in thread
From: Wei Yongjun @ 2012-12-03 13:18 UTC (permalink / raw)
  To: Nagalakshmi.Nandigama, Sreekanth.Reddy, JBottomley
  Cc: yongjun_wei, support, DL-MPTFusionLinux, linux-scsi

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

The variables 'chain_flags' and  'phy_number' are initialized but
never used otherwise, so remove those unused variables.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c  | 2 --
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 --
 2 files changed, 4 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 04f8010..d07a3b4 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -1310,7 +1310,6 @@ _base_build_sg_scmd_ieee(struct MPT3SAS_ADAPTER *ioc,
 	void *sg_local, *chain;
 	u32 chain_offset;
 	u32 chain_length;
-	u32 chain_flags;
 	int sges_left;
 	u32 sges_in_segment;
 	u8 simple_sgl_flags;
@@ -1357,7 +1356,6 @@ _base_build_sg_scmd_ieee(struct MPT3SAS_ADAPTER *ioc,
 	}
 
 	/* initializing the chain flags and pointers */
-	chain_flags = MPI2_SGE_FLAGS_CHAIN_ELEMENT << MPI2_SGE_FLAGS_SHIFT;
 	chain_req = _base_get_chain_buffer_tracker(ioc, smid);
 	if (!chain_req)
 		return -1;

diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 05f8045..59cbb79 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -2755,13 +2755,11 @@ _scsih_block_io_to_children_attached_directly(struct MPT3SAS_ADAPTER *ioc,
 	int i;
 	u16 handle;
 	u16 reason_code;
-	u8 phy_number;
 
 	for (i = 0; i < event_data->NumEntries; i++) {
 		handle = le16_to_cpu(event_data->PHY[i].AttachedDevHandle);
 		if (!handle)
 			continue;
-		phy_number = event_data->StartPhyNum + i;
 		reason_code = event_data->PHY[i].PhyStatus &
 		    MPI2_EVENT_SAS_TOPO_RC_MASK;
 		if (reason_code == MPI2_EVENT_SAS_TOPO_RC_DELAY_NOT_RESPONDING)



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

* [PATCH -next] [SCSI] mpt3sas: remove unused variables
@ 2012-12-11 20:56 sreekanth.reddy
  2012-12-17 11:31 ` James Bottomley
  2012-12-17 13:25 ` Bjørn Mork
  0 siblings, 2 replies; 5+ messages in thread
From: sreekanth.reddy @ 2012-12-11 20:56 UTC (permalink / raw)
  To: linux-scsi, jejb, yongjun_wei, sreekanth.reddy, weiyj.lk
  Cc: Nagalakshmi.Nandigama

The variable 'chain_flags' and 'phy_number' are initialized but never used otherwise,
So remove those unused variables.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
---

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 764f3fe..157746d 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -1309,7 +1309,6 @@ _base_build_sg_scmd_ieee(struct MPT3SAS_ADAPTER *ioc,
 	void *sg_local, *chain;
 	u32 chain_offset;
 	u32 chain_length;
-	u32 chain_flags;
 	int sges_left;
 	u32 sges_in_segment;
 	u8 simple_sgl_flags;
@@ -1355,8 +1354,7 @@ _base_build_sg_scmd_ieee(struct MPT3SAS_ADAPTER *ioc,
 		sges_in_segment--;
 	}
 
-	/* initializing the chain flags and pointers */
-	chain_flags = MPI2_SGE_FLAGS_CHAIN_ELEMENT << MPI2_SGE_FLAGS_SHIFT;
+	/* initializing the pointers */
 	chain_req = _base_get_chain_buffer_tracker(ioc, smid);
 	if (!chain_req)
 		return -1;
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index ac9dbc2..61a1a45 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -2754,13 +2754,11 @@ _scsih_block_io_to_children_attached_directly(struct MPT3SAS_ADAPTER *ioc,
 	int i;
 	u16 handle;
 	u16 reason_code;
-	u8 phy_number;
 
 	for (i = 0; i < event_data->NumEntries; i++) {
 		handle = le16_to_cpu(event_data->PHY[i].AttachedDevHandle);
 		if (!handle)
 			continue;
-		phy_number = event_data->StartPhyNum + i;
 		reason_code = event_data->PHY[i].PhyStatus &
 		    MPI2_EVENT_SAS_TOPO_RC_MASK;
 		if (reason_code == MPI2_EVENT_SAS_TOPO_RC_DELAY_NOT_RESPONDING)

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

* Re: [PATCH -next] [SCSI] mpt3sas: remove unused variables
  2012-12-11 20:56 [PATCH -next] [SCSI] mpt3sas: remove unused variables sreekanth.reddy
@ 2012-12-17 11:31 ` James Bottomley
  2012-12-17 13:25 ` Bjørn Mork
  1 sibling, 0 replies; 5+ messages in thread
From: James Bottomley @ 2012-12-17 11:31 UTC (permalink / raw)
  To: sreekanth.reddy
  Cc: linux-scsi, jejb, yongjun_wei, weiyj.lk, Nagalakshmi.Nandigama

OK, so I'll give you a B for effort on this one, but:

On Wed, 2012-12-12 at 02:26 +0530, sreekanth.reddy@lsi.com wrote:
> The variable 'chain_flags' and 'phy_number' are initialized but never
> used otherwise,
> So remove those unused variables.

There has to be a

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

At the beginning of this patch so git gets the authorship correct

> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> Acked-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>

And this should be Signed-off-by: you not acked-by, because you sent the
patch to me (signoffs follow the trail of transmission).

I've fixed all of this up, for this one time.

James



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

* Re: [PATCH -next] [SCSI] mpt3sas: remove unused variables
  2012-12-11 20:56 [PATCH -next] [SCSI] mpt3sas: remove unused variables sreekanth.reddy
  2012-12-17 11:31 ` James Bottomley
@ 2012-12-17 13:25 ` Bjørn Mork
  2013-01-09  6:21   ` Nandigama, Nagalakshmi
  1 sibling, 1 reply; 5+ messages in thread
From: Bjørn Mork @ 2012-12-17 13:25 UTC (permalink / raw)
  To: sreekanth.reddy
  Cc: linux-scsi, jejb, yongjun_wei, weiyj.lk, Nagalakshmi.Nandigama

<sreekanth.reddy@lsi.com> writes:

> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> index ac9dbc2..61a1a45 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> @@ -2754,13 +2754,11 @@ _scsih_block_io_to_children_attached_directly(struct MPT3SAS_ADAPTER *ioc,
>  	int i;
>  	u16 handle;
>  	u16 reason_code;
> -	u8 phy_number;
>  
>  	for (i = 0; i < event_data->NumEntries; i++) {
>  		handle = le16_to_cpu(event_data->PHY[i].AttachedDevHandle);
>  		if (!handle)
>  			continue;
> -		phy_number = event_data->StartPhyNum + i;
>  		reason_code = event_data->PHY[i].PhyStatus &
>  		    MPI2_EVENT_SAS_TOPO_RC_MASK;
>  		if (reason_code == MPI2_EVENT_SAS_TOPO_RC_DELAY_NOT_RESPONDING)

There is an identical copy of this code, including that bug, in
drivers/scsi/mpt2sas/mpt2sas_scsih.c.

If you insist on the stupid code duplication, then please try to keep
your bugs syncronized!  If you are going to fix this bug for the mpt3sas
driver, then you *have* to fix it for mpt2sas as well.

Yes, I believe this is a mess and you have already demonstrated that you
are incapable of managing it.


Bjørn
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCH -next] [SCSI] mpt3sas: remove unused variables
  2012-12-17 13:25 ` Bjørn Mork
@ 2013-01-09  6:21   ` Nandigama, Nagalakshmi
  0 siblings, 0 replies; 5+ messages in thread
From: Nandigama, Nagalakshmi @ 2013-01-09  6:21 UTC (permalink / raw)
  To: Bjørn Mork, Reddy, Sreekanth
  Cc: linux-scsi@vger.kernel.org, jejb@kernel.org,
	yongjun_wei@trendmicro.com.cn, weiyj.lk@gmail.com

Bjorn,

We will fix this bug in both mpt2sas and mpt3sas.
Please note that we currently periodically release new features and defect fixes for both mpt2sas and mpt3sas. Most of these are then posted to upstream. We have a very well defined LSI internal process for synchronizing the defect fixes across the 2 drivers. 
A deliberate choice was made to keep the mpt3sas separate from mpt2sas due to our 6 GIG product being truly mature with a noticeable ramping down of enhancements/releases.   

mpt3sas is at it's initial baseline with a healthy roadmap ahead.  Architecturally there will be changes to the headers that will be only mpt3sas specific. 

From a maintenance and test perspective having the source base separate actually reduces the so called maintenance "hell".

This is not a “mess” .  LSI is fully capable of managing this software.

Regards,
Nagalakshmi


-----Original Message-----
From: Bjørn Mork [mailto:bjorn@mork.no] 
Sent: Monday, December 17, 2012 6:55 PM
To: Reddy, Sreekanth
Cc: linux-scsi@vger.kernel.org; jejb@kernel.org; yongjun_wei@trendmicro.com.cn; weiyj.lk@gmail.com; Nandigama, Nagalakshmi
Subject: Re: [PATCH -next] [SCSI] mpt3sas: remove unused variables

<sreekanth.reddy@lsi.com> writes:

> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c 
> b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> index ac9dbc2..61a1a45 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> @@ -2754,13 +2754,11 @@ _scsih_block_io_to_children_attached_directly(struct MPT3SAS_ADAPTER *ioc,
>  	int i;
>  	u16 handle;
>  	u16 reason_code;
> -	u8 phy_number;
>  
>  	for (i = 0; i < event_data->NumEntries; i++) {
>  		handle = le16_to_cpu(event_data->PHY[i].AttachedDevHandle);
>  		if (!handle)
>  			continue;
> -		phy_number = event_data->StartPhyNum + i;
>  		reason_code = event_data->PHY[i].PhyStatus &
>  		    MPI2_EVENT_SAS_TOPO_RC_MASK;
>  		if (reason_code == MPI2_EVENT_SAS_TOPO_RC_DELAY_NOT_RESPONDING)

There is an identical copy of this code, including that bug, in drivers/scsi/mpt2sas/mpt2sas_scsih.c.

If you insist on the stupid code duplication, then please try to keep your bugs syncronized!  If you are going to fix this bug for the mpt3sas driver, then you *have* to fix it for mpt2sas as well.

Yes, I believe this is a mess and you have already demonstrated that you are incapable of managing it.


Bjørn

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

end of thread, other threads:[~2013-01-09  6:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-11 20:56 [PATCH -next] [SCSI] mpt3sas: remove unused variables sreekanth.reddy
2012-12-17 11:31 ` James Bottomley
2012-12-17 13:25 ` Bjørn Mork
2013-01-09  6:21   ` Nandigama, Nagalakshmi
  -- strict thread matches above, loose matches on Subject: below --
2012-12-03 13:18 Wei Yongjun

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