Skip to content

Commit

Permalink
x86, boot: Remove misc.h inclusion from compressed/string.c
Browse files Browse the repository at this point in the history
Given the fact that we removed inclusion of boot.h from boot/string.c
does not look like we need misc.h inclusion in compressed/string.c. So
remove it.

misc.h was also pulling in string_32.h which in turn had macros for
memcmp and memcpy. So we don't need to #undef memcmp and memcpy anymore.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Link: http://lkml.kernel.org/r/1398447972-27896-3-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 3d37922 commit a9a1710
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
4 changes: 0 additions & 4 deletions arch/x86/boot/compressed/string.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#include "misc.h"
#include "../string.c"

/* misc.h might pull in string_32.h which has a macro for memcpy. undef that */
#undef memcpy

#ifdef CONFIG_X86_32
void *memcpy(void *dest, const void *src, size_t n)
{
Expand Down
6 changes: 0 additions & 6 deletions arch/x86/boot/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
#include <linux/types.h>
#include "ctype.h"

/*
* This file gets included in compressed/string.c which might pull in
* string_32.h and which in turn maps memcmp to __builtin_memcmp(). Undo
* that first.
*/
#undef memcmp
int memcmp(const void *s1, const void *s2, size_t len)
{
u8 diff;
Expand Down

0 comments on commit a9a1710

Please sign in to comment.