[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZH4CDyV/dYItXfoP@x1n>
Date: Mon, 5 Jun 2023 11:41:03 -0400
From: Peter Xu <peterx@...hat.com>
To: John Hubbard <jhubbard@...dia.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
David Hildenbrand <david@...hat.com>,
Shuah Khan <shuah@...nel.org>,
Nathan Chancellor <nathan@...nel.org>, linux-mm@...ck.org,
linux-kselftest@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 02/11] selftests/mm: fix unused variable warnings in
hugetlb-madvise.c, migration.c
On Fri, Jun 02, 2023 at 07:15:49PM -0700, John Hubbard wrote:
> Dummy variables are required in order to make these two (similar)
> routines work, so in both cases, declare the variables as volatile in
> order to avoid the clang compiler warning.
>
> Furthermore, in order to ensure that each test actually does what is
> intended, add an asm volatile invocation (thanks to David Hildenbrand
> for the suggestion), with a clarifying comment so that it survives
> future maintenance.
>
> Cc: David Hildenbrand <david@...hat.com>
> Cc: Peter Xu <peterx@...hat.com>
> Signed-off-by: John Hubbard <jhubbard@...dia.com>
Reviewed-by: Peter Xu <peterx@...hat.com>
--
Peter Xu
Powered by blists - more mailing lists