From: Dongsheng Yang <dongsheng.yang@linux.dev>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: agk@redhat.com, snitzer@kernel.org, dm-devel@lists.linux.dev,
cengku@gmail.com, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] dm-pcache: fix uninitialized variable issue
Date: Fri, 15 Aug 2025 22:40:27 +0800 [thread overview]
Message-ID: <d679d105-b667-45f0-befe-3fdade7f5f3e@linux.dev> (raw)
In-Reply-To: <9b4290c2-57c8-a2c3-f617-46b2e6c2c6af@redhat.com>
在 8/15/2025 10:31 PM, Mikulas Patocka 写道:
>
> On Fri, 15 Aug 2025, Dongsheng Yang wrote:
>
>> The 'ret' varialbe may be returned without initialized in some branch,
>> this patch make sure it is initialized correctly with 0.
> Hi
>
> I've already fixed it (and I folded the fix into the existing commit).
Okey, thanx
Dongsheng
>
> Mikulas
>
>> Fixes: 6fb8fbbaf147 ("dm-pcache: add persistent cache target in device-mapper")
>> Reported-by: kernel test robot <lkp@intel.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202508151712.qMqD87iI-lkp@intel.com/
>> Signed-off-by: Dongsheng Yang <dongsheng.yang@linux.dev>
>> ---
>> drivers/md/dm-pcache/cache_dev.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/md/dm-pcache/cache_dev.c b/drivers/md/dm-pcache/cache_dev.c
>> index 722d7e952262..a7dafe8d35f7 100644
>> --- a/drivers/md/dm-pcache/cache_dev.c
>> +++ b/drivers/md/dm-pcache/cache_dev.c
>> @@ -21,7 +21,7 @@ static int build_vmap(struct dax_device *dax_dev, long total_pages, void **vaddr
>> struct page **pages;
>> long i = 0, chunk;
>> unsigned long pfn;
>> - int ret;
>> + int ret = 0;
>>
>> pages = vmalloc_array(total_pages, sizeof(struct page *));
>> if (!pages)
>> --
>> 2.43.0
>>
prev parent reply other threads:[~2025-08-15 14:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-15 13:30 [PATCH] dm-pcache: fix uninitialized variable issue Dongsheng Yang
2025-08-15 14:31 ` Mikulas Patocka
2025-08-15 14:40 ` Dongsheng Yang [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=d679d105-b667-45f0-befe-3fdade7f5f3e@linux.dev \
--to=dongsheng.yang@linux.dev \
--cc=agk@redhat.com \
--cc=cengku@gmail.com \
--cc=dm-devel@lists.linux.dev \
--cc=lkp@intel.com \
--cc=mpatocka@redhat.com \
--cc=snitzer@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;
as well as URLs for NNTP newsgroup(s).