linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] firmware: use noinline_for_stack
@ 2012-10-27 22:37 Cesar Eduardo Barros
  2012-10-28 12:07 ` Ming Lei
  0 siblings, 1 reply; 3+ messages in thread
From: Cesar Eduardo Barros @ 2012-10-27 22:37 UTC (permalink / raw)
  To: Ming Lei
  Cc: linux-kernel, trivial, Cesar Eduardo Barros, Greg Kroah-Hartman,
	Linus Torvalds

The comment above fw_file_size() suggests it is noinline for stack size
reasons. Use noinline_for_stack to make this more clear.

Cc: Ming Lei <ming.lei@canonical.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
---
 drivers/base/firmware_class.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 8945f4e..620b876 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -275,7 +275,7 @@ static const char *fw_path[] = {
 };
 
 /* Don't inline this: 'struct kstat' is biggish */
-static noinline long fw_file_size(struct file *file)
+static noinline_for_stack long fw_file_size(struct file *file)
 {
 	struct kstat st;
 	if (vfs_getattr(file->f_path.mnt, file->f_path.dentry, &st))
-- 
1.7.11.7


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

* Re: [PATCH] firmware: use noinline_for_stack
  2012-10-27 22:37 [PATCH] firmware: use noinline_for_stack Cesar Eduardo Barros
@ 2012-10-28 12:07 ` Ming Lei
  2012-10-28 18:31   ` Jiri Kosina
  0 siblings, 1 reply; 3+ messages in thread
From: Ming Lei @ 2012-10-28 12:07 UTC (permalink / raw)
  To: Cesar Eduardo Barros
  Cc: linux-kernel, trivial, Greg Kroah-Hartman, Linus Torvalds

On Sun, Oct 28, 2012 at 6:37 AM, Cesar Eduardo Barros <cesarb@cesarb.net> wrote:
> The comment above fw_file_size() suggests it is noinline for stack size
> reasons. Use noinline_for_stack to make this more clear.

Acked-by: Ming Lei <ming.lei@canonical.com>



Thanks,
--
Ming Lei

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

* Re: [PATCH] firmware: use noinline_for_stack
  2012-10-28 12:07 ` Ming Lei
@ 2012-10-28 18:31   ` Jiri Kosina
  0 siblings, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2012-10-28 18:31 UTC (permalink / raw)
  To: Ming Lei
  Cc: Cesar Eduardo Barros, linux-kernel, Greg Kroah-Hartman, Linus Torvalds

On Sun, 28 Oct 2012, Ming Lei wrote:

> > The comment above fw_file_size() suggests it is noinline for stack size
> > reasons. Use noinline_for_stack to make this more clear.
> 
> Acked-by: Ming Lei <ming.lei@canonical.com>

Although I am not completely sure that documenting the purpose of noinline 
through this attribute is the nicest thing to do, it's been acked by 
maintainer and it's being used tree-wise, so I am taking this one.

Thanks,

-- 
Jiri Kosina
SUSE Labs

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

end of thread, other threads:[~2012-10-28 18:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-27 22:37 [PATCH] firmware: use noinline_for_stack Cesar Eduardo Barros
2012-10-28 12:07 ` Ming Lei
2012-10-28 18:31   ` Jiri Kosina

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