Skip to content

Commit

Permalink
x86, boot: Do not include boot.h in string.c
Browse files Browse the repository at this point in the history
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>
Link: http://lkml.kernel.org/r/1398447972-27896-2-git-send-email-vgoyal@redhat.com
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
  • Loading branch information
Vivek Goyal authored and H. Peter Anvin committed May 8, 2014
1 parent 89ca3b8 commit 3d37922
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/boot/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3d37922

Please sign in to comment.