Skip to contentSkip to conversation

powerpc: fix compile fail in hugetlb cmdline parsing

PATCH In review Paul Gortmaker 4 participants 4 messages May 7, 2012 – May 9, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: fix compile fail in hugetlb cmdline parsing

Commit 9fb48c744ba6a4bf58b666f4e6fdac3008ea1bd4

"params: add 3rd arg to option handler callback signature"

added an extra arg to the function, but didn't catch all the use cases needing it, causing this compile fail in mpc85xx_defconfig:

arch/powerpc/mm/hugetlbpage.c:316:4: error: passing argument 7 of 'parse_args' from incompatible pointer type [-Werror]

include/linux/moduleparam.h:317:12: note: expected

	 'int (*)(char *, char *, const char *)' but argument is of type
	 'int (*)(char *, char *)'

This function has no need to printk out the "doing" value, so just add the arg as an "unused".

Cc Rusty Russell <[email protected]>
Cc Jim Cromie <[email protected]>
Cc Jason Baron <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Becky Bruce <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
arch/powerpc/mm/hugetlbpage.c +2 -1
index fb05b12..1a6de0a 100644
@@ -271,7 +271,8 @@ int alloc_bootmem_huge_page(struct hstate *hstate)
 
 unsigned long gpage_npages[MMU_PAGE_COUNT];
 
-static int __init do_gpage_early_setup(char *param, char *val)
+static int __init do_gpage_early_setup(char *param, char *val,
+				       const char *unused)
 {
 	static phys_addr_t size;
 	unsigned long npages;
Signature · 1 line
1.7.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 17 lines · Paul Gortmaker

Commit 9fb48c744ba6a4bf58b666f4e6fdac3008ea1bd4

"params: add 3rd arg to option handler callback signature"

added an extra arg to the function, but didn't catch all the use cases needing it, causing this compile fail in mpc85xx_defconfig:

arch/powerpc/mm/hugetlbpage.c:316:4: error: passing argument 7 of 'parse_args' from incompatible pointer type [-Werror]

include/linux/moduleparam.h:317:12: note: expected

	 'int (*)(char *, char *, const char *)' but argument is of type
	 'int (*)(char *, char *)'

This function has no need to printk out the "doing" value, so just add the arg as an "unused".

Quoted 7 lines
Cc Rusty Russell <[email protected]>
Cc Jim Cromie <[email protected]>
Cc Jason Baron <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Becky Bruce <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>

Thanks,
Rusty.

#2 lore raw
Quoted 26 lines · Rusty Russell
Quoted 17 lines · Paul Gortmaker

Commit 9fb48c744ba6a4bf58b666f4e6fdac3008ea1bd4

"params: add 3rd arg to option handler callback signature"

added an extra arg to the function, but didn't catch all the use cases needing it, causing this compile fail in mpc85xx_defconfig:

arch/powerpc/mm/hugetlbpage.c:316:4: error: passing argument 7 of 'parse_args' from incompatible pointer type [-Werror]

include/linux/moduleparam.h:317:12: note: expected

	 'int (*)(char *, char *, const char *)' but argument is of type
	 'int (*)(char *, char *)'

This function has no need to printk out the "doing" value, so just add the arg as an "unused".

Quoted 7 lines
Cc Rusty Russell <[email protected]>
Cc Jim Cromie <[email protected]>
Cc Jason Baron <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Becky Bruce <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Quoted 1 line

This is for -next right ? IE. I don't seem to have the faulty commit in my tree so I can't carry the fix for now.... or am I missing something ?

Cheers,
Ben.

#3 lore raw

Hi Ben,

Quoted 28 lines · On Wed, 09 May 2012 13:04:18 +1000 Benjamin Herrenschmidt…
Quoted 26 lines · Rusty Russell
Quoted 24 lines · Paul Gortmaker

Commit 9fb48c744ba6a4bf58b666f4e6fdac3008ea1bd4

"params: add 3rd arg to option handler callback signature"

added an extra arg to the function, but didn't catch all the use cases needing it, causing this compile fail in mpc85xx_defconfig:

arch/powerpc/mm/hugetlbpage.c:316:4: error: passing argument 7 of 'parse_args' from incompatible pointer type [-Werror]

include/linux/moduleparam.h:317:12: note: expected

	 'int (*)(char *, char *, const char *)' but argument is of type
	 'int (*)(char *, char *)'

This function has no need to printk out the "doing" value, so just add the arg as an "unused".

Cc Rusty Russell <[email protected]>
Cc Jim Cromie <[email protected]>
Cc Jason Baron <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Becky Bruce <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Quoted 5 lines
Quoted 1 line

This is for -next right ? IE. I don't seem to have the faulty commit in my tree so I can't carry the fix for now.... or am I missing something ?

This patch has been added to the driver-core tree which contains the faulty commit ...

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]