* [PATCH] aic94xx: Skip reading user settings if flash is not found
@ 2015-07-06 11:07 Hannes Reinecke
2015-08-26 14:14 ` James Bottomley
2015-08-27 7:43 ` Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: Hannes Reinecke @ 2015-07-06 11:07 UTC (permalink / raw)
To: James Bottomley; +Cc: Christoph Hellwig, linux-scsi, Hannes Reinecke
If no user settings are found it's pointless trying to
read them from flash. So skip that step.
This also fixes a compilation warning about uninitialized variables in
aic94xx.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
drivers/scsi/aic94xx/aic94xx_sds.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/aic94xx/aic94xx_sds.c b/drivers/scsi/aic94xx/aic94xx_sds.c
index edb43fd..c831e30 100644
--- a/drivers/scsi/aic94xx/aic94xx_sds.c
+++ b/drivers/scsi/aic94xx/aic94xx_sds.c
@@ -983,7 +983,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
{
int err, i;
u32 offs, size;
- struct asd_ll_el *el;
+ struct asd_ll_el *el = NULL;
struct asd_ctrla_phy_settings *ps;
struct asd_ctrla_phy_settings dflt_ps;
@@ -1004,6 +1004,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
size = sizeof(struct asd_ctrla_phy_settings);
ps = &dflt_ps;
+ goto out_process;
}
if (size == 0)
@@ -1028,7 +1029,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
ASD_DPRINTK("couldn't find ctrla phy settings struct\n");
goto out2;
}
-
+out_process:
err = asd_process_ctrla_phy_settings(asd_ha, ps);
if (err) {
ASD_DPRINTK("couldn't process ctrla phy settings\n");
--
1.8.5.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] aic94xx: Skip reading user settings if flash is not found
2015-07-06 11:07 [PATCH] aic94xx: Skip reading user settings if flash is not found Hannes Reinecke
@ 2015-08-26 14:14 ` James Bottomley
2015-08-27 7:43 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: James Bottomley @ 2015-08-26 14:14 UTC (permalink / raw)
To: Hannes Reinecke; +Cc: Christoph Hellwig, linux-scsi
On Mon, 2015-07-06 at 13:07 +0200, Hannes Reinecke wrote:
> If no user settings are found it's pointless trying to
> read them from flash. So skip that step.
> This also fixes a compilation warning about uninitialized variables in
> aic94xx.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
This patch looks fine to me but needs a second review, please.
James
> drivers/scsi/aic94xx/aic94xx_sds.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/aic94xx/aic94xx_sds.c b/drivers/scsi/aic94xx/aic94xx_sds.c
> index edb43fd..c831e30 100644
> --- a/drivers/scsi/aic94xx/aic94xx_sds.c
> +++ b/drivers/scsi/aic94xx/aic94xx_sds.c
> @@ -983,7 +983,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
> {
> int err, i;
> u32 offs, size;
> - struct asd_ll_el *el;
> + struct asd_ll_el *el = NULL;
> struct asd_ctrla_phy_settings *ps;
> struct asd_ctrla_phy_settings dflt_ps;
>
> @@ -1004,6 +1004,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
>
> size = sizeof(struct asd_ctrla_phy_settings);
> ps = &dflt_ps;
> + goto out_process;
> }
>
> if (size == 0)
> @@ -1028,7 +1029,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
> ASD_DPRINTK("couldn't find ctrla phy settings struct\n");
> goto out2;
> }
> -
> +out_process:
> err = asd_process_ctrla_phy_settings(asd_ha, ps);
> if (err) {
> ASD_DPRINTK("couldn't process ctrla phy settings\n");
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] aic94xx: Skip reading user settings if flash is not found
2015-07-06 11:07 [PATCH] aic94xx: Skip reading user settings if flash is not found Hannes Reinecke
2015-08-26 14:14 ` James Bottomley
@ 2015-08-27 7:43 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2015-08-27 7:43 UTC (permalink / raw)
To: Hannes Reinecke; +Cc: James Bottomley, Christoph Hellwig, linux-scsi
On Mon, Jul 06, 2015 at 01:07:58PM +0200, Hannes Reinecke wrote:
> If no user settings are found it's pointless trying to
> read them from flash. So skip that step.
> This also fixes a compilation warning about uninitialized variables in
> aic94xx.
This looks okay to me.
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-27 7:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-06 11:07 [PATCH] aic94xx: Skip reading user settings if flash is not found Hannes Reinecke
2015-08-26 14:14 ` James Bottomley
2015-08-27 7:43 ` Christoph Hellwig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.