* [LTP] [PATCH] lib/tst_kconfig: Include stddef.h
@ 2025-01-13 22:05 Ricardo B. Marliere via ltp
2025-01-14 2:55 ` Petr Vorel
0 siblings, 1 reply; 4+ messages in thread
From: Ricardo B. Marliere via ltp @ 2025-01-13 22:05 UTC (permalink / raw)
To: Linux Test Project; +Cc: Ricardo B. Marliere
Currently, if a test wants to make use of tst_kconfig.h it must also
include stddef.h due to the usage of size_t. While at it, fix a few minor
typos in comments.
Signed-off-by: Ricardo B. Marliere <rbm@suse.com>
---
include/tst_kconfig.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/tst_kconfig.h b/include/tst_kconfig.h
index 5377c00f39957fd93f316368865c8e44038f2e1e..b0608498d7e837e2c7b847fbef23334dcf2605c9 100644
--- a/include/tst_kconfig.h
+++ b/include/tst_kconfig.h
@@ -7,6 +7,7 @@
#define TST_KCONFIG_H__
#include <stdbool.h>
+#include <stddef.h>
/**
* Initialization helper macro for struct tst_kconfig_var. Requires <string.h>
@@ -29,7 +30,7 @@ struct tst_kconfig_var {
* tst_kconfig_var structures.
*
* The path to the kernel config should be autodetected in most of the cases as
- * the code looks for know locations. It can be explicitely set/overrided with
+ * the code looks for know locations. It can be explicitly set/overridden with
* the KCONFIG_PATH environment variable as well.
*
* The caller has to initialize the tst_kconfig_var structure. The id has to be
@@ -47,7 +48,7 @@ struct tst_kconfig_var {
* In the case that match is set to 'v' the val pointer points to a newly
* allocated string that holds the value.
*
- * @param vars An array of caller initalized tst_kconfig_var structures.
+ * @param vars An array of caller initialized tst_kconfig_var structures.
* @param vars_len Length of the vars array.
*/
void tst_kconfig_read(struct tst_kconfig_var vars[], size_t vars_len);
---
base-commit: 7aea2cea9ad5d9e1586112a57948c7f85dc12970
change-id: 20250113-tst_kconfig_stddef-544c3644d261
Best regards,
--
Ricardo B. Marliere <rbm@suse.com>
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [LTP] [PATCH] lib/tst_kconfig: Include stddef.h
2025-01-13 22:05 [LTP] [PATCH] lib/tst_kconfig: Include stddef.h Ricardo B. Marliere via ltp
@ 2025-01-14 2:55 ` Petr Vorel
2025-01-14 9:52 ` Petr Vorel
2025-01-14 13:18 ` Ricardo B. Marliere via ltp
0 siblings, 2 replies; 4+ messages in thread
From: Petr Vorel @ 2025-01-14 2:55 UTC (permalink / raw)
To: Ricardo B. Marliere; +Cc: Linux Test Project
Hi Ricardo,
> Currently, if a test wants to make use of tst_kconfig.h it must also
> include stddef.h due to the usage of size_t. While at it, fix a few minor
<stddef.h> or <stdlib.h>
Good catch, it should be corrected.
<stdlib.h> is used in lib/tst_test.c, thus tests have it for free,
but there are libraries, which load it as well.
> typos in comments.
FYI we usually split changes into commits (easier in case of revert),
but this is, of course, OK to keep.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Also, I wondered if we want to remove these includes in files they use
tst_kconfig.h, but probably not necessary.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] lib/tst_kconfig: Include stddef.h
2025-01-14 2:55 ` Petr Vorel
@ 2025-01-14 9:52 ` Petr Vorel
2025-01-14 13:18 ` Ricardo B. Marliere via ltp
1 sibling, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2025-01-14 9:52 UTC (permalink / raw)
To: Ricardo B. Marliere, Linux Test Project
Hi Ricardo,
merged, thanks!
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] lib/tst_kconfig: Include stddef.h
2025-01-14 2:55 ` Petr Vorel
2025-01-14 9:52 ` Petr Vorel
@ 2025-01-14 13:18 ` Ricardo B. Marliere via ltp
1 sibling, 0 replies; 4+ messages in thread
From: Ricardo B. Marliere via ltp @ 2025-01-14 13:18 UTC (permalink / raw)
To: Petr Vorel; +Cc: Linux Test Project
Hi Petr!
On 14 Jan 25 03:55, Petr Vorel wrote:
> Hi Ricardo,
>
> > Currently, if a test wants to make use of tst_kconfig.h it must also
> > include stddef.h due to the usage of size_t. While at it, fix a few minor
>
> <stddef.h> or <stdlib.h>
>
> Good catch, it should be corrected.
>
> <stdlib.h> is used in lib/tst_test.c, thus tests have it for free,
> but there are libraries, which load it as well.
>
> > typos in comments.
>
> FYI we usually split changes into commits (easier in case of revert),
> but this is, of course, OK to keep.
I'm aware, but when I was about to send I noticed these and figured it
wouldn't hurt to bundle them in :)
>
>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>
> Also, I wondered if we want to remove these includes in files they use
> tst_kconfig.h, but probably not necessary.
I'll do some quick grepping to investigate.
Thanks for reviewing,
- Ricardo.
>
> Kind regards,
> Petr
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-01-14 13:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-13 22:05 [LTP] [PATCH] lib/tst_kconfig: Include stddef.h Ricardo B. Marliere via ltp
2025-01-14 2:55 ` Petr Vorel
2025-01-14 9:52 ` Petr Vorel
2025-01-14 13:18 ` Ricardo B. Marliere via ltp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox