* [PATCH] selftests/timers: make loop consistent with array size
@ 2017-08-23 16:07 Benjamin Gaignard
2017-08-25 16:06 ` Shuah Khan
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Gaignard @ 2017-08-23 16:07 UTC (permalink / raw)
To: john.stultz, tglx, sboyd, shuah, linux-kernel, linux-kselftest
Cc: Benjamin Gaignard
clocksource_list array is defined as char [10][30] so
to initialise it we only have to iterate 10 times.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
---
tools/testing/selftests/timers/clocksource-switch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/timers/clocksource-switch.c b/tools/testing/selftests/timers/clocksource-switch.c
index 5ff1653..56fbfc1 100644
--- a/tools/testing/selftests/timers/clocksource-switch.c
+++ b/tools/testing/selftests/timers/clocksource-switch.c
@@ -61,7 +61,7 @@ int get_clocksources(char list[][30])
close(fd);
- for (i = 0; i < 30; i++)
+ for (i = 0; i < 10; i++)
list[i][0] = '\0';
head = buf;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] selftests/timers: make loop consistent with array size
2017-08-23 16:07 [PATCH] selftests/timers: make loop consistent with array size Benjamin Gaignard
@ 2017-08-25 16:06 ` Shuah Khan
0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2017-08-25 16:06 UTC (permalink / raw)
To: Benjamin Gaignard, john.stultz, tglx, sboyd, linux-kernel,
linux-kselftest, Shuah Khan, Shuah Khan
On 08/23/2017 10:07 AM, Benjamin Gaignard wrote:
> clocksource_list array is defined as char [10][30] so
> to initialise it we only have to iterate 10 times.
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> ---
> tools/testing/selftests/timers/clocksource-switch.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/timers/clocksource-switch.c b/tools/testing/selftests/timers/clocksource-switch.c
> index 5ff1653..56fbfc1 100644
> --- a/tools/testing/selftests/timers/clocksource-switch.c
> +++ b/tools/testing/selftests/timers/clocksource-switch.c
> @@ -61,7 +61,7 @@ int get_clocksources(char list[][30])
>
> close(fd);
>
> - for (i = 0; i < 30; i++)
> + for (i = 0; i < 10; i++)
> list[i][0] = '\0';
>
> head = buf;
>
Good catch. Thanks. Applied to linux-kselftest next for 4.14-rc1.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-25 16:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23 16:07 [PATCH] selftests/timers: make loop consistent with array size Benjamin Gaignard
2017-08-25 16:06 ` Shuah Khan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.