diff mbox

remove open-coded memset.

Message ID 55E7044C.1050304@landley.net (mailing list archive)
State Awaiting Upstream
Headers show

Commit Message

Rob Landley Sept. 2, 2015, 2:14 p.m. UTC
From: Rob Landley <rob@landley.net>

Why is the binflt loader open-coding memset?

Signed-off-by: Rob Landley <rob@landley.net>
---

 arch/sh/include/asm/flat.h |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/sh/include/asm/flat.h b/arch/sh/include/asm/flat.h
index 5d84df5..1feb3da 100644
--- a/arch/sh/include/asm/flat.h
+++ b/arch/sh/include/asm/flat.h
@@ -21,10 +21,6 @@ 
 #define	flat_set_persistent(relval, p)		({ (void)p; 0; })
 
 #define FLAT_PLAT_INIT(_r) \
-  do { _r->regs[0]=0; _r->regs[1]=0; _r->regs[2]=0; _r->regs[3]=0; \
-       _r->regs[4]=0; _r->regs[5]=0; _r->regs[6]=0; _r->regs[7]=0; \
-       _r->regs[8]=0; _r->regs[9]=0; _r->regs[10]=0; _r->regs[11]=0; \
-       _r->regs[12]=0; _r->regs[13]=0; _r->regs[14]=0; \
-       _r->sr = SR_FD; } while (0)
+  do { memset(_r->regs, 0, 15*sizeof(*_r->regs)); _r->sr = SR_FD; } while (0)
 
 #endif /* __ASM_SH_FLAT_H */