* 2.6.22-rc2 built on ppc
@ 2007-05-20 11:19 Elimar Riesebieter
2007-05-21 12:20 ` [PATCH] " Thomas Renninger
0 siblings, 1 reply; 2+ messages in thread
From: Elimar Riesebieter @ 2007-05-20 11:19 UTC (permalink / raw)
To: davej; +Cc: cpufreq
[-- Attachment #1.1: Type: text/plain, Size: 815 bytes --]
Hi,
FYI, building the kernel with
gcc (GCC) 4.1.3 20070514 (prerelease) (Debian 4.1.2-7)
on my powerbook (PPC) gives:
...
drivers/cpufreq/cpufreq.c: In function 'cpufreq_add_dev':
drivers/cpufreq/cpufreq.c:829: warning: ignoring return value of 'sysfs_create_file', declared with attribute warn_unused_result
drivers/cpufreq/cpufreq.c:833: warning: ignoring return value of 'sysfs_create_file', declared with attribute warn_unused_result
drivers/cpufreq/cpufreq.c:835: warning: ignoring return value of 'sysfs_create_file', declared with attribute warn_unused_result
...
If more info is needed, please contact me via PM, as I am not
subscribed.
Thanks for your patience
Elimar
--
Never make anything simple and efficient when a way
can be found to make it complex and wonderful ;-)
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 147 bytes --]
_______________________________________________
Cpufreq mailing list
Cpufreq@lists.linux.org.uk
http://lists.linux.org.uk/mailman/listinfo/cpufreq
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Re: 2.6.22-rc2 built on ppc
2007-05-20 11:19 2.6.22-rc2 built on ppc Elimar Riesebieter
@ 2007-05-21 12:20 ` Thomas Renninger
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Renninger @ 2007-05-21 12:20 UTC (permalink / raw)
To: Elimar Riesebieter; +Cc: davej, cpufreq
[-- Attachment #1: Type: text/plain, Size: 2005 bytes --]
On Sun, 2007-05-20 at 13:19 +0200, Elimar Riesebieter wrote:
> Hi,
>
> FYI, building the kernel with
> gcc (GCC) 4.1.3 20070514 (prerelease) (Debian 4.1.2-7)
> on my powerbook (PPC) gives:
> P
> ...
> drivers/cpufreq/cpufreq.c: In function 'cpufreq_add_dev':
> drivers/cpufreq/cpufreq.c:829: warning: ignoring return value of 'sysfs_create_file', declared with attribute warn_unused_result
> drivers/cpufreq/cpufreq.c:833: warning: ignoring return value of 'sysfs_create_file', declared with attribute warn_unused_result
> drivers/cpufreq/cpufreq.c:835: warning: ignoring return value of 'sysfs_create_file', declared with attribute warn_unused_result
> ...
This one should fix it:
Eliminate build warning (sysfs_create_file return value must be checked)
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
drivers/cpufreq/cpufreq.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
Index: linux-2.6.22-rc2/drivers/cpufreq/cpufreq.c
===================================================================
--- linux-2.6.22-rc2.orig/drivers/cpufreq/cpufreq.c
+++ linux-2.6.22-rc2/drivers/cpufreq/cpufreq.c
@@ -826,13 +826,18 @@ static int cpufreq_add_dev (struct sys_d
/* set up files for this cpu device */
drv_attr = cpufreq_driver->attr;
while ((drv_attr) && (*drv_attr)) {
- sysfs_create_file(&policy->kobj, &((*drv_attr)->attr));
+ if (sysfs_create_file(&policy->kobj, &((*drv_attr)->attr)))
+ goto err_out_driver_exit;
drv_attr++;
}
- if (cpufreq_driver->get)
- sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr);
- if (cpufreq_driver->target)
- sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr);
+ if (cpufreq_driver->get){
+ if (sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr))
+ goto err_out_driver_exit;
+ }
+ if (cpufreq_driver->target){
+ if (sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr))
+ goto err_out_driver_exit;
+ }
spin_lock_irqsave(&cpufreq_driver_lock, flags);
for_each_cpu_mask(j, policy->cpus) {
[-- Attachment #2: cpufreq_sysfs_create_file_warning.patch --]
[-- Type: text/x-patch, Size: 1320 bytes --]
Eliminate build warning (sysfs_create_file return value must be checked)
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
drivers/cpufreq/cpufreq.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
Index: linux-2.6.22-rc2/drivers/cpufreq/cpufreq.c
===================================================================
--- linux-2.6.22-rc2.orig/drivers/cpufreq/cpufreq.c
+++ linux-2.6.22-rc2/drivers/cpufreq/cpufreq.c
@@ -826,13 +826,18 @@ static int cpufreq_add_dev (struct sys_d
/* set up files for this cpu device */
drv_attr = cpufreq_driver->attr;
while ((drv_attr) && (*drv_attr)) {
- sysfs_create_file(&policy->kobj, &((*drv_attr)->attr));
+ if (sysfs_create_file(&policy->kobj, &((*drv_attr)->attr)))
+ goto err_out_driver_exit;
drv_attr++;
}
- if (cpufreq_driver->get)
- sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr);
- if (cpufreq_driver->target)
- sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr);
+ if (cpufreq_driver->get){
+ if (sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr))
+ goto err_out_driver_exit;
+ }
+ if (cpufreq_driver->target){
+ if (sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr))
+ goto err_out_driver_exit;
+ }
spin_lock_irqsave(&cpufreq_driver_lock, flags);
for_each_cpu_mask(j, policy->cpus) {
[-- Attachment #3: Type: text/plain, Size: 147 bytes --]
_______________________________________________
Cpufreq mailing list
Cpufreq@lists.linux.org.uk
http://lists.linux.org.uk/mailman/listinfo/cpufreq
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-05-21 12:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-20 11:19 2.6.22-rc2 built on ppc Elimar Riesebieter
2007-05-21 12:20 ` [PATCH] " Thomas Renninger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox