hwmon (coretemp): Fix build breakage if SMP is undefined
Subsystems (2)
PATCH 1/1 hwmon (coretemp): Fix build breakage if SMP is undefined
Commit e40cc4bdfd4b89813f072f72bd9c7055814d3f0f introduced a build breakage if CONFIG_SMP is undefined. This patch fixes the problem.
--- drivers/hwmon/coretemp.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/hwmon/coretemp.c +2 -0
@@ -503,9 +503,11 @@ static void coretemp_device_remove(unsigned int cpu)list_del (&p->list);mutex_unlock (&pdev_list_mutex);kfree (p); +#ifdef CONFIG_SMP for_each_cpu (i,cpu_sibling_mask (cpu))if (i != cpu && !coretemp_device_add (i))break ; +#endif return ; }mutex_unlock (&pdev_list_mutex);
Signature · 1 line
1.7.0.87.g0901d
Quoted 18 lines · Guenter Roeck
Commit
e40cc4bdfd4b89813f072f72bd9c7055814d3f0fintroduced a build breakage ifCONFIG_SMPis undefined. This patch fixes the problem.Reported-by Ingo Molnar <[email protected]>Cc Fenghua Yu <[email protected]>Cc Jean Delvare <[email protected]>Signed-off-by Guenter Roeck <[email protected]>--- drivers/hwmon/coretemp.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/hwmon/coretemp.c +0
-0
drivers/hwmon/coretemp.c static void coretemp_device_remove(unsigned int cpu) · line 510
Quoted 8 lines
drivers/hwmon/coretemp.c +2
-0@@ -503,9 +503,11 @@ static void coretemp_device_remove(unsigned int cpu)list_del (&p->list);mutex_unlock (&pdev_list_mutex);kfree (p); +#ifdef CONFIG_SMP for_each_cpu (i,cpu_sibling_mask (cpu))if (i != cpu && !coretemp_device_add (i))break ; +#endif
Wont this result in an 'unused variable i' compiler warning?
Thanks,
Ingo
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 16 lines · Ingo Molnar
Quoted 13 lines · Guenter Roeck
Commit
e40cc4bdfd4b89813f072f72bd9c7055814d3f0fintroduced a build breakage ifCONFIG_SMPis undefined. This patch fixes the problem.Reported-by Ingo Molnar <[email protected]>Cc Fenghua Yu <[email protected]>Cc Jean Delvare <[email protected]>Signed-off-by Guenter Roeck <[email protected]>--- drivers/hwmon/coretemp.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
Quoted 16 lines
drivers/hwmon/coretemp.c static void coretemp_device_remove(unsigned int cpu) · line 510
Quoted 13 lines
drivers/hwmon/coretemp.c +2
-0@@ -503,9 +503,11 @@ static void coretemp_device_remove(unsigned int cpu)list_del (&p->list);mutex_unlock (&pdev_list_mutex);kfree (p); +#ifdef CONFIG_SMP for_each_cpu (i,cpu_sibling_mask (cpu))if (i != cpu && !coretemp_device_add (i))break ; +#endif Wont this result in an 'unused variable i' compiler warning?
Sigh. Yes, of course. Must have been blind when I compiled it. Serves me right, for pushing this out in a hurry. You'll see rev2 of the patch in a minute.
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors