* [PATCH 0/2] kconfig: header inclusion cleanups
@ 2020-10-29 15:51 Boris Kolpackov
2020-10-29 15:51 ` [PATCH 1/2] kconfig: make lkc.h self-sufficient #include-wise Boris Kolpackov
2020-10-29 15:51 ` [PATCH 2/2] kconfig: clean up header inclusion Boris Kolpackov
0 siblings, 2 replies; 9+ messages in thread
From: Boris Kolpackov @ 2020-10-29 15:51 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: Luis Chamberlain, linux-kbuild, Boris Kolpackov
Add missing and remove no longer necessary header inclusions.
Boris Kolpackov (2):
kconfig: make lkc.h self-sufficient #include-wise
kconfig: clean up header inclusion
scripts/kconfig/conf.c | 6 +++---
scripts/kconfig/confdata.c | 4 +++-
scripts/kconfig/lexer.l | 1 -
scripts/kconfig/lkc.h | 4 ++++
scripts/kconfig/symbol.c | 3 ++-
5 files changed, 12 insertions(+), 6 deletions(-)
--
2.29.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] kconfig: make lkc.h self-sufficient #include-wise
2020-10-29 15:51 [PATCH 0/2] kconfig: header inclusion cleanups Boris Kolpackov
@ 2020-10-29 15:51 ` Boris Kolpackov
2020-11-02 3:40 ` Masahiro Yamada
2020-10-29 15:51 ` [PATCH 2/2] kconfig: clean up header inclusion Boris Kolpackov
1 sibling, 1 reply; 9+ messages in thread
From: Boris Kolpackov @ 2020-10-29 15:51 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: Luis Chamberlain, linux-kbuild, Boris Kolpackov
Signed-off-by: Boris Kolpackov <boris@codesynthesis.com>
---
scripts/kconfig/lkc.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index 8454649..3e2c70e 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -6,6 +6,10 @@
#ifndef LKC_H
#define LKC_H
+#include <stdio.h>
+#include <assert.h>
+#include <stdlib.h>
+
#include "expr.h"
#ifdef __cplusplus
--
2.29.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] kconfig: clean up header inclusion
2020-10-29 15:51 [PATCH 0/2] kconfig: header inclusion cleanups Boris Kolpackov
2020-10-29 15:51 ` [PATCH 1/2] kconfig: make lkc.h self-sufficient #include-wise Boris Kolpackov
@ 2020-10-29 15:51 ` Boris Kolpackov
2020-11-02 4:27 ` Masahiro Yamada
1 sibling, 1 reply; 9+ messages in thread
From: Boris Kolpackov @ 2020-10-29 15:51 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: Luis Chamberlain, linux-kbuild, Boris Kolpackov
- Add missing includes.
- Remove no longer necessary includes.
- Separate non-portable header includes for easier porting.
Signed-off-by: Boris Kolpackov <boris@codesynthesis.com>
---
scripts/kconfig/conf.c | 6 +++---
scripts/kconfig/confdata.c | 4 +++-
scripts/kconfig/lexer.l | 1 -
scripts/kconfig/symbol.c | 3 ++-
4 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index f6e548b..74974df 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -9,12 +9,12 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include <unistd.h>
#include <getopt.h>
-#include <sys/stat.h>
-#include <sys/time.h>
#include <errno.h>
+#include <unistd.h>
+#include <sys/time.h>
+
#include "lkc.h"
static void conf(struct menu *menu);
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index a39d93e..64344b9 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -3,7 +3,7 @@
* Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
*/
-#include <sys/mman.h>
+#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#include <errno.h>
@@ -14,7 +14,9 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
+
#include <unistd.h>
+#include <sys/mman.h>
#include "lkc.h"
diff --git a/scripts/kconfig/lexer.l b/scripts/kconfig/lexer.l
index 240109f..9c22cb5 100644
--- a/scripts/kconfig/lexer.l
+++ b/scripts/kconfig/lexer.l
@@ -12,7 +12,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include "lkc.h"
#include "parser.tab.h"
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index ffa3ec6..0e0f1cc 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -6,8 +6,9 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/types.h> // off_t
+
#include <regex.h>
-#include <sys/utsname.h>
#include "lkc.h"
--
2.29.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] kconfig: make lkc.h self-sufficient #include-wise
2020-10-29 15:51 ` [PATCH 1/2] kconfig: make lkc.h self-sufficient #include-wise Boris Kolpackov
@ 2020-11-02 3:40 ` Masahiro Yamada
0 siblings, 0 replies; 9+ messages in thread
From: Masahiro Yamada @ 2020-11-02 3:40 UTC (permalink / raw)
To: Boris Kolpackov; +Cc: Luis Chamberlain, Linux Kbuild mailing list
On Fri, Oct 30, 2020 at 12:52 AM Boris Kolpackov
<boris@codesynthesis.com> wrote:
>
> Signed-off-by: Boris Kolpackov <boris@codesynthesis.com>
> ---
> scripts/kconfig/lkc.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
> index 8454649..3e2c70e 100644
> --- a/scripts/kconfig/lkc.h
> +++ b/scripts/kconfig/lkc.h
> @@ -6,6 +6,10 @@
> #ifndef LKC_H
> #define LKC_H
>
> +#include <stdio.h>
> +#include <assert.h>
> +#include <stdlib.h>
> +
> #include "expr.h"
>
> #ifdef __cplusplus
> --
> 2.29.0
>
Applied to linux-kbuild.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] kconfig: clean up header inclusion
2020-10-29 15:51 ` [PATCH 2/2] kconfig: clean up header inclusion Boris Kolpackov
@ 2020-11-02 4:27 ` Masahiro Yamada
2020-11-02 14:32 ` Boris Kolpackov
0 siblings, 1 reply; 9+ messages in thread
From: Masahiro Yamada @ 2020-11-02 4:27 UTC (permalink / raw)
To: Boris Kolpackov; +Cc: Luis Chamberlain, Linux Kbuild mailing list
On Fri, Oct 30, 2020 at 12:52 AM Boris Kolpackov
<boris@codesynthesis.com> wrote:
>
> - Add missing includes.
> - Remove no longer necessary includes.
> - Separate non-portable header includes for easier porting.
I think the definition of "non-portable"
depends on how far we expand the supported system.
I guess you want to segregate <unistd.h> and <sys/mmap.h>
because you do not have them on Windows, correct?
>
> Signed-off-by: Boris Kolpackov <boris@codesynthesis.com>
> ---
> scripts/kconfig/conf.c | 6 +++---
> scripts/kconfig/confdata.c | 4 +++-
> scripts/kconfig/lexer.l | 1 -
> scripts/kconfig/symbol.c | 3 ++-
> 4 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
> index f6e548b..74974df 100644
> --- a/scripts/kconfig/conf.c
> +++ b/scripts/kconfig/conf.c
> @@ -9,12 +9,12 @@
> #include <stdlib.h>
> #include <string.h>
> #include <time.h>
> -#include <unistd.h>
> #include <getopt.h>
> -#include <sys/stat.h>
> -#include <sys/time.h>
> #include <errno.h>
>
> +#include <unistd.h>
> +#include <sys/time.h>
> +
> #include "lkc.h"
>
> static void conf(struct menu *menu);
> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> index a39d93e..64344b9 100644
> --- a/scripts/kconfig/confdata.c
> +++ b/scripts/kconfig/confdata.c
> @@ -3,7 +3,7 @@
> * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
> */
>
> -#include <sys/mman.h>
> +#include <sys/types.h>
> #include <sys/stat.h>
> #include <ctype.h>
> #include <errno.h>
> @@ -14,7 +14,9 @@
> #include <stdlib.h>
> #include <string.h>
> #include <time.h>
> +
> #include <unistd.h>
> +#include <sys/mman.h>
>
> #include "lkc.h"
>
> diff --git a/scripts/kconfig/lexer.l b/scripts/kconfig/lexer.l
> index 240109f..9c22cb5 100644
> --- a/scripts/kconfig/lexer.l
> +++ b/scripts/kconfig/lexer.l
> @@ -12,7 +12,6 @@
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> -#include <unistd.h>
>
> #include "lkc.h"
> #include "parser.tab.h"
> diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
> index ffa3ec6..0e0f1cc 100644
> --- a/scripts/kconfig/symbol.c
> +++ b/scripts/kconfig/symbol.c
> @@ -6,8 +6,9 @@
> #include <ctype.h>
> #include <stdlib.h>
> #include <string.h>
> +#include <sys/types.h> // off_t
> +
> #include <regex.h>
> -#include <sys/utsname.h>
>
> #include "lkc.h"
>
> --
> 2.29.0
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] kconfig: clean up header inclusion
2020-11-02 4:27 ` Masahiro Yamada
@ 2020-11-02 14:32 ` Boris Kolpackov
2020-11-23 5:19 ` Masahiro Yamada
0 siblings, 1 reply; 9+ messages in thread
From: Boris Kolpackov @ 2020-11-02 14:32 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: Luis Chamberlain, Linux Kbuild mailing list
Masahiro Yamada <masahiroy@kernel.org> writes:
> On Fri, Oct 30, 2020 at 12:52 AM Boris Kolpackov
> <boris@codesynthesis.com> wrote:
> >
> > - Add missing includes.
> > - Remove no longer necessary includes.
> > - Separate non-portable header includes for easier porting.
>
> I think the definition of "non-portable"
> depends on how far we expand the supported system.
>
> I guess you want to segregate <unistd.h> and <sys/mmap.h>
> because you do not have them on Windows, correct?
Correct. I have a set of patches that make kconfig portable to
Windows. I assume there is no interest in these patches here so
I will be maintaining them out of tree (but let me know if my
assumption is wrong and I will happily submit them). Splitting
the header inclusions into two blocks make these patches a bit
cleaner and more resilient to changes.
Let me know if you would like me to change the patch to (1)
clarify the non-portable part or (2) get rid of the split.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] kconfig: clean up header inclusion
2020-11-02 14:32 ` Boris Kolpackov
@ 2020-11-23 5:19 ` Masahiro Yamada
2020-11-23 9:38 ` [PATCH v2 " Boris Kolpackov
0 siblings, 1 reply; 9+ messages in thread
From: Masahiro Yamada @ 2020-11-23 5:19 UTC (permalink / raw)
To: Boris Kolpackov; +Cc: Luis Chamberlain, Linux Kbuild mailing list
On Mon, Nov 2, 2020 at 11:32 PM Boris Kolpackov <boris@codesynthesis.com> wrote:
>
> Masahiro Yamada <masahiroy@kernel.org> writes:
>
> > On Fri, Oct 30, 2020 at 12:52 AM Boris Kolpackov
> > <boris@codesynthesis.com> wrote:
> > >
> > > - Add missing includes.
> > > - Remove no longer necessary includes.
> > > - Separate non-portable header includes for easier porting.
> >
> > I think the definition of "non-portable"
> > depends on how far we expand the supported system.
> >
> > I guess you want to segregate <unistd.h> and <sys/mmap.h>
> > because you do not have them on Windows, correct?
>
> Correct. I have a set of patches that make kconfig portable to
> Windows. I assume there is no interest in these patches here so
> I will be maintaining them out of tree (but let me know if my
> assumption is wrong and I will happily submit them). Splitting
> the header inclusions into two blocks make these patches a bit
> cleaner and more resilient to changes.
>
> Let me know if you would like me to change the patch to (1)
> clarify the non-portable part or (2) get rid of the split.
If you send v2 with the first two items:
- Add missing includes.
- Remove no longer necessary includes.
I will accept it.
I am not interested in the last one because
running kconfig on Windows
is not officially supported.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] kconfig: clean up header inclusion
2020-11-23 5:19 ` Masahiro Yamada
@ 2020-11-23 9:38 ` Boris Kolpackov
2020-11-23 12:19 ` Masahiro Yamada
0 siblings, 1 reply; 9+ messages in thread
From: Boris Kolpackov @ 2020-11-23 9:38 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: Luis Chamberlain, Linux Kbuild mailing list
- Add missing includes.
- Remove no longer necessary includes.
---
v2: Don't re-arrange includes.
scripts/kconfig/conf.c | 1 -
scripts/kconfig/confdata.c | 1 +
scripts/kconfig/lexer.l | 1 -
scripts/kconfig/symbol.c | 2 +-
4 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index f6e548b..db03e2f 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -11,7 +11,6 @@
#include <time.h>
#include <unistd.h>
#include <getopt.h>
-#include <sys/stat.h>
#include <sys/time.h>
#include <errno.h>
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index a39d93e..2568dbe 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -5,6 +5,7 @@
#include <sys/mman.h>
#include <sys/stat.h>
+#include <sys/types.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
diff --git a/scripts/kconfig/lexer.l b/scripts/kconfig/lexer.l
index 240109f..9c22cb5 100644
--- a/scripts/kconfig/lexer.l
+++ b/scripts/kconfig/lexer.l
@@ -12,7 +12,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include "lkc.h"
#include "parser.tab.h"
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index ffa3ec6..fe38e6f 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -3,11 +3,11 @@
* Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
*/
+#include <sys/types.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <regex.h>
-#include <sys/utsname.h>
#include "lkc.h"
--
2.29.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] kconfig: clean up header inclusion
2020-11-23 9:38 ` [PATCH v2 " Boris Kolpackov
@ 2020-11-23 12:19 ` Masahiro Yamada
0 siblings, 0 replies; 9+ messages in thread
From: Masahiro Yamada @ 2020-11-23 12:19 UTC (permalink / raw)
To: Boris Kolpackov; +Cc: Luis Chamberlain, Linux Kbuild mailing list
On Mon, Nov 23, 2020 at 6:45 PM Boris Kolpackov <boris@codesynthesis.com> wrote:
>
> - Add missing includes.
> - Remove no longer necessary includes.
> ---
Applied to linux-kbuild. Thanks.
> v2: Don't re-arrange includes.
>
> scripts/kconfig/conf.c | 1 -
> scripts/kconfig/confdata.c | 1 +
> scripts/kconfig/lexer.l | 1 -
> scripts/kconfig/symbol.c | 2 +-
> 4 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
> index f6e548b..db03e2f 100644
> --- a/scripts/kconfig/conf.c
> +++ b/scripts/kconfig/conf.c
> @@ -11,7 +11,6 @@
> #include <time.h>
> #include <unistd.h>
> #include <getopt.h>
> -#include <sys/stat.h>
> #include <sys/time.h>
> #include <errno.h>
>
> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> index a39d93e..2568dbe 100644
> --- a/scripts/kconfig/confdata.c
> +++ b/scripts/kconfig/confdata.c
> @@ -5,6 +5,7 @@
>
> #include <sys/mman.h>
> #include <sys/stat.h>
> +#include <sys/types.h>
> #include <ctype.h>
> #include <errno.h>
> #include <fcntl.h>
> diff --git a/scripts/kconfig/lexer.l b/scripts/kconfig/lexer.l
> index 240109f..9c22cb5 100644
> --- a/scripts/kconfig/lexer.l
> +++ b/scripts/kconfig/lexer.l
> @@ -12,7 +12,6 @@
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> -#include <unistd.h>
>
> #include "lkc.h"
> #include "parser.tab.h"
> diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
> index ffa3ec6..fe38e6f 100644
> --- a/scripts/kconfig/symbol.c
> +++ b/scripts/kconfig/symbol.c
> @@ -3,11 +3,11 @@
> * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
> */
>
> +#include <sys/types.h>
> #include <ctype.h>
> #include <stdlib.h>
> #include <string.h>
> #include <regex.h>
> -#include <sys/utsname.h>
>
> #include "lkc.h"
>
> --
> 2.29.0
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-11-23 12:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29 15:51 [PATCH 0/2] kconfig: header inclusion cleanups Boris Kolpackov
2020-10-29 15:51 ` [PATCH 1/2] kconfig: make lkc.h self-sufficient #include-wise Boris Kolpackov
2020-11-02 3:40 ` Masahiro Yamada
2020-10-29 15:51 ` [PATCH 2/2] kconfig: clean up header inclusion Boris Kolpackov
2020-11-02 4:27 ` Masahiro Yamada
2020-11-02 14:32 ` Boris Kolpackov
2020-11-23 5:19 ` Masahiro Yamada
2020-11-23 9:38 ` [PATCH v2 " Boris Kolpackov
2020-11-23 12:19 ` Masahiro Yamada
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.