From: Jeff Moyer <jmoyer@redhat.com>
To: Tao Ma <tm@tao.ma>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sd: Free the page in case of unknown provisioning_mode in scsi_setup_discard_cmnd.
Date: Tue, 22 Mar 2011 08:57:51 -0400 [thread overview]
Message-ID: <x494o6vtir4.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <1300766648-18095-1-git-send-email-tm@tao.ma> (Tao Ma's message of "Tue, 22 Mar 2011 12:04:08 +0800")
Tao Ma <tm@tao.ma> writes:
> From: Tao Ma <boyu.mt@taobao.com>
>
> This patch is inspired by a build waring.
> drivers/scsi/sd.c:544: warning: ‘ret’ may be used uninitialized in this function
>
> So we need to set a default value to ret here.
> But a deep look at scsi_setup_discard_cmnd makes me think
> of which value should be set. Now we have BLKPREP_KILL and
> BLKPREP_DEFER to indicate an error. As in case of an
> unknown sdkp->provisioning_mode, we goto out directly. So
> I guess we should return BLKPREP_KILL here and free the page.
Yeah, there's no point in deferring it.
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
prev parent reply other threads:[~2011-03-22 12:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-22 4:04 Tao Ma
2011-03-22 12:57 ` Jeff Moyer [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=x494o6vtir4.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tm@tao.ma \
/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
all inboxes | Powered by JetHome®