linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] remove open-coded memset.
@ 2015-09-02 14:14 Rob Landley
  0 siblings, 0 replies; only message in thread
From: Rob Landley @ 2015-09-02 14:14 UTC (permalink / raw)
  To: linux-sh

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(-)

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 */

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-02 14:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-02 14:14 [PATCH] remove open-coded memset Rob Landley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).