* [PATCH] iosched: remove redundant sprintf
@ 2011-05-04 15:38 Kees Cook
2011-05-06 0:02 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2011-05-04 15:38 UTC (permalink / raw)
To: linux-kernel; +Cc: Jens Axboe
After the anticipatory scheduler was dropped, there was no need to
special-case the request_module string. As such, drop the redundant
sprintf and stack variable.
Signed-off-by: Kees Cook <kees.cook@canonical.com>
---
block/elevator.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/block/elevator.c b/block/elevator.c
index 45ca1e3..2a0b653 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -155,13 +155,8 @@ static struct elevator_type *elevator_get(const char *name)
e = elevator_find(name);
if (!e) {
- char elv[ELV_NAME_MAX + strlen("-iosched")];
-
spin_unlock(&elv_list_lock);
-
- snprintf(elv, sizeof(elv), "%s-iosched", name);
-
- request_module("%s", elv);
+ request_module("%s-iosched", name);
spin_lock(&elv_list_lock);
e = elevator_find(name);
}
--
1.7.4.1
--
Kees Cook
Ubuntu Security Team
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iosched: remove redundant sprintf
2011-05-04 15:38 [PATCH] iosched: remove redundant sprintf Kees Cook
@ 2011-05-06 0:02 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2011-05-06 0:02 UTC (permalink / raw)
To: Kees Cook; +Cc: linux-kernel
On 2011-05-04 09:38, Kees Cook wrote:
> After the anticipatory scheduler was dropped, there was no need to
> special-case the request_module string. As such, drop the redundant
> sprintf and stack variable.
Thanks, applied to for-2.6.40/core
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-06 0:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-04 15:38 [PATCH] iosched: remove redundant sprintf Kees Cook
2011-05-06 0:02 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox