All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Kolpackov <boris@codesynthesis.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>,
	linux-kbuild@vger.kernel.org,
	Boris Kolpackov <boris@codesynthesis.com>
Subject: [PATCH 2/2] kconfig: clean up header inclusion
Date: Thu, 29 Oct 2020 17:51:52 +0200	[thread overview]
Message-ID: <20201029155152.2467-3-boris@codesynthesis.com> (raw)
In-Reply-To: <20201029155152.2467-1-boris@codesynthesis.com>

- 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


  parent reply	other threads:[~2020-10-29 15:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Boris Kolpackov [this message]
2020-11-02  4:27   ` [PATCH 2/2] kconfig: clean up header inclusion 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201029155152.2467-3-boris@codesynthesis.com \
    --to=boris@codesynthesis.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mcgrof@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.