public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: linux-kernel@vger.kernel.org, hpa@zytor.com
Cc: Vivek Goyal <vgoyal@redhat.com>
Subject: [PATCH 1/2] x86/boot: Do not include boot.h in string.c
Date: Fri, 25 Apr 2014 13:46:11 -0400	[thread overview]
Message-ID: <1398447972-27896-2-git-send-email-vgoyal@redhat.com> (raw)
In-Reply-To: <1398447972-27896-1-git-send-email-vgoyal@redhat.com>

string.c does not require whole of boot.h. Just inclusion of linux/types.h
and ctypes.h seems to be sufficient.

Keep list of stuff being included in string.c to bare minimal so that
string.c can be included in other places easily.

For example, Currently boot/compressed/string.c includes boot/string.c
but looks like it does not want boot/boot.h. Hence there is a define
in boot/compressed/misc.h "define BOOT_BOOT_H" which prevents inclusion
of boot.h in compressed/string.c. And compressed/string.c is forced to
include misc.h just for that reason.

So by removing inclusion of boot.h, we can also get rid of inclusion of
misch.h in compressed/misc.c.

This also enables including of boot/string.c in purgatory/ code relatively
easily.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
---
 arch/x86/boot/string.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/boot/string.c b/arch/x86/boot/string.c
index 5339040..aca52b8 100644
--- a/arch/x86/boot/string.c
+++ b/arch/x86/boot/string.c
@@ -12,7 +12,8 @@
  * Very basic string functions
  */
 
-#include "boot.h"
+#include <linux/types.h>
+#include "ctype.h"
 
 /*
  * This file gets included in compressed/string.c which might pull in
-- 
1.9.0


  reply	other threads:[~2014-04-25 17:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-25 17:46 [PATCH 0/2] x86/boot: Small string.c cleanups Vivek Goyal
2014-04-25 17:46 ` Vivek Goyal [this message]
2014-05-08 15:09   ` [tip:x86/boot] x86, boot: Do not include boot.h in string.c tip-bot for Vivek Goyal
2014-04-25 17:46 ` [PATCH 2/2] x86/boot: Remove misc.h inclusion from compressed/string.c Vivek Goyal
2014-05-08 15:09   ` [tip:x86/boot] x86, boot: Remove misc.h inclusion from compressed /string.c tip-bot for Vivek Goyal
2014-05-08 14:23 ` [PATCH 0/2] x86/boot: Small string.c cleanups Vivek Goyal

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=1398447972-27896-2-git-send-email-vgoyal@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox