[PATCH linux-next-0708] kernel/sched.c: Add missing attr parameter

This is a discussion on [PATCH linux-next-0708] kernel/sched.c: Add missing attr parameter within the Kernel forums, part of the Linux category; The second attribute parameter is missing in sched_*_show() and store() in kernel/sched.c, which has been added recently. CC kernel/sched.o kernel/sched.c:7743: warning: initialization from incompatible pointer type kernel/sched.c:7743: warning: initialization from ...

Go Back   Unix Linux Forum > Operating Systems > Linux > Kernel

FixUnix.com - Unix Linux Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-08-2008, 11:20 AM
Default [PATCH linux-next-0708] kernel/sched.c: Add missing attr parameter

The second attribute parameter is missing in sched_*_show() and
store() in kernel/sched.c, which has been added recently.

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

Signed-off-by: Takashi Iwai
---
diff --git a/kernel/sched.c b/kernel/sched.c
index 96cee36..4b27bd9 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7731,11 +7731,14 @@ 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 *attr,
+ char *page)
{
return sprintf(page, "%u\n", sched_mc_power_savings);
}
static ssize_t sched_mc_power_savings_store(struct sys_device *dev,
+ struct sysdev_attribute *attr,
const char *buf, size_t count)
{
return sched_power_savings_store(buf, count, 0);
@@ -7745,11 +7748,14 @@ 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 *attr,
+ char *page)
{
return sprintf(page, "%u\n", sched_smt_power_savings);
}
static ssize_t sched_smt_power_savings_store(struct sys_device *dev,
+ struct sysdev_attribute *attr,
const char *buf, size_t count)
{
return sched_power_savings_store(buf, count, 1);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT -5. The time now is 01:24 AM.

In an effort to better serve ads to our visitors, cookies are used on Fixunix.com. For more information, check out our Privacy Policy.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Ad Management by RedTyger