* [PATCH] lpfc: Positive error return into negative
@ 2010-01-29 10:09 Roel Kluin
2010-01-29 19:31 ` James Smart
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2010-01-29 10:09 UTC (permalink / raw)
To: James Smart, linux-scsi, Andrew Morton, LKML
In the comment on top of lpfc_sli_hbq_setup() and of its caller which
transmits this error, lpfc_sli_hba_setup(), it is stated that the
function should return a negative error code.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 589549b..a960736 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -3709,7 +3709,7 @@ lpfc_sli_hbq_setup(struct lpfc_hba *phba)
phba->link_state = LPFC_HBA_ERROR;
mempool_free(pmb, phba->mbox_mem_pool);
- return ENXIO;
+ return -ENXIO;
}
}
phba->hbq_count = hbq_count;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] lpfc: Positive error return into negative
2010-01-29 10:09 [PATCH] lpfc: Positive error return into negative Roel Kluin
@ 2010-01-29 19:31 ` James Smart
0 siblings, 0 replies; 2+ messages in thread
From: James Smart @ 2010-01-29 19:31 UTC (permalink / raw)
To: Roel Kluin; +Cc: linux-scsi@vger.kernel.org, Andrew Morton, LKML
This is innoculous as the code really only cares whether it's zero or
non-zero. But, there's no harm in being consistent.
Acked-by: James Smart <james.smart@emulex.com>
-- james s
Roel Kluin wrote:
> In the comment on top of lpfc_sli_hbq_setup() and of its caller which
> transmits this error, lpfc_sli_hba_setup(), it is stated that the
> function should return a negative error code.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
> index 589549b..a960736 100644
> --- a/drivers/scsi/lpfc/lpfc_sli.c
> +++ b/drivers/scsi/lpfc/lpfc_sli.c
> @@ -3709,7 +3709,7 @@ lpfc_sli_hbq_setup(struct lpfc_hba *phba)
>
> phba->link_state = LPFC_HBA_ERROR;
> mempool_free(pmb, phba->mbox_mem_pool);
> - return ENXIO;
> + return -ENXIO;
> }
> }
> phba->hbq_count = hbq_count;
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-29 19:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-29 10:09 [PATCH] lpfc: Positive error return into negative Roel Kluin
2010-01-29 19:31 ` James Smart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox