Skip to contentSkip to conversation

firmware: use noinline_for_stack

PATCH In review Cesar Eduardo Barros 3 participants 3 messages Oct 27, 2012 – Oct 28, 2012 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 firmware: use noinline_for_stack

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 <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Linus Torvalds <[email protected]>
---
 drivers/base/firmware_class.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/firmware_class.c +1 -1
index 8945f4e..620b876 100644
@@ -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))
Signature · 1 line
1.7.11.7
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Cesar Eduardo Barros

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

Thanks,
--
Ming Lei

#2 lore raw
Quoted 4 lines · Ming Lei
Quoted 2 lines

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

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,

Signature · 2 lines
Jiri Kosina
SUSE Labs