[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CC621D9C-2D1B-4CB7-A5E0-ACE0850E6B0D@nvidia.com>
Date: Mon, 22 Apr 2024 09:59:08 -0400
From: Zi Yan <ziy@...dia.com>
To: Muhammad Usama Anjum <usama.anjum@...labora.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Shuah Khan <shuah@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>, Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>, kernel@...labora.com,
linux-mm@...ck.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] selftests: mm: fix unused and uninitialized variable
warning
On 16 Apr 2024, at 12:26, Muhammad Usama Anjum wrote:
> Fix the warnings by initializing and marking the variable as unused.
> I've caught the warnings by using clang.
>
> split_huge_page_test.c:303:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
> 303 | int dummy;
> | ^
> split_huge_page_test.c:343:3: warning: variable 'dummy' is uninitialized when used here [-Wuninitialized]
> 343 | dummy += *(*addr + i);
> | ^~~~~
> split_huge_page_test.c:303:11: note: initialize the variable 'dummy' to silence this warning
> 303 | int dummy;
> | ^
> | = 0
> 2 warnings generated.
>
> Fixes: fc4d182316bd ("mm: huge_memory: enable debugfs to split huge pages to any order")
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
> ---
> tools/testing/selftests/mm/split_huge_page_test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
LGTM. Thanks. Reviewed-by: Zi Yan <ziy@...dia.com>
--
Best Regards,
Yan, Zi
Download attachment "signature.asc" of type "application/pgp-signature" (855 bytes)
Powered by blists - more mailing lists