From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: Colin King <colin.king@canonical.com>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
kasan-dev@googlegroups.com
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] kasan: remove redundant initialization of variable 'real_size'
Date: Tue, 6 Feb 2018 23:10:03 +0300 [thread overview]
Message-ID: <e86dcb38-d00e-d5d8-ca66-9ff4013a786c@virtuozzo.com> (raw)
In-Reply-To: <20180206144950.32457-1-colin.king@canonical.com>
On 02/06/2018 05:49 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable real_size is initialized with a value that is never read,
> it is re-assigned a new value later on, hence the initialization is
> redundant and can be removed.
>
> Cleans up clang warning:
> lib/test_kasan.c:422:21: warning: Value stored to 'real_size' during
> its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
> ---
> lib/test_kasan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/test_kasan.c b/lib/test_kasan.c
> index a808d81b409d..dba0ffd45fd7 100644
> --- a/lib/test_kasan.c
> +++ b/lib/test_kasan.c
> @@ -419,7 +419,7 @@ static noinline void __init kasan_stack_oob(void)
> static noinline void __init ksize_unpoisons_memory(void)
> {
> char *ptr;
> - size_t size = 123, real_size = size;
> + size_t size = 123, real_size;
>
> pr_info("ksize() unpoisons the whole allocated chunk\n");
> ptr = kmalloc(size, GFP_KERNEL);
>
prev parent reply other threads:[~2018-02-06 20:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-06 14:49 Colin King
2018-02-06 20:10 ` Andrey Ryabinin [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=e86dcb38-d00e-d5d8-ca66-9ff4013a786c@virtuozzo.com \
--to=aryabinin@virtuozzo.com \
--cc=akpm@linux-foundation.org \
--cc=colin.king@canonical.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®