Skip to contentSkip to conversation

Changed arguments to show & store methods for struct sysdev_attribute in kernel/sched.c

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Changed arguments to show & store methods for struct sysdev_attribute in kernel/sched.c

Hello,
From: Vibi sreenivasan <[email protected]>

FIXES THIS :

CC kernel/sched.o
kernel/sched.c:7743: warning: initialization from incompatible pointer type
kernel/sched.c:7743: warning: initialization from incompatible pointer type

caused by mismatch of function prototype of show & store method in struct sysdev_attribute

kernel/sched.c +0 -0
index 96cee36..8e83460 100644
@@ -7731,12 +7731,13 @@ static ssize_t sched_power_savings_store(const

char *buf, size_t count, int smt)
}

#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);
}
@@ -7745,12 +7746,13 @@ static SYSDEV_ATTR(sched_mc_power_savings, 0644, sched_mc_power_savings_show,
#endif

#ifdef CONFIG_SCHED_SMT
-static ssize_t sched_smt_power_savings_show(struct sys_device *dev, char *page)
+static ssize_t sched_smt_power_savings_show(struct sys_device *dev,
+ struct sysdev_attribute *attribute, char *page)
{
return sprintf(page, "%u\n", sched_smt_power_savings);
}
static ssize_t sched_smt_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, 1);
}

Thanks & Regards
vibi sreenivasan