diff mbox series

[1/2] selftests/vm/write_to_hugetlbfs.c: fix unused variable warning

Message ID 20200517001245.361762-2-jhubbard@nvidia.com (mailing list archive)
State New, archived
Headers show
Series selftests/vm: minor fixes for 5.7-rc5 | expand

Commit Message

John Hubbard May 17, 2020, 12:12 a.m. UTC
Remove unused variable "i", which was triggering a compiler warning.

Fixes: 29750f71a9b4 ("hugetlb_cgroup: add hugetlb_cgroup reservation tests")
Cc: Mina Almasry <almasrymina@google.com>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
---
 tools/testing/selftests/vm/write_to_hugetlbfs.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Mina Almasry May 18, 2020, 4:31 p.m. UTC | #1
Thanks John!

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

On Sat, May 16, 2020 at 5:12 PM John Hubbard <jhubbard@nvidia.com> wrote:

> Remove unused variable "i", which was triggering a compiler warning.
>
> Fixes: 29750f71a9b4 ("hugetlb_cgroup: add hugetlb_cgroup reservation
> tests")
> Cc: Mina Almasry <almasrymina@google.com>
> Signed-off-by: John Hubbard <jhubbard@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.26.2
>
>
Mina Almasry May 18, 2020, 4:32 p.m. UTC | #2
On Sat, May 16, 2020 at 5:12 PM John Hubbard <jhubbard@nvidia.com> wrote:
>
> Remove unused variable "i", which was triggering a compiler warning.
>
> Fixes: 29750f71a9b4 ("hugetlb_cgroup: add hugetlb_cgroup reservation tests")
> Cc: Mina Almasry <almasrymina@google.com>
> Signed-off-by: John Hubbard <jhubbard@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.26.2
>

Thanks John!

Reviewed-By: Mina Almasry <almasrymina@google.com>
diff mbox series

Patch

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");