aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--arch/mips/include/asm/elf.h4
-rw-r--r--drivers/net/ethernet/sgi/ioc3-eth.c6
3 files changed, 4 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 7a3c4548162b7f..eff3cfa754693c 100644
--- a/Makefile
+++ b/Makefile
@@ -318,7 +318,7 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
# Alternatively CROSS_COMPILE can be set in the environment.
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
-ARCH ?= $(SUBARCH)
+ARCH ?= mips
# Architecture as present in compile.h
UTS_MACHINE := $(ARCH)
diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
index 0eb1a75be10584..8f4ac12247393e 100644
--- a/arch/mips/include/asm/elf.h
+++ b/arch/mips/include/asm/elf.h
@@ -282,7 +282,7 @@ void mips_dump_regs64(u64 *uregs, const struct pt_regs *regs);
#define elfo32_check_arch(hdr) \
({ \
int __res = 1; \
- struct elfhdr *__h = (hdr); \
+ typeof(*(hdr)) *__h = (hdr); \
\
if (!mips_elf_check_machine(__h)) \
__res = 0; \
@@ -305,7 +305,7 @@ void mips_dump_regs64(u64 *uregs, const struct pt_regs *regs);
#define elfn64_check_arch(hdr) \
({ \
int __res = 1; \
- struct elfhdr *__h = (hdr); \
+ typeof(*(hdr)) *__h = (hdr); \
\
if (!mips_elf_check_machine(__h)) \
__res = 0; \
diff --git a/drivers/net/ethernet/sgi/ioc3-eth.c b/drivers/net/ethernet/sgi/ioc3-eth.c
index 18d533fdf14c49..b58c89fdc34841 100644
--- a/drivers/net/ethernet/sgi/ioc3-eth.c
+++ b/drivers/net/ethernet/sgi/ioc3-eth.c
@@ -1422,15 +1422,11 @@ static int ioc3_start_xmit(struct sk_buff *skb, struct net_device *dev)
/* Sum up dest addr, src addr and protocol */
ehsum = eh[0] + eh[1] + eh[2] + eh[3] + eh[4] + eh[5] + eh[6];
- /* Fold ehsum. can't use csum_fold which negates also ... */
- ehsum = (ehsum & 0xffff) + (ehsum >> 16);
- ehsum = (ehsum & 0xffff) + (ehsum >> 16);
-
/* Skip IP header; it's sum is always zero and was
already filled in by ip_output.c */
csum = csum_tcpudp_nofold(ih->saddr, ih->daddr,
ih->tot_len - (ih->ihl << 2),
- proto, 0xffff ^ ehsum);
+ proto, csum_fold(ehsum));
csum = (csum & 0xffff) + (csum >> 16); /* Fold again */
csum = (csum & 0xffff) + (csum >> 16);