[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b5c4d39c-a993-4929-af95-013e767fcdb1@collabora.com>
Date: Fri, 5 Jul 2024 13:11:45 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: John Hubbard <jhubbard@...dia.com>, Shuah Khan <shuah@...nel.org>
Cc: Muhammad Usama Anjum <usama.anjum@...labora.com>,
John Stultz <jstultz@...gle.com>, Thomas Gleixner <tglx@...utronix.de>,
Stephen Boyd <sboyd@...nel.org>,
Anna-Maria Behnsen <anna-maria@...utronix.de>,
Frederic Weisbecker <frederic@...nel.org>,
Valentin Obst <kernel@...entinobst.de>, linux-kselftest@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>, llvm@...ts.linux.dev
Subject: Re: [PATCH v3] selftests/timers: remove unused irqcount variable
On 7/4/24 7:42 AM, John Hubbard wrote:
> When building with clang, via:
>
> make LLVM=1 -C tools/testing/selftest
>
> ...clang warns about an unused irqcount variable. clang is correct: the
> variable is incremented and then ignored.
>
> Fix this by deleting the irqcount variable.
>
> Signed-off-by: John Hubbard <jhubbard@...dia.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
> ---
>
> Changes since v2:
>
> 1) Rebased onto Linux 6.10-rc6+
>
> Changes since the first version:
>
> 1) Rebased onto Linux 6.10-rc1
>
> thanks,
> John Hubbard
>
> tools/testing/selftests/timers/rtcpie.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/timers/rtcpie.c b/tools/testing/selftests/timers/rtcpie.c
> index 4ef2184f1558..7c07edd0d450 100644
> --- a/tools/testing/selftests/timers/rtcpie.c
> +++ b/tools/testing/selftests/timers/rtcpie.c
> @@ -29,7 +29,7 @@ static const char default_rtc[] = "/dev/rtc0";
>
> int main(int argc, char **argv)
> {
> - int i, fd, retval, irqcount = 0;
> + int i, fd, retval;
> unsigned long tmp, data, old_pie_rate;
> const char *rtc = default_rtc;
> struct timeval start, end, diff;
> @@ -120,7 +120,6 @@ int main(int argc, char **argv)
>
> fprintf(stderr, " %d",i);
> fflush(stderr);
> - irqcount++;
> }
>
> /* Disable periodic interrupts */
>
> base-commit: 8a9c6c40432e265600232b864f97d7c675e8be52
--
BR,
Muhammad Usama Anjum
Powered by blists - more mailing lists