* [PATCH] fix compile warning in arch/powerpc/kernel/sysfs.c
@ 2007-08-17 3:40 Michael Neuling
2007-08-17 5:25 ` Michael Neuling
0 siblings, 1 reply; 2+ messages in thread
From: Michael Neuling @ 2007-08-17 3:40 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
This fixes the following warning:
arch/powerpc/kernel/sysfs.c:388: warning: ignoring return value of
'sysfs_create_group', declared with attribute warn_unused_result
Signed-off-by: Michael Neuling <mikey@neuling.org>
---
arch/powerpc/kernel/sysfs.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Index: linux-2.6-ozlabs/arch/powerpc/kernel/sysfs.c
===================================================================
--- linux-2.6-ozlabs.orig/arch/powerpc/kernel/sysfs.c
+++ linux-2.6-ozlabs/arch/powerpc/kernel/sysfs.c
@@ -378,14 +378,18 @@ EXPORT_SYMBOL_GPL(cpu_add_sysdev_attr);
int cpu_add_sysdev_attr_group(struct attribute_group *attrs)
{
- int cpu;
+ int cpu, err;
struct sys_device *sysdev;
mutex_lock(&cpu_mutex);
for_each_possible_cpu(cpu) {
sysdev = get_cpu_sysdev(cpu);
- sysfs_create_group(&sysdev->kobj, attrs);
+ err = sysfs_create_group(&sysdev->kobj, attrs);
+ if (err) {
+ mutex_unlock(&cpu_mutex);
+ return err;
+ }
}
mutex_unlock(&cpu_mutex);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fix compile warning in arch/powerpc/kernel/sysfs.c
2007-08-17 3:40 [PATCH] fix compile warning in arch/powerpc/kernel/sysfs.c Michael Neuling
@ 2007-08-17 5:25 ` Michael Neuling
0 siblings, 0 replies; 2+ messages in thread
From: Michael Neuling @ 2007-08-17 5:25 UTC (permalink / raw)
To: paulus, linuxppc-dev
It seems I missed a long discussion about this warning... Please ignore.
Mikey
In message <7816.1187322013@neuling.org> you wrote:
> This fixes the following warning:
> arch/powerpc/kernel/sysfs.c:388: warning: ignoring return value of
> 'sysfs_create_group', declared with attribute warn_unused_result
>
> Signed-off-by: Michael Neuling <mikey@neuling.org>
> ---
> arch/powerpc/kernel/sysfs.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> Index: linux-2.6-ozlabs/arch/powerpc/kernel/sysfs.c
> ===================================================================
> --- linux-2.6-ozlabs.orig/arch/powerpc/kernel/sysfs.c
> +++ linux-2.6-ozlabs/arch/powerpc/kernel/sysfs.c
> @@ -378,14 +378,18 @@ EXPORT_SYMBOL_GPL(cpu_add_sysdev_attr);
>
> int cpu_add_sysdev_attr_group(struct attribute_group *attrs)
> {
> - int cpu;
> + int cpu, err;
> struct sys_device *sysdev;
>
> mutex_lock(&cpu_mutex);
>
> for_each_possible_cpu(cpu) {
> sysdev = get_cpu_sysdev(cpu);
> - sysfs_create_group(&sysdev->kobj, attrs);
> + err = sysfs_create_group(&sysdev->kobj, attrs);
> + if (err) {
> + mutex_unlock(&cpu_mutex);
> + return err;
> + }
> }
>
> mutex_unlock(&cpu_mutex);
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-17 5:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-17 3:40 [PATCH] fix compile warning in arch/powerpc/kernel/sysfs.c Michael Neuling
2007-08-17 5:25 ` Michael Neuling
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).