Compiler error in last git kernel [drivers/char/ipmi/ipmi_devintf.c]
CC [M] drivers/char/ipmi/ipmi_devintf.odrivers/char/ipmi/ipmi_devintf.c: In function `ipmi_new_smi':drivers/char/ipmi/ipmi_devintf.c:532: warning: passing arg 1 of class_simple_device_add' from incompatible pointer type drivers/char/ipmi/ipmi_devintf.c: In function ipmi_smi_gone':drivers/char/ipmi/ipmi_devintf.c:537: warning: passing arg 1 of class_simple_device_remove' makes integer from pointer without a cast drivers/char/ipmi/ipmi_devintf.c:537: error: too many arguments to function class_simple_device_remove' drivers/char/ipmi/ipmi_devintf.c: In function `init_ipmi_devintf':drivers/char/ipmi/ipmi_devintf.c:558: warning: assignment from incompatible pointer type drivers/char/ipmi/ipmi_devintf.c:566: warning: passing arg 1 of class_simple_destroy' from incompatible pointer type drivers/char/ipmi/ipmi_devintf.c:580: warning: passing arg 1 of class_simple_destroy' from incompatible pointer type drivers/char/ipmi/ipmi_devintf.c: In function `cleanup_ipmi':drivers/char/ipmi/ipmi_devintf.c:591: warning: passing arg 1 of `class_simple_destroy' from incompatible pointer type make[3]: *** [drivers/char/ipmi/ipmi_devintf.o] Error 1
ciao
cate
PATCH 1/1 ipmi: Compiler error in last git kernel [drivers/char/ipmi/ipmi_devintf.c]
Heres the fix. Looks pretty straight forward
ipmi_devintf.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/char/ipmi/ipmi_devintf.c renamed from drivers/char/ipmi/ipmi_devintf.c.buildbreak +2 -2
@@ -520,7 +520,7 @@ MODULE_PARM_DESC(ipmi_major, "Sets the m" interface. Other values will set the major device number" " to that value."); -static struct class *ipmi_class; +static struct class_simple *ipmi_class;static void ipmi_new_smi (int if_num) {
@@ -534,7 +534,7 @@ static void ipmi_new_smi(int if_num)static void ipmi_smi_gone (int if_num) { -class_simple_device_remove (ipmi_class,MKDEV (ipmi_major, if_num)); +class_simple_device_remove (MKDEV (ipmi_major, if_num));devfs_remove ("ipmidev/%d" , if_num); }
Signature · 8 lines
/*************************************************** *Neil Horman *Software Engineer *Red Hat, Inc. *[email protected] *gpg keyid: 1024D / 0x92A74FA1 *http://pgp.mit.edu ***************************************************/