From: Kees Cook <keescook@chromium.org>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, David Woodhouse <dwmw2@infradead.org>,
James Hogan <james.hogan@imgtec.com>,
Rusty Russell <rusty@rustcorp.com.au>,
linux-mtd@lists.infradead.org
Subject: [RESEND][PATCH] mtd: refactor call to request_module
Date: Wed, 22 May 2013 16:51:02 -0700 [thread overview]
Message-ID: <20130522235102.GA22498@www.outflux.net> (raw)
This reduces the size of the stack frame when calling request_module().
Performing the sprintf before the call is not needed.
Signed-off-by: Kees Cook <keescook@chromium.org>
---
drivers/mtd/chips/gen_probe.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mtd/chips/gen_probe.c b/drivers/mtd/chips/gen_probe.c
index 74dbb6b..ffb36ba 100644
--- a/drivers/mtd/chips/gen_probe.c
+++ b/drivers/mtd/chips/gen_probe.c
@@ -211,9 +211,7 @@ static inline struct mtd_info *cfi_cmdset_unknown(struct map_info *map,
probe_function = __symbol_get(probename);
if (!probe_function) {
- char modname[sizeof("cfi_cmdset_%4.4X")];
- sprintf(modname, "cfi_cmdset_%4.4X", type);
- request_module(modname);
+ request_module("cfi_cmdset_%4.4X", type);
probe_function = __symbol_get(probename);
}
--
1.7.9.5
--
Kees Cook
Chrome OS Security
next reply other threads:[~2013-05-22 23:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-22 23:51 Kees Cook [this message]
2013-05-23 4:15 ` Rusty Russell
2013-07-08 13:05 Kees Cook
2013-07-10 3:10 ` Rusty Russell
2013-07-10 8:40 ` James Hogan
2013-08-02 15:53 ` Artem Bityutskiy
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=20130522235102.GA22498@www.outflux.net \
--to=keescook@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=dwmw2@infradead.org \
--cc=james.hogan@imgtec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=rusty@rustcorp.com.au \
/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
all inboxes | Powered by JetHome®