From: Rob Landley <rob@landley.net>
To: linux-sh@vger.kernel.org
Subject: [PATCH] remove open-coded memset.
Date: Wed, 02 Sep 2015 14:14:36 +0000 [thread overview]
Message-ID: <55E7044C.1050304@landley.net> (raw)
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 */
reply other threads:[~2015-09-02 14:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55E7044C.1050304@landley.net \
--to=rob@landley.net \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).