Skip to contentSkip to conversation

arch: m32r: kernel: use 'COPY_UNALIGNED_HWORD' instead of 'COPY_UNALIGNED_WORD'

PATCH New Chen Gang 1 participant 1 message Jun 26, 2013 Generic include/asm header files

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 arch: m32r: kernel: use 'COPY_UNALIGNED_HWORD' instead of 'COPY_UNALIGNED_WORD'

For 'hvalue' and 'hlocation', need use 'COPY_UNALIGNED_HWORD' instead

The related warnings (with allmodconfig)
CC arch/m32r/kernel/module.o
arch/m32r/kernel/module.c: In function ‘apply_relocate_add’:
arch/m32r/kernel/module.c:127:8: warning: ‘*((void *)&hvalue+2)’ is used uninitialized in this function [-Wuninitialized] arch/m32r/kernel/module.c:127:8: warning: ‘*((void *)&hvalue+2)’ is used uninitialized in this function [-Wuninitialized] arch/m32r/kernel/module.c:127:8: warning: ‘*((void *)&hvalue+3)’ is used uninitialized in this function [-Wuninitialized]

---
 arch/m32r/kernel/module.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/m32r/kernel/module.c +1 -1
index 38233b6..bcad14c 100644
@@ -124,7 +124,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
                         relocation = relocation & 0xffff;
 			/* RELA must has 0 at relocation field. */
 			hvalue = relocation;
-	    		COPY_UNALIGNED_WORD (hvalue, *hlocation, align);
+			COPY_UNALIGNED_HWORD(hvalue, *hlocation, align);
 			break;
 		case R_M32R_SDA16_RELA:
 		case R_M32R_LO16_RELA:
Signature · 1 line
1.7.7.6