All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND][PATCH] mtd: refactor call to request_module
@ 2013-07-08 13:05 ` Kees Cook
  0 siblings, 0 replies; 12+ messages in thread
From: Kees Cook @ 2013-07-08 13:05 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, David Woodhouse, James Hogan, Rusty Russell, linux-mtd

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [RESEND][PATCH] mtd: refactor call to request_module
@ 2013-07-08 13:05 ` Kees Cook
  0 siblings, 0 replies; 12+ messages in thread
From: Kees Cook @ 2013-07-08 13:05 UTC (permalink / raw)
  To: akpm; +Cc: linux-mtd, Rusty Russell, James Hogan, David Woodhouse, linux-kernel

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] mtd: refactor call to request_module
  2013-07-08 13:05 ` Kees Cook
@ 2013-07-10  3:10   ` Rusty Russell
  -1 siblings, 0 replies; 12+ messages in thread
From: Rusty Russell @ 2013-07-10  3:10 UTC (permalink / raw)
  To: Kees Cook, akpm; +Cc: linux-kernel, David Woodhouse, James Hogan, linux-mtd

Kees Cook <keescook@chromium.org> writes:
> 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>

Acked-by: Rusty Russell <rusty@rustcorp.com.au>

Thanks,
Rusty.

> ---
>  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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] mtd: refactor call to request_module
@ 2013-07-10  3:10   ` Rusty Russell
  0 siblings, 0 replies; 12+ messages in thread
From: Rusty Russell @ 2013-07-10  3:10 UTC (permalink / raw)
  To: Kees Cook, akpm; +Cc: linux-mtd, James Hogan, David Woodhouse, linux-kernel

Kees Cook <keescook@chromium.org> writes:
> 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>

Acked-by: Rusty Russell <rusty@rustcorp.com.au>

Thanks,
Rusty.

> ---
>  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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] mtd: refactor call to request_module
  2013-07-10  3:10   ` Rusty Russell
@ 2013-07-10  8:40     ` James Hogan
  -1 siblings, 0 replies; 12+ messages in thread
From: James Hogan @ 2013-07-10  8:40 UTC (permalink / raw)
  To: Rusty Russell; +Cc: Kees Cook, akpm, linux-kernel, David Woodhouse, linux-mtd

On 10/07/13 04:10, Rusty Russell wrote:
> Kees Cook <keescook@chromium.org> writes:
>> 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>
> 
> Acked-by: Rusty Russell <rusty@rustcorp.com.au>

I remember reviewing this before, so feel free to add my:

Reviewed-by: James Hogan <james.hogan@imgtec.com>

Cheers
James


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] mtd: refactor call to request_module
@ 2013-07-10  8:40     ` James Hogan
  0 siblings, 0 replies; 12+ messages in thread
From: James Hogan @ 2013-07-10  8:40 UTC (permalink / raw)
  To: Rusty Russell; +Cc: linux-mtd, akpm, David Woodhouse, Kees Cook, linux-kernel

On 10/07/13 04:10, Rusty Russell wrote:
> Kees Cook <keescook@chromium.org> writes:
>> 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>
> 
> Acked-by: Rusty Russell <rusty@rustcorp.com.au>

I remember reviewing this before, so feel free to add my:

Reviewed-by: James Hogan <james.hogan@imgtec.com>

Cheers
James

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] mtd: refactor call to request_module
  2013-07-08 13:05 ` Kees Cook
@ 2013-08-02 15:53   ` Artem Bityutskiy
  -1 siblings, 0 replies; 12+ messages in thread
From: Artem Bityutskiy @ 2013-08-02 15:53 UTC (permalink / raw)
  To: Kees Cook
  Cc: akpm, linux-mtd, Rusty Russell, James Hogan, David Woodhouse,
	linux-kernel

On Mon, 2013-07-08 at 06:05 -0700, Kees Cook wrote:
> 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>

Pushed to l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] mtd: refactor call to request_module
@ 2013-08-02 15:53   ` Artem Bityutskiy
  0 siblings, 0 replies; 12+ messages in thread
From: Artem Bityutskiy @ 2013-08-02 15:53 UTC (permalink / raw)
  To: Kees Cook
  Cc: James Hogan, Rusty Russell, linux-kernel, linux-mtd, akpm,
	David Woodhouse

On Mon, 2013-07-08 at 06:05 -0700, Kees Cook wrote:
> 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>

Pushed to l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] mtd: refactor call to request_module
  2013-05-22 23:51 ` Kees Cook
@ 2013-05-23  4:15   ` Rusty Russell
  -1 siblings, 0 replies; 12+ messages in thread
From: Rusty Russell @ 2013-05-23  4:15 UTC (permalink / raw)
  To: Kees Cook, linux-kernel; +Cc: akpm, David Woodhouse, James Hogan, linux-mtd

Kees Cook <keescook@chromium.org> writes:

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

I like the patch.  If dwmw2 doesn't grab it, Andrew please take.

Thanks,
Rusty.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] mtd: refactor call to request_module
@ 2013-05-23  4:15   ` Rusty Russell
  0 siblings, 0 replies; 12+ messages in thread
From: Rusty Russell @ 2013-05-23  4:15 UTC (permalink / raw)
  To: Kees Cook, linux-kernel; +Cc: linux-mtd, akpm, James Hogan, David Woodhouse

Kees Cook <keescook@chromium.org> writes:

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

I like the patch.  If dwmw2 doesn't grab it, Andrew please take.

Thanks,
Rusty.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [RESEND][PATCH] mtd: refactor call to request_module
@ 2013-05-22 23:51 ` Kees Cook
  0 siblings, 0 replies; 12+ messages in thread
From: Kees Cook @ 2013-05-22 23:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, David Woodhouse, James Hogan, Rusty Russell, linux-mtd

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [RESEND][PATCH] mtd: refactor call to request_module
@ 2013-05-22 23:51 ` Kees Cook
  0 siblings, 0 replies; 12+ messages in thread
From: Kees Cook @ 2013-05-22 23:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-mtd, akpm, James Hogan, David Woodhouse, Rusty Russell

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-08-02 15:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-08 13:05 [RESEND][PATCH] mtd: refactor call to request_module Kees Cook
2013-07-08 13:05 ` Kees Cook
2013-07-10  3:10 ` Rusty Russell
2013-07-10  3:10   ` Rusty Russell
2013-07-10  8:40   ` James Hogan
2013-07-10  8:40     ` James Hogan
2013-08-02 15:53 ` Artem Bityutskiy
2013-08-02 15:53   ` Artem Bityutskiy
  -- strict thread matches above, loose matches on Subject: below --
2013-05-22 23:51 Kees Cook
2013-05-22 23:51 ` Kees Cook
2013-05-23  4:15 ` Rusty Russell
2013-05-23  4:15   ` Rusty Russell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.