All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michael.christie@oracle.com>
To: john.p.donnelly@oracle.com, linux-kernel@vger.kernel.org,
	linux-scsi@vger.kernel.org
Cc: martin.petersen@oracle.com, bstroesser@ts.fujitsu.com
Subject: Re: [PATCH ] scsi: page warning: 'page' may be used uninitialized
Date: Fri, 2 Oct 2020 13:01:36 -0500	[thread overview]
Message-ID: <9c22ec6b-7487-300b-e376-b05297a5d0bc@oracle.com> (raw)
In-Reply-To: <20200924001920.43594-1-john.p.donnelly@oracle.com>

On 9/23/20 7:19 PM, john.p.donnelly@oracle.com wrote:
> From: John Donnelly <john.p.donnelly@oracle.com>
> 
> corrects: drivers/target/target_core_user.c:688:6: warning: 'page' may be used
> uninitialized
> 
> Fixes: 3c58f737231e ("scsi: target: tcmu: Optimize use of
> flush_dcache_page")
> 
> To: linux-scsi@vger.kernel.org
> Cc: Mike Christie <michael.christie@oracle.com>
> Signed-off-by: John Donnelly <john.p.donnelly@oracle.com>
> ---
>  drivers/target/target_core_user.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
> index 9b7592350502..86b28117787e 100644
> --- a/drivers/target/target_core_user.c
> +++ b/drivers/target/target_core_user.c
> @@ -681,7 +681,7 @@ static void scatter_data_area(struct tcmu_dev *udev,
>  	void *from, *to = NULL;
>  	size_t copy_bytes, to_offset, offset;
>  	struct scatterlist *sg;
> -	struct page *page;
> +	struct page *page = NULL;
>  
>  	for_each_sg(data_sg, sg, data_nents, i) {
>  		int sg_remaining = sg->length;
> 

Looks ok for now. In the next kernel we can do the more invasive approach and
add a new struct/helpers to make the code cleaner and fix it properly.

Acked-by: Mike Christie <michael.christie@oracle.com>

  reply	other threads:[~2020-10-02 18:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24  0:19 [PATCH ] scsi: page warning: 'page' may be used uninitialized john.p.donnelly
2020-10-02 18:01 ` Mike Christie [this message]
2020-10-02 18:08   ` John Donnelly
2020-10-03  1:23 ` Martin K. Petersen
2020-10-07  3:47 ` Martin K. Petersen

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=9c22ec6b-7487-300b-e376-b05297a5d0bc@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=bstroesser@ts.fujitsu.com \
    --cc=john.p.donnelly@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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.