Skip to contentSkip to conversation

FIX for "kernel/sched.c:7743: warning: initialization from incompatible pointer type"

PATCH vibi sreenivasan 1 participant 1 message Jul 10, 2008 Linux-next tree

lore
Share & tools
lore
#0 lore raw

hello,
i have tried compiling linux-next tree by git clone 1 hour before (using git for first time). I tried compiling like this
make mrproper
make i386_defconfig
make bzImage

& got kernel/sched.c:7743: warning: initialization from incompatible pointer type

i have seen that

SYSDEV_ATTR macro expects function pointer with prototype ssize_t (*show)(struct sys_device *, struct sysdev_attribute *, char *); ssize_t (*store)(struct sys_device *, struct sysdev_attribute *,

			 const char *, size_t);

but actual function omits 2nd argument.

kernel/sched.c +0 -1
@@ -7731,12 +7731,13 @@ static ssize_t sched_power_savings_store
 }
 
 #ifdef CONFIG_SCHED_MC
-static ssize_t sched_mc_power_savings_show(struct sys_device *dev, char

*page)
+static ssize_t sched_mc_power_savings_show(struct sys_device *dev,
+ struct sysdev_attribute *attribute, char *page)
{
return sprintf(page, "%u\n", sched_mc_power_savings);
}
static ssize_t sched_mc_power_savings_store(struct sys_device *dev,
- const char *buf, size_t count)
+ struct sysdev_attribute *attribute,const char *buf, size_t count)
{
return sched_power_savings_store(buf, count, 0);
}

PLEASE REVIEW THIS & PARDON ME IF I HAVE WASTED UR TIME ,I AM NOT EXPERIENCED AS YOU ALL.
Thanks & Regards
vibi sreenivasan