Skip to contentSkip to conversation

hwmon (coretemp): Fix build breakage if SMP is undefined

PATCH Superseded Guenter Roeck 2 participants 3 messages Sep 26, 2010 – Sep 27, 2010

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

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
index baa842a..58a3c2d 100644
@@ -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
#1 lore raw
Quoted 18 lines · Guenter Roeck

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 +0 -0
index baa842a..58a3c2d 100644

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

#2 lore raw
Quoted 16 lines · Ingo Molnar
Quoted 13 lines · Guenter Roeck

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(-)
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
index baa842a..58a3c2d 100644
@@ -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