From: Mike Christie <michaelc@cs.wisc.edu>
To: Dan Carpenter <error27@gmail.com>
Cc: Jayamohan Kallickal <jayamohank@serverengines.com>,
"James E.J. Bottomley" <James.Bottomley@suse.de>,
linux-scsi@vger.kernel.org
Subject: Re: [patch] be2iscsi: correct return value in mgmt_invalidate_icds()
Date: Fri, 07 May 2010 20:34:50 -0500 [thread overview]
Message-ID: <4BE4BFBA.6010505@cs.wisc.edu> (raw)
In-Reply-To: <20100507085345.GB27064@bicker>
On 05/07/2010 03:53 AM, Dan Carpenter wrote:
> This function should return 0 on error. Returning -1 would cause a
> crash.
>
> Also there is an extra space before the newline character and a missing
> space between the "for" and the "mgmt_invalidate_icds". I put the string
> on one line. The current version of checkpatch.pl complains that the
> line is too long, but it makes grepping easier.
>
> Signed-off-by: Dan Carpenter<error27@gmail.com>
>
> diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
> index e641922..350cbea 100644
> --- a/drivers/scsi/be2iscsi/be_mgmt.c
> +++ b/drivers/scsi/be2iscsi/be_mgmt.c
> @@ -167,10 +167,9 @@ unsigned char mgmt_invalidate_icds(struct beiscsi_hba *phba,
> &nonemb_cmd.dma);
> if (nonemb_cmd.va == NULL) {
> SE_DEBUG(DBG_LVL_1,
> - "Failed to allocate memory for"
> - "mgmt_invalidate_icds \n");
> + "Failed to allocate memory for mgmt_invalidate_icds\n");
> spin_unlock(&ctrl->mbox_lock);
> - return -1;
> + return 0;
> }
> nonemb_cmd.size = sizeof(struct invalidate_commands_params_in);
> req = nonemb_cmd.va;
You are right. Nice catch.
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
prev parent reply other threads:[~2010-05-08 1:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-07 8:53 [patch] be2iscsi: correct return value in mgmt_invalidate_icds() Dan Carpenter
2010-05-08 1:34 ` Mike Christie [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=4BE4BFBA.6010505@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=James.Bottomley@suse.de \
--cc=error27@gmail.com \
--cc=jayamohank@serverengines.com \
--cc=linux-scsi@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox