From: John Donnelly <john.p.donnelly@oracle.com>
To: Mike Christie <michael.christie@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
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:08:06 -0500 [thread overview]
Message-ID: <0E12A198-4C8D-4A24-946C-CF9DC74500AB@oracle.com> (raw)
In-Reply-To: <9c22ec6b-7487-300b-e376-b05297a5d0bc@oracle.com>
> On Oct 2, 2020, at 1:01 PM, Mike Christie <michael.christie@oracle.com> wrote:
>
> 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>
Hi
Thank you.
I am not always on the email dlists .. Please do the right thing .
next prev parent reply other threads:[~2020-10-02 18:08 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
2020-10-02 18:08 ` John Donnelly [this message]
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=0E12A198-4C8D-4A24-946C-CF9DC74500AB@oracle.com \
--to=john.p.donnelly@oracle.com \
--cc=bstroesser@ts.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michael.christie@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).