linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hugetlb_cgroup: remove unused variable 'i'
@ 2020-04-16  0:26 Ralph Campbell
  2020-04-16  0:29 ` Mina Almasry
  0 siblings, 1 reply; 2+ messages in thread
From: Ralph Campbell @ 2020-04-16  0:26 UTC (permalink / raw)
  To: linux-kselftest, linux-mm, linux-kernel
  Cc: Andrew Morton, Shuah Khan, Mina Almasry, Mike Kravetz, Ralph Campbell

Compiling tests in tools/testing/selftests/vm/ results in a C compiler
warning:

write_to_hugetlbfs.c: In function ‘main’:
write_to_hugetlbfs.c:77:16: warning: unused variable ‘i’
   77 |  unsigned long i;

Delete the unused variable.

Fixes: 29750f71a9b4 ("hugetlb_cgroup: add hugetlb_cgroup reservation tests")
Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
---
 tools/testing/selftests/vm/write_to_hugetlbfs.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/testing/selftests/vm/write_to_hugetlbfs.c b/tools/testing/selftests/vm/write_to_hugetlbfs.c
index 110bc4e4015d..6a2caba19ee1 100644
--- a/tools/testing/selftests/vm/write_to_hugetlbfs.c
+++ b/tools/testing/selftests/vm/write_to_hugetlbfs.c
@@ -74,8 +74,6 @@ int main(int argc, char **argv)
 	int write = 0;
 	int reserve = 1;
 
-	unsigned long i;
-
 	if (signal(SIGINT, sig_handler) == SIG_ERR)
 		err(1, "\ncan't catch SIGINT\n");
 
-- 
2.25.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hugetlb_cgroup: remove unused variable 'i'
  2020-04-16  0:26 [PATCH] hugetlb_cgroup: remove unused variable 'i' Ralph Campbell
@ 2020-04-16  0:29 ` Mina Almasry
  0 siblings, 0 replies; 2+ messages in thread
From: Mina Almasry @ 2020-04-16  0:29 UTC (permalink / raw)
  To: Ralph Campbell
  Cc: linux-kselftest, Linux-MM, open list, Andrew Morton, Shuah Khan,
	Mike Kravetz

On Wed, Apr 15, 2020 at 5:26 PM Ralph Campbell <rcampbell@nvidia.com> wrote:
>
> Compiling tests in tools/testing/selftests/vm/ results in a C compiler
> warning:
>
> write_to_hugetlbfs.c: In function ‘main’:
> write_to_hugetlbfs.c:77:16: warning: unused variable ‘i’
>    77 |  unsigned long i;
>
> Delete the unused variable.
>
> Fixes: 29750f71a9b4 ("hugetlb_cgroup: add hugetlb_cgroup reservation tests")
> Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>

Whoops, sorry about that.

Reviewed-by: Mina Almasry <almasrymina@google.com>

> ---
>  tools/testing/selftests/vm/write_to_hugetlbfs.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/tools/testing/selftests/vm/write_to_hugetlbfs.c b/tools/testing/selftests/vm/write_to_hugetlbfs.c
> index 110bc4e4015d..6a2caba19ee1 100644
> --- a/tools/testing/selftests/vm/write_to_hugetlbfs.c
> +++ b/tools/testing/selftests/vm/write_to_hugetlbfs.c
> @@ -74,8 +74,6 @@ int main(int argc, char **argv)
>         int write = 0;
>         int reserve = 1;
>
> -       unsigned long i;
> -
>         if (signal(SIGINT, sig_handler) == SIG_ERR)
>                 err(1, "\ncan't catch SIGINT\n");
>
> --
> 2.25.2
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-16  0:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-16  0:26 [PATCH] hugetlb_cgroup: remove unused variable 'i' Ralph Campbell
2020-04-16  0:29 ` Mina Almasry

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).