Skip to contentSkip to conversation

arm: arch_timer: include linux/errno.h to declare ENXIO

PATCH New Stephen Warren 2 participants 4 messages Feb 13, 2013 – Feb 15, 2013 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: arch_timer: include linux/errno.h to declare ENXIO

From: Stephen Warren <[email protected]>

This fixes:
arch/arm/kernel/arch_timer.c: In function ?arch_timer_sched_clock_init?:
arch/arm/kernel/arch_timer.c:55:11: error: ?ENXIO? undeclared (first use in this function)

---
tegra_defconfig builds OK, but with my local change to convert Tegra to multi-platform, I need this fix to compile. This issue is new sometime after next-20130211.

 arch/arm/kernel/arch_timer.c |    1 +
 1 file changed, 1 insertion(+)
arch/arm/kernel/arch_timer.c +1 -0
index 36ebcf4..8fba00f 100644
@@ -8,6 +8,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/types.h>
 
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 arm: arch_timer: include linux/errno.h to declare ENXIO

Quoted 30 lines · Stephen Warren

From: Stephen Warren <[email protected]>

This fixes:
arch/arm/kernel/arch_timer.c: In function ?arch_timer_sched_clock_init?:
arch/arm/kernel/arch_timer.c:55:11: error: ?ENXIO? undeclared (first use in this function)

---
tegra_defconfig builds OK, but with my local change to convert Tegra to multi-platform, I need this fix to compile. This issue is new sometime after next-20130211.

 arch/arm/kernel/arch_timer.c |    1 +
 1 file changed, 1 insertion(+)
arch/arm/kernel/arch_timer.c +1 -0
index 36ebcf4..8fba00f 100644
@@ -8,6 +8,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/types.h>
 
Signature · 1 line
1.7.10.4

We should probably also add this to include/clocksource/arm_arch_timer.h and drivers/clocksource/arm_arch_timer.c, as they both use errno values (though currently these get included indirectly via a different path).

Thanks,
Mark.

#2 lore raw

PATCH 1/1 arm: arch_timer: include linux/errno.h to declare ENXIO

Quoted 6 lines · Mark Rutland
Quoted 5 lines · Stephen Warren

From: Stephen Warren <[email protected]>

This fixes:
arch/arm/kernel/arch_timer.c: In function ?arch_timer_sched_clock_init?:
arch/arm/kernel/arch_timer.c:55:11: error: ?ENXIO? undeclared (first use in this function)

..

Quoted 3 lines

We should probably also add this to include/clocksource/arm_arch_timer.h and drivers/clocksource/arm_arch_timer.c, as they both use errno values (though currently these get included indirectly via a different path).

Ah yes, it should certainly be added to the header file then. Since both those .c files include that header, I guess there isn't much need to add it separately to the .c files though?

Do you want me to respin the patch, or will you just create one to add the include to the header?

#3 lore raw

PATCH 1/1 arm: arch_timer: include linux/errno.h to declare ENXIO

Quoted 12 lines · Stephen Warren
Quoted 6 lines · Mark Rutland
Quoted 5 lines · Stephen Warren

From: Stephen Warren <[email protected]>

This fixes:
arch/arm/kernel/arch_timer.c: In function ?arch_timer_sched_clock_init?:
arch/arm/kernel/arch_timer.c:55:11: error: ?ENXIO? undeclared (first use in this function)

..

Quoted 3 lines

We should probably also add this to include/clocksource/arm_arch_timer.h and drivers/clocksource/arm_arch_timer.c, as they both use errno values (though currently these get included indirectly via a different path).

Quoted 7 lines

Ah yes, it should certainly be added to the header file then. Since both those .c files include that header, I guess there isn't much need to add it separately to the .c files though?

Do you want me to respin the patch, or will you just create one to add the include to the header?

I think it makes sense to have the include in both the header and the .c file, as they both use error codes explicitly. The header (and drivers/clocksource/arm_arch_timer.c) seem to build for the moment, so they can be fixed up later.

Arnd seems to have arrived at the same patch in his allyesconfig fix series:
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-February/149856.html

I'm happy to see either version go in.

Thanks,
Mark.