All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Smart <james.smart@emulex.com>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] lpfc: Positive error return into negative
Date: Fri, 29 Jan 2010 14:31:02 -0500	[thread overview]
Message-ID: <4B633776.6060404@emulex.com> (raw)
In-Reply-To: <4B62B3C6.5090903@gmail.com>

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;
>
>   

      reply	other threads:[~2010-01-29 19:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-29 10:09 [PATCH] lpfc: Positive error return into negative Roel Kluin
2010-01-29 19:31 ` James Smart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B633776.6060404@emulex.com \
    --to=james.smart@emulex.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=roel.kluin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.