[PATCH 1/2] ARM: remove memmove from boot/compressed/string.c
Nicolas Pitre
nicolas.pitre at linaro.org
Thu Feb 16 12:44:52 EST 2012
On Thu, 16 Feb 2012, Michael Opdenacker wrote:
> This patch removes the memmove function from boot/compressed/string.c
... breaking CONFIG_ARM_ATAG_DTB_COMPAT.
> - This definition conflicts with the one in lib/decompress_unxz.c
> This change is required to support xz compression on ARM.
No, it's the decompress_unxz.c code which is wrong.
To work around it, just do:
#define memmove memmove
before including lib/decompress_unxz.c.
> - memmove is not used in any of the other decompressors
> in lib/decompress_*.c
Doesn't mean it isn't used at all.
Here's a trick. Next time you can do:
git blame arch/arm/boot/compressed/string.c
That will list all the file content, annotated with references to the
commits that brought them there.
Looking for memmove() you'll see that commit df4879fa260 is responsible
for it. Its commit log says:
ARM: zImage: gather some string functions into string.c
This is a small subset of string functions needed by commits to
come.
OK, doing a full 'git log' and searching for that commit, just to back
up to the next one you'll see:
ARM: zImage: allow supplementing appended DTB with traditional ATAG data
That explains why memmove() is required, and by which code.
Nicolas
More information about the linux-arm-kernel
mailing list