Skip to contentSkip to conversation

omap2plus: Trivial build break fixes

PATCH Superseded Santosh Shilimkar 4 participants 24 messages Jan 4, 2011 – Jan 5, 2011

Subsystems (6)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover omap2plus: Trivial build break fixes

These are trivial build fixes which I found while doing some testing 'omap-for-linus' branch.

The series is generated against the linux-omap 'omap-for-linus' branch and boot tested on OMAP4430 SDP and OMAP3630 ZOOM.

The following changes since commit dc69d1af9e8d9cbbabff88bb35a6782187a22229:
Ben Gamari (1):
omap2: Make OMAP2PLUS select OMAP_DM_TIMER

Santosh Shilimkar (5):
omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask
omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'
omap2plus: voltage: Trivial warning fix 'no return statement'
omap2plus: voltage: Trivial linking fix 'undefined reference'
omap2plus: voltage: Trivial linking fix for 'EINVAL' undeclared

 arch/arm/mach-omap2/Makefile              |    2 +-
 arch/arm/mach-omap2/clockdomain.h         |    2 +-
 arch/arm/mach-omap2/prm2xxx_3xxx.h        |   45 ++++++++++++++++++++++++++++-
 arch/arm/plat-omap/include/plat/voltage.h |   17 ++++++++--
 4 files changed, 59 insertions(+), 7 deletions(-)
#1 lore raw

PATCH 1/5 omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask

struct clockdomain member clktrctrl_mask is available for only for OMAP2 and OMAP3 architectures. Technially it is also used only for these archs but this breaks the build with custom OMAP4 configuration.

CC arch/arm/mach-omap2/clockdomain.o
arch/arm/mach-omap2/clockdomain.c: In function '_enable_hwsup':
arch/arm/mach-omap2/clockdomain.c:251: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c:254: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function '_disable_hwsup':
arch/arm/mach-omap2/clockdomain.c:277: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c:280: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_sleep':
arch/arm/mach-omap2/clockdomain.c:744: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_wakeup':
arch/arm/mach-omap2/clockdomain.c:789: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_clk_enable':
arch/arm/mach-omap2/clockdomain.c:922: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c:926: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_clk_disable':
arch/arm/mach-omap2/clockdomain.c:994: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c:998: error: 'struct clockdomain' has no member named 'clktrctrl_mask' make[1]: *** [arch/arm/mach-omap2/clockdomain.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

Fix the build break with use of ARCH_OMAP2PLUS instead of OMAP2 or OMAP3

---
 arch/arm/mach-omap2/clockdomain.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/clockdomain.h +1 -1
index de3faa2..6fa82f5 100644
@@ -103,7 +103,7 @@ struct clockdomain {
 		const char *name;
 		struct powerdomain *ptr;
 	} pwrdm;
-#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
+#ifdef CONFIG_ARCH_OMAP2PLUS
 	const u16 clktrctrl_mask;
 #endif
 	const u8 flags;
Signature · 1 line
1.6.0.4
#2 lore raw

PATCH 2/5 omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

omap2plus_defocnfig build breaks when customised with only ARCH_OMAP4 selected. This is because common files make references to the functions which are defined only for omap2xxx and omap3xxx.

LD .tmp_vmlinux1
arch/arm/mach-omap2/built-in.o: In function `pm_dbg_regset_store':
arch/arm/mach-omap2/pm-debug.c:335: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/built-in.o: In function omap2_pm_dump':
arch/arm/mach-omap2/pm-debug.c:121: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/pm-debug.c:123: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/pm-debug.c:124: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/pm-debug.c:125: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/built-in.o: In function `omap_prcm_arch_reset':
arch/arm/mach-omap2/prcm.c:106: undefined reference to omap2_prm_set_mod_reg_bits' arch/arm/mach-omap2/prcm.c:108: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/built-in.o: In function `omap_prcm_get_reset_sources':
arch/arm/mach-omap2/prcm.c:53: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/built-in.o: In function clkdm_clear_all_wkdeps':
arch/arm/mach-omap2/clockdomain.c:545: undefined reference to omap2_prm_clear_mod_reg_bits' arch/arm/mach-omap2/built-in.o: In function clkdm_del_wkdep':
arch/arm/mach-omap2/clockdomain.c:475: undefined reference to omap2_prm_clear_mod_reg_bits' arch/arm/mach-omap2/built-in.o: In function clkdm_read_wkdep':
arch/arm/mach-omap2/clockdomain.c:511: undefined reference to omap2_prm_read_mod_bits_shift' arch/arm/mach-omap2/built-in.o: In function clkdm_add_wkdep':
arch/arm/mach-omap2/clockdomain.c:440: undefined reference to `omap2_prm_set_mod_reg_bits'
make: *** [.tmp_vmlinux1] Error 1

This patch adds stubs for these functions so that build continues to work.

Probably alternately the build can be fixed as below but that not seems to be the right way.

----------------------------------------------------------------------

---
 arch/arm/mach-omap2/Makefile       |    2 +-
 arch/arm/mach-omap2/prm2xxx_3xxx.h |   45 +++++++++++++++++++++++++++++++++++-
 2 files changed, 45 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/Makefile +1 -1
index 4ab82f6..359a7f2 100644
@@ -84,7 +84,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o
 # use OMAP4-specific PRCM functions.
 obj-$(CONFIG_ARCH_OMAP4)		+= prcm.o cm2xxx_3xxx.o cminst44xx.o \
 					   cm44xx.o prcm_mpu44xx.o \
-					   prminst44xx.o
+					   prminst44xx.o prm2xxx_3xxx.o
 
 # OMAP powerdomain framework
 powerdomain-common			+= powerdomain.o powerdomain-common.o
arch/arm/mach-omap2/prm2xxx_3xxx.h +44 -1

57 lines not on this page · raw message

Signature · 1 line
1.6.0.4
#3 lore raw

PATCH 3/5 omap2plus: voltage: Trivial warning fix 'no return statement'

Fix below build warnings

CC arch/arm/mach-omap2/common.o
CC arch/arm/mach-omap2/gpio.o
In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,

                 from arch/arm/mach-omap2/gpio.c:25:

arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic':
arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void
CC arch/arm/mach-omap2/dma.o
In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,

                 from arch/arm/mach-omap2/dma.c:32:

arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic':
arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void
CC arch/arm/mach-omap2/wd_timer.o
In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,

                 from arch/arm/mach-omap2/wd_timer.c:15:

arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic':
arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void
CC arch/arm/mach-omap2/prm44xx.o
CC arch/arm/mach-omap2/omap_hwmod.o
In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,

                 from arch/arm/mach-omap2/omap_hwmod.c:145:

arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic':
arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void
CC arch/arm/mach-omap2/omap_hwmod_common_data.o
In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,
from arch/arm/mach-omap2/omap_hwmod_common_data.c:20:
arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic':
arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void

The error is reported when omap2plus_defconfig built with CONFIG_PM disabled

Cc Thara Gopinath <[email protected]>
Cc Kevin Hilman <[email protected]>
---
 arch/arm/plat-omap/include/plat/voltage.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
arch/arm/plat-omap/include/plat/voltage.h +4 -1
index 0ff1233..710f4ea 100644
@@ -134,7 +134,10 @@ void omap_change_voltscale_method(struct voltagedomain *voltdm,
 int omap_voltage_late_init(void);
 #else
 static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm,
-		struct omap_volt_pmic_info *pmic_info) {}
+		struct omap_volt_pmic_info *pmic_info)
+{
+	return 0;
+}
 static inline  void omap_change_voltscale_method(struct voltagedomain *voltdm,
 		int voltscale_method) {}
 static inline int omap_voltage_late_init(void)
Signature · 1 line
1.6.0.4
#4 lore raw

PATCH 4/5 omap2plus: voltage: Trivial linking fix 'undefined reference'

LD init/built-in.o
LD .tmp_vmlinux1
arch/arm/mach-omap2/built-in.o: In function `omap2_set_init_voltage':
arch/arm/mach-omap2/pm.c:181: undefined reference to omap_voltage_domain_lookup' arch/arm/mach-omap2/built-in.o: In function omap4_twl_init':
arch/arm/mach-omap2/omap_twl.c:244: undefined reference to omap_voltage_domain_lookup' arch/arm/mach-omap2/omap_twl.c:247: undefined reference to omap_voltage_domain_lookup' arch/arm/mach-omap2/omap_twl.c:250: undefined reference to `omap_voltage_domain_lookup'
make: *** [.tmp_vmlinux1] Error 1

The error is reported when omap2plus_defconfig built with CONFIG_PM disabled

Cc Thara Gopinath <[email protected]>
Cc Kevin Hilman <[email protected]>
---
 arch/arm/plat-omap/include/plat/voltage.h |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
arch/arm/plat-omap/include/plat/voltage.h +7 -3
index 710f4ea..c095351 100644
@@ -65,9 +65,6 @@ struct voltagedomain {
 	char *name;
 };
 
-/* API to get the voltagedomain pointer */
-struct voltagedomain *omap_voltage_domain_lookup(char *name);
-
 /**
  * struct omap_volt_data - Omap voltage specific data.
  * @voltage_nominal:	The possible voltage value in uV
@@ -131,6 +128,9 @@ int omap_voltage_register_pmic(struct voltagedomain *voltdm,
 		struct omap_volt_pmic_info *pmic_info);
 void omap_change_voltscale_method(struct voltagedomain *voltdm,
 		int voltscale_method);
+/* API to get the voltagedomain pointer */
+struct voltagedomain *omap_voltage_domain_lookup(char *name);
+
 int omap_voltage_late_init(void);
 #else
 static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm,
@@ -144,6 +144,10 @@ static inline int omap_voltage_late_init(void)
 {
 	return -EINVAL;
 }
+static inline struct voltagedomain *omap_voltage_domain_lookup(char *name)
+{
+	return NULL;
+}
 #endif
 
 #endif
Signature · 1 line
1.6.0.4
#5 lore raw

PATCH 5/5 omap2plus: voltage: Trivial linking fix for 'EINVAL' undeclared

CC arch/arm/mach-omap2/omap_hwmod_common_data.o
In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,
from arch/arm/mach-omap2/omap_hwmod_common_data.c:20:
arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_late_init':
arch/arm/plat-omap/include/plat/voltage.h:145: error: 'EINVAL' undeclared (first use in this function) arch/arm/plat-omap/include/plat/voltage.h:145: error: (Each undeclared identifier is reported only once arch/arm/plat-omap/include/plat/voltage.h:145: error: for each function it appears in.) make[1]: *** [arch/arm/mach-omap2/omap_hwmod_common_data.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

The error is reported when omap2plus_defconfig built with CONFIG_PM disabled

Cc Thara Gopinath <[email protected]>
Cc Kevin Hilman <[email protected]>
---
 arch/arm/plat-omap/include/plat/voltage.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-omap/include/plat/voltage.h +2 -0
index c095351..2b776f0 100644
@@ -14,6 +14,8 @@
 #ifndef __ARCH_ARM_MACH_OMAP2_VOLTAGE_H
 #define __ARCH_ARM_MACH_OMAP2_VOLTAGE_H
 
+#include <linux/err.h>
+
 #define VOLTSCALE_VPFORCEUPDATE		1
 #define VOLTSCALE_VCBYPASS		2
 
Signature · 1 line
1.6.0.4
#6 lore raw

PATCH 5/5 omap2plus: voltage: Trivial linking fix for 'EINVAL' undeclared

Santosh Shilimkar had written, on 01/04/2011 12:26 PM, the following:

Quoted 24 lines

CC arch/arm/mach-omap2/omap_hwmod_common_data.o
In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,
from arch/arm/mach-omap2/omap_hwmod_common_data.c:20:
arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_late_init':
arch/arm/plat-omap/include/plat/voltage.h:145: error: 'EINVAL' undeclared (first use in this function) arch/arm/plat-omap/include/plat/voltage.h:145: error: (Each undeclared identifier is reported only once arch/arm/plat-omap/include/plat/voltage.h:145: error: for each function it appears in.) make[1]: *** [arch/arm/mach-omap2/omap_hwmod_common_data.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

The error is reported when omap2plus_defconfig built with CONFIG_PM disabled

Cc Thara Gopinath <[email protected]>
Cc Kevin Hilman <[email protected]>
---
 arch/arm/plat-omap/include/plat/voltage.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-omap/include/plat/voltage.h +0 -0
index c095351..2b776f0 100644

arch/arm/plat-omap/include/plat/voltage.h line 18

Quoted 5 lines
arch/arm/plat-omap/include/plat/voltage.h +2 -0
@@ -14,6 +14,8 @@
 #ifndef __ARCH_ARM_MACH_OMAP2_VOLTAGE_H
 #define __ARCH_ARM_MACH_OMAP2_VOLTAGE_H
 
+#include <linux/err.h>
+

Not sure if this is better OR including the err.h in c files is better, since the c file is the location where the error code is actually used..

but no strong feelings about either personally.

[..]

Signature · 2 lines
Regards,
Nishanth Menon
#7 lore raw

PATCH 5/5 omap2plus: voltage: Trivial linking fix for 'EINVAL' undeclared

Quoted 55 lines

-----Original Message-----
From: Nishanth Menon [mailto:nm at ti.com]
Sent: Wednesday, January 05, 2011 12:19 AM
To: Santosh Shilimkar
Cc: linux-omap at vger.kernel.org; khilman at ti.com; tony at atomide.com; linux-arm-kernel at lists.infradead.org; Thara Gopinath; Kevin Hilman
Subject: Re: [PATCH 5/5] omap2plus: voltage: Trivial linking fix for 'EINVAL' undeclared

Santosh Shilimkar had written, on 01/04/2011 12:26 PM, the following:

Quoted 2 lines

CC arch/arm/mach-omap2/omap_hwmod_common_data.o
In file included from arch/arm/plat-

omap/include/plat/omap_hwmod.h:38,

Quoted 1 line

from arch/arm/mach-

omap2/omap_hwmod_common_data.c:20:

Quoted 1 line

arch/arm/plat-omap/include/plat/voltage.h: In function

'omap_voltage_late_init':

Quoted 1 line

arch/arm/plat-omap/include/plat/voltage.h:145: error: 'EINVAL'

undeclared (first use in this function)

Quoted 1 line

arch/arm/plat-omap/include/plat/voltage.h:145: error: (Each

undeclared identifier is reported only once

Quoted 1 line

arch/arm/plat-omap/include/plat/voltage.h:145: error: for each

function it appears in.)

Quoted 1 line

make[1]: *** [arch/arm/mach-omap2/omap_hwmod_common_data.o] Error

1

Quoted 3 lines

make: *** [arch/arm/mach-omap2] Error 2

The error is reported when omap2plus_defconfig built with

CONFIG_PM disabled

Review

Quoted 9 lines
Cc Thara Gopinath <[email protected]>
Cc Kevin Hilman <[email protected]>
---
 arch/arm/plat-omap/include/plat/voltage.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/arm/plat-omap/include/plat/voltage.h

arch/arm/plat-omap/include/plat/voltage.h line 18

Quoted 9 lines

index c095351..2b776f0 100644

arch/arm/plat-omap/include/plat/voltage.h +2 -0
@@ -14,6 +14,8 @@
 #ifndef __ARCH_ARM_MACH_OMAP2_VOLTAGE_H
 #define __ARCH_ARM_MACH_OMAP2_VOLTAGE_H
 
+#include <linux/err.h>
+

Not sure if this is better OR including the err.h in c files is better,
since the c file is the location where the error code is actually used..

Quoted 2 lines

but no strong feelings about either personally.

The error is because of 'EINVAL' usage in header file. How Will this error get fixed by including err.h is C file ?

#8 lore raw

PATCH 5/5 omap2plus: voltage: Trivial linking fix for 'EINVAL' undeclared

Santosh Shilimkar had written, on 01/04/2011 12:51 PM, the following:

Quoted 53 lines
Quoted 53 lines

-----Original Message-----
From: Nishanth Menon [mailto:nm at ti.com]
Sent: Wednesday, January 05, 2011 12:19 AM
To: Santosh Shilimkar
Cc: linux-omap at vger.kernel.org; khilman at ti.com; tony at atomide.com; linux-arm-kernel at lists.infradead.org; Thara Gopinath; Kevin Hilman
Subject: Re: [PATCH 5/5] omap2plus: voltage: Trivial linking fix for 'EINVAL' undeclared

Santosh Shilimkar had written, on 01/04/2011 12:26 PM, the following:

Quoted 2 lines

CC arch/arm/mach-omap2/omap_hwmod_common_data.o
In file included from arch/arm/plat-

omap/include/plat/omap_hwmod.h:38,

Quoted 1 line

from arch/arm/mach-

omap2/omap_hwmod_common_data.c:20:

Quoted 1 line

arch/arm/plat-omap/include/plat/voltage.h: In function

'omap_voltage_late_init':

Quoted 1 line

arch/arm/plat-omap/include/plat/voltage.h:145: error: 'EINVAL'

undeclared (first use in this function)

Quoted 1 line

arch/arm/plat-omap/include/plat/voltage.h:145: error: (Each

undeclared identifier is reported only once

Quoted 1 line

arch/arm/plat-omap/include/plat/voltage.h:145: error: for each

function it appears in.)

Quoted 1 line

make[1]: *** [arch/arm/mach-omap2/omap_hwmod_common_data.o] Error

1

Quoted 3 lines

make: *** [arch/arm/mach-omap2] Error 2

The error is reported when omap2plus_defconfig built with

CONFIG_PM disabled

Review

Quoted 8 lines
Cc Thara Gopinath <[email protected]>
Cc Kevin Hilman <[email protected]>
---
 arch/arm/plat-omap/include/plat/voltage.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/arm/plat-omap/include/plat/voltage.h

arch/arm/plat-omap/include/plat/voltage.h line 18

Quoted 9 lines

index c095351..2b776f0 100644

arch/arm/plat-omap/include/plat/voltage.h +2 -0
@@ -14,6 +14,8 @@
 #ifndef __ARCH_ARM_MACH_OMAP2_VOLTAGE_H
 #define __ARCH_ARM_MACH_OMAP2_VOLTAGE_H
 
+#include <linux/err.h>
+

Not sure if this is better OR including the err.h in c files is better,
since the c file is the location where the error code is actually used..

Quoted 4 lines
Quoted 2 lines

but no strong feelings about either personally.

The error is because of 'EINVAL' usage in header file. How Will this error get fixed by including err.h is C file ?

arch/arm/mach-omap2/omap_hwmod_common_data.c +1 -0
@@ -16,6 +16,7 @@
   * data and their integration with other OMAP modules and Linux.
   */
 
+#include <linux/err.h>
  #include <plat/omap_hwmod.h>
 
  #include "omap_hwmod_common_data.h"

no?

Basically, this points that omap_hwmod_common_data.c does not use the error return values, which probably gets hidden by including err.h in the header itself.. in this particular case, maynot be important, and probably apis which should have return values checked should be marked so.. anyways, just my 2 cents - no hard opinions about either as far as I am concerned.

Signature · 2 lines
Regards,
Nishanth Menon
#9 lore raw

PATCH 4/5 omap2plus: voltage: Trivial linking fix 'undefined reference'

In reply to Santosh Shilimkar

Santosh Shilimkar had written, on 01/04/2011 12:26 PM, the following:
[..]

Quoted 25 lines
arch/arm/plat-omap/include/plat/voltage.h +3 -3
index 710f4ea..c095351 100644
@@ -65,9 +65,6 @@ struct voltagedomain {
 	char *name;
 };
 
-/* API to get the voltagedomain pointer */
-struct voltagedomain *omap_voltage_domain_lookup(char *name);
-
 /**
  * struct omap_volt_data - Omap voltage specific data.
  * @voltage_nominal:	The possible voltage value in uV
@@ -131,6 +128,9 @@ int omap_voltage_register_pmic(struct voltagedomain *voltdm,
 		struct omap_volt_pmic_info *pmic_info);
 void omap_change_voltscale_method(struct voltagedomain *voltdm,
 		int voltscale_method);
+/* API to get the voltagedomain pointer */
+struct voltagedomain *omap_voltage_domain_lookup(char *name);
+
 int omap_voltage_late_init(void);
 #else
 static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm,

arch/arm/plat-omap/include/plat/voltage.h static inline int omap_voltage_late_init(void) · line 149

Quoted 6 lines
arch/arm/plat-omap/include/plat/voltage.h +3 -0
@@ -144,6 +144,10 @@ static inline int omap_voltage_late_init(void)
 {
 	return -EINVAL;
 }
+static inline struct voltagedomain *omap_voltage_domain_lookup(char *name)
+{
+	return NULL;

the omap_voltage_domain_lookup uses ERR_PTR() for all return values which are handled by the callers with IS_ERR()

I think you should return ERR_PTR(-EINVAL)

Signature · 2 lines
Regards,
Nishanth Menon
#10 lore raw

PATCH 4/5 omap2plus: voltage: Trivial linking fix 'undefined reference'

Quoted 47 lines

-----Original Message-----
From: linux-omap-owner at vger.kernel.org [mailto:linux-omap- owner at vger.kernel.org] On Behalf Of Nishanth Menon
Sent: Wednesday, January 05, 2011 12:16 AM
To: Santosh Shilimkar
Cc: linux-omap at vger.kernel.org; khilman at ti.com; tony at atomide.com; linux-arm-kernel at lists.infradead.org; Thara Gopinath; Kevin Hilman
Subject: Re: [PATCH 4/5] omap2plus: voltage: Trivial linking fix 'undefined reference'

Santosh Shilimkar had written, on 01/04/2011 12:26 PM, the following:
[..]

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/plat-omap/include/plat/voltage.h

arch/arm/plat-omap/include/plat/voltage.h int omap_voltage_register_pmic(struct

Quoted 14 lines

index 710f4ea..c095351 100644

arch/arm/plat-omap/include/plat/voltage.h +0 -3
@@ -65,9 +65,6 @@ struct voltagedomain {
 	char *name;
 };
 
-/* API to get the voltagedomain pointer */
-struct voltagedomain *omap_voltage_domain_lookup(char *name);
-
 /**
  * struct omap_volt_data - Omap voltage specific data.
  * @voltage_nominal:	The possible voltage value in uV
@@ -131,6 +128,9 @@ int omap_voltage_register_pmic(struct

voltagedomain *voltdm,

arch/arm/plat-omap/include/plat/voltage.h int omap_voltage_register_pmic(struct voltagedomain *voltdm,

Quoted 9 lines
arch/arm/plat-omap/include/plat/voltage.h +3 -0
 		struct omap_volt_pmic_info *pmic_info);
 void omap_change_voltscale_method(struct voltagedomain *voltdm,
 		int voltscale_method);
+/* API to get the voltagedomain pointer */
+struct voltagedomain *omap_voltage_domain_lookup(char *name);
+
 int omap_voltage_late_init(void);
 #else
 static inline int omap_voltage_register_pmic(struct voltagedomain

*voltdm,

arch/arm/plat-omap/include/plat/voltage.h static inline int

Quoted 1 line
arch/arm/plat-omap/include/plat/voltage.h +0 -0
@@ -144,6 +144,10 @@ static inline int

omap_voltage_late_init(void)

arch/arm/plat-omap/include/plat/voltage.h static inline int omap_voltage_late_init(void)

Quoted 4 lines
arch/arm/plat-omap/include/plat/voltage.h +1 -0
 {
 	return -EINVAL;
 }
+static inline struct voltagedomain
Quoted 8 lines

*omap_voltage_domain_lookup(char *name)

arch/arm/plat-omap/include/plat/voltage.h static inline int omap_voltage_late_init(void) · line 149

Quoted 2 lines
arch/arm/plat-omap/include/plat/voltage.h +2 -0
+{
+	return NULL;

the omap_voltage_domain_lookup uses ERR_PTR() for all return values which are handled by the callers with IS_ERR()

I think you should return ERR_PTR(-EINVAL)

The expected return value is pointer type and hence used NULL.

#11 lore raw

PATCH 4/5 omap2plus: voltage: Trivial linking fix 'undefined reference'

Quoted 23 lines

-----Original Message-----
From: Santosh Shilimkar [mailto:santosh.shilimkar at ti.com]
Sent: Wednesday, January 05, 2011 12:18 AM
To: Nishanth Menon
Cc: linux-omap at vger.kernel.org; Kevin Hilman; tony at atomide.com; linux-arm-kernel at lists.infradead.org; Thara Gopinath; Kevin Hilman
Subject: RE: [PATCH 4/5] omap2plus: voltage: Trivial linking fix 'undefined reference'

Quoted 14 lines

-----Original Message-----
From: linux-omap-owner at vger.kernel.org [mailto:linux-omap- owner at vger.kernel.org] On Behalf Of Nishanth Menon
Sent: Wednesday, January 05, 2011 12:16 AM
To: Santosh Shilimkar
Cc: linux-omap at vger.kernel.org; khilman at ti.com; tony at atomide.com; linux-arm-kernel at lists.infradead.org; Thara Gopinath; Kevin Hilman
Subject: Re: [PATCH 4/5] omap2plus: voltage: Trivial linking fix 'undefined reference'

Santosh Shilimkar had written, on 01/04/2011 12:26 PM, the following:
[..]

[..]

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

+static inline struct voltagedomain

*omap_voltage_domain_lookup(char *name)

arch/arm/plat-omap/include/plat/voltage.h static inline int omap_voltage_late_init(void) · line 149

Quoted 2 lines
arch/arm/plat-omap/include/plat/voltage.h +2 -0
+{
+	return NULL;

the omap_voltage_domain_lookup uses ERR_PTR() for all return

Quoted 7 lines

values

Quoted 4 lines

which are handled by the callers with IS_ERR()

I think you should return ERR_PTR(-EINVAL)

The expected return value is pointer type and hence used NULL.

'ERR_PTR(-EINVAL)' is also ok.

#12 lore raw

PATCH 4/5 omap2plus: voltage: Trivial linking fix 'undefined reference'

Santosh Shilimkar had written, on 01/04/2011 12:50 PM, the following:
[..]

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 1 line

+static inline struct voltagedomain

*omap_voltage_domain_lookup(char *name)

arch/arm/plat-omap/include/plat/voltage.h static inline int omap_voltage_late_init(void) · line 149

Quoted 2 lines
arch/arm/plat-omap/include/plat/voltage.h +2 -0
+{
+	return NULL;

the omap_voltage_domain_lookup uses ERR_PTR() for all return

values

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

which are handled by the callers with IS_ERR()

I think you should return ERR_PTR(-EINVAL)

The expected return value is pointer type and hence used NULL.

'ERR_PTR(-EINVAL)' is also ok.

looking at the implementation (when CONFIG_PM is enabled),
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=blob;f=arch/arm/mach-omap2/voltage.c;h=ed6079c94c57bae30f599bbad5e25a38fc676fa8;hb=refs/heads/omap-for-linus#l1487
ERR_PTR(-EINVAL) looks more appropriate to me.

Signature · 2 lines
Regards,
Nishanth Menon
#13 lore raw

PATCH 3/5 omap2plus: voltage: Trivial warning fix 'no return statement'

In reply to Santosh Shilimkar

Santosh Shilimkar had written, on 01/04/2011 12:26 PM, the following:
[..]

arch/arm/plat-omap/include/plat/voltage.h void omap_change_voltscale_method(struct voltagedomain *voltdm, · line 139

Quoted 12 lines
arch/arm/plat-omap/include/plat/voltage.h +3 -1
index 0ff1233..710f4ea 100644
@@ -134,7 +134,10 @@ void omap_change_voltscale_method(struct voltagedomain *voltdm,
 int omap_voltage_late_init(void);
 #else
 static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm,
-		struct omap_volt_pmic_info *pmic_info) {}
+		struct omap_volt_pmic_info *pmic_info)
+{
+	return 0;

since we dont really succeed registering the pmic to voltage layer, return -EINVAL?

[..]

Signature · 2 lines
Regards,
Nishanth Menon
#14 lore raw

PATCH 3/5 omap2plus: voltage: Trivial warning fix 'no return statement'

Quoted 23 lines

-----Original Message-----
From: linux-omap-owner at vger.kernel.org [mailto:linux-omap- owner at vger.kernel.org] On Behalf Of Nishanth Menon
Sent: Wednesday, January 05, 2011 12:14 AM
To: Santosh Shilimkar
Cc: linux-omap at vger.kernel.org; khilman at ti.com; tony at atomide.com; linux-arm-kernel at lists.infradead.org; Thara Gopinath; Kevin Hilman
Subject: Re: [PATCH 3/5] omap2plus: voltage: Trivial warning fix 'no return statement'

Santosh Shilimkar had written, on 01/04/2011 12:26 PM, the following:
[..]

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/plat-omap/include/plat/voltage.h

arch/arm/plat-omap/include/plat/voltage.h void omap_change_voltscale_method(struct

Quoted 4 lines

index 0ff1233..710f4ea 100644

arch/arm/plat-omap/include/plat/voltage.h +0 -0
@@ -134,7 +134,10 @@ void omap_change_voltscale_method(struct

voltagedomain *voltdm,

arch/arm/plat-omap/include/plat/voltage.h void omap_change_voltscale_method(struct voltagedomain *voltdm,

Quoted 3 lines
arch/arm/plat-omap/include/plat/voltage.h +0 -0
 int omap_voltage_late_init(void);
 #else
 static inline int omap_voltage_register_pmic(struct voltagedomain
Quoted 8 lines

*voltdm,

arch/arm/plat-omap/include/plat/voltage.h void omap_change_voltscale_method(struct voltagedomain *voltdm, · line 139

Quoted 4 lines
arch/arm/plat-omap/include/plat/voltage.h +3 -1
-		struct omap_volt_pmic_info *pmic_info) {}
+		struct omap_volt_pmic_info *pmic_info)
+{
+	return 0;

since we dont really succeed registering the pmic to voltage layer, return -EINVAL?

Ok. Will take this in v2

Regards,
Santosh

maintainer
#15 lore raw

PATCH 2/5 omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

In reply to Santosh Shilimkar

Hi Santosh,

Quoted 27 lines · Santosh Shilimkar

omap2plus_defocnfig build breaks when customised with only ARCH_OMAP4 selected. This is because common files make references to the functions which are defined only for omap2xxx and omap3xxx.

LD .tmp_vmlinux1
arch/arm/mach-omap2/built-in.o: In function `pm_dbg_regset_store':
arch/arm/mach-omap2/pm-debug.c:335: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/built-in.o: In function omap2_pm_dump':
arch/arm/mach-omap2/pm-debug.c:121: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/pm-debug.c:123: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/pm-debug.c:124: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/pm-debug.c:125: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/built-in.o: In function `omap_prcm_arch_reset':
arch/arm/mach-omap2/prcm.c:106: undefined reference to omap2_prm_set_mod_reg_bits' arch/arm/mach-omap2/prcm.c:108: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/built-in.o: In function `omap_prcm_get_reset_sources':
arch/arm/mach-omap2/prcm.c:53: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/built-in.o: In function clkdm_clear_all_wkdeps':
arch/arm/mach-omap2/clockdomain.c:545: undefined reference to omap2_prm_clear_mod_reg_bits' arch/arm/mach-omap2/built-in.o: In function clkdm_del_wkdep':
arch/arm/mach-omap2/clockdomain.c:475: undefined reference to omap2_prm_clear_mod_reg_bits' arch/arm/mach-omap2/built-in.o: In function clkdm_read_wkdep':
arch/arm/mach-omap2/clockdomain.c:511: undefined reference to omap2_prm_read_mod_bits_shift' arch/arm/mach-omap2/built-in.o: In function clkdm_add_wkdep':
arch/arm/mach-omap2/clockdomain.c:440: undefined reference to `omap2_prm_set_mod_reg_bits'
make: *** [.tmp_vmlinux1] Error 1

Quoted 4 lines

This patch adds stubs for these functions so that build continues to work.

Probably alternately the build can be fixed as below but that not seems to be the right way.

Since these functions now return 0, maybe it would be better to call WARN() or BUG() in these functions for OMAP4. Otherwise, they are going to silently do the wrong thing, and someone needs to fix any usage of these functions where they shouldn't be used. e.g., in mach-omap2/prcm.c or mach-omap2/pm-debug.c ...

- Paul

#16 lore raw

PATCH 2/5 omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Quoted 64 lines

-----Original Message-----
From: Paul Walmsley [mailto:paul at pwsan.com]
Sent: Wednesday, January 05, 2011 12:11 AM
To: Santosh Shilimkar
Cc: linux-omap at vger.kernel.org; khilman at ti.com; tony at atomide.com; linux-arm-kernel at lists.infradead.org
Subject: Re: [PATCH 2/5] omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Hi Santosh,

Quoted 1 line · Santosh Shilimkar

omap2plus_defocnfig build breaks when customised with only

ARCH_OMAP4

Quoted 1 line

selected. This is because common files make references to the

functions

Quoted 5 lines

which are defined only for omap2xxx and omap3xxx.

LD .tmp_vmlinux1
arch/arm/mach-omap2/built-in.o: In function `pm_dbg_regset_store':
arch/arm/mach-omap2/pm-debug.c:335: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `omap2_pm_dump':
arch/arm/mach-omap2/pm-debug.c:121: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/pm-debug.c:123: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/pm-debug.c:124: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/pm-debug.c:125: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/built-in.o: In function

`omap_prcm_arch_reset':

Quoted 1 line

arch/arm/mach-omap2/prcm.c:106: undefined reference to

`omap2_prm_set_mod_reg_bits'

Quoted 1 line

arch/arm/mach-omap2/prcm.c:108: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/built-in.o: In function

`omap_prcm_get_reset_sources':

Quoted 1 line

arch/arm/mach-omap2/prcm.c:53: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/built-in.o: In function

`clkdm_clear_all_wkdeps':

Quoted 1 line

arch/arm/mach-omap2/clockdomain.c:545: undefined reference to

`omap2_prm_clear_mod_reg_bits'

Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `clkdm_del_wkdep':
arch/arm/mach-omap2/clockdomain.c:475: undefined reference to

`omap2_prm_clear_mod_reg_bits'

Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `clkdm_read_wkdep':
arch/arm/mach-omap2/clockdomain.c:511: undefined reference to

`omap2_prm_read_mod_bits_shift'

Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `clkdm_add_wkdep':
arch/arm/mach-omap2/clockdomain.c:440: undefined reference to

`omap2_prm_set_mod_reg_bits'

Quoted 3 lines

make: *** [.tmp_vmlinux1] Error 1

This patch adds stubs for these functions so that build continues

to work.

Quoted 2 lines

Probably alternately the build can be fixed as below but that not

seems to

Quoted 1 line

be the right way.

Quoted 9 lines

Since these functions now return 0, maybe it would be better to call WARN() or BUG() in these functions for OMAP4. Otherwise, they are going
to silently do the wrong thing, and someone needs to fix any usage of
these functions where they shouldn't be used. e.g., in mach- omap2/prcm.c
or mach-omap2/pm-debug.c ...

Good point. Will update the patch accordingly and repost.

Regards,
Santosh

#17 lore raw

PATCH 2/5 omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Quoted 73 lines · Santosh Shilimkar
Quoted 64 lines

-----Original Message-----
From: Paul Walmsley [mailto:paul at pwsan.com]
Sent: Wednesday, January 05, 2011 12:11 AM
To: Santosh Shilimkar
Cc: linux-omap at vger.kernel.org; khilman at ti.com; tony at atomide.com; linux-arm-kernel at lists.infradead.org
Subject: Re: [PATCH 2/5] omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Hi Santosh,

Quoted 1 line · Santosh Shilimkar

omap2plus_defocnfig build breaks when customised with only

ARCH_OMAP4

Quoted 1 line

selected. This is because common files make references to the

functions

Quoted 5 lines

which are defined only for omap2xxx and omap3xxx.

LD .tmp_vmlinux1
arch/arm/mach-omap2/built-in.o: In function `pm_dbg_regset_store':
arch/arm/mach-omap2/pm-debug.c:335: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `omap2_pm_dump':
arch/arm/mach-omap2/pm-debug.c:121: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/pm-debug.c:123: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/pm-debug.c:124: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/pm-debug.c:125: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/built-in.o: In function

`omap_prcm_arch_reset':

Quoted 1 line

arch/arm/mach-omap2/prcm.c:106: undefined reference to

`omap2_prm_set_mod_reg_bits'

Quoted 1 line

arch/arm/mach-omap2/prcm.c:108: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/built-in.o: In function

`omap_prcm_get_reset_sources':

Quoted 1 line

arch/arm/mach-omap2/prcm.c:53: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/built-in.o: In function

`clkdm_clear_all_wkdeps':

Quoted 1 line

arch/arm/mach-omap2/clockdomain.c:545: undefined reference to

`omap2_prm_clear_mod_reg_bits'

Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `clkdm_del_wkdep':
arch/arm/mach-omap2/clockdomain.c:475: undefined reference to

`omap2_prm_clear_mod_reg_bits'

Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `clkdm_read_wkdep':
arch/arm/mach-omap2/clockdomain.c:511: undefined reference to

`omap2_prm_read_mod_bits_shift'

Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `clkdm_add_wkdep':
arch/arm/mach-omap2/clockdomain.c:440: undefined reference to

`omap2_prm_set_mod_reg_bits'

Quoted 3 lines

make: *** [.tmp_vmlinux1] Error 1

This patch adds stubs for these functions so that build continues

to work.

Quoted 2 lines

Probably alternately the build can be fixed as below but that not

seems to

Quoted 1 line

be the right way.

Quoted 9 lines

Since these functions now return 0, maybe it would be better to call WARN() or BUG() in these functions for OMAP4. Otherwise, they are going
to silently do the wrong thing, and someone needs to fix any usage of
these functions where they shouldn't be used. e.g., in mach- omap2/prcm.c
or mach-omap2/pm-debug.c ...

Quoted 1 line

Good point. Will update the patch accordingly and repost.

Please use WARN() instead of BUG() as this is not worthy of causing a panic() for the whole kernel.

Kevin

#18 lore raw

PATCH 2/5 omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Quoted 91 lines

-----Original Message-----
From: Kevin Hilman [mailto:khilman at ti.com]
Sent: Wednesday, January 05, 2011 6:02 AM
To: Santosh Shilimkar
Cc: Paul Walmsley; linux-omap at vger.kernel.org; tony at atomide.com; linux-arm-kernel at lists.infradead.org
Subject: Re: [PATCH 2/5] omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Quoted 7 lines · Santosh Shilimkar
Quoted 7 lines

-----Original Message-----
From: Paul Walmsley [mailto:paul at pwsan.com]
Sent: Wednesday, January 05, 2011 12:11 AM
To: Santosh Shilimkar
Cc: linux-omap at vger.kernel.org; khilman at ti.com; tony at atomide.com; linux-arm-kernel at lists.infradead.org
Subject: Re: [PATCH 2/5] omap2plus: prm: Trvial build break fix

for

Quoted 6 lines
Quoted 6 lines

undefined reference to 'omap2_prm_read_mod_reg'

Hi Santosh,

On Tue, 4 Jan 2011, Santosh Shilimkar wrote:

Quoted 8 lines
Quoted 8 lines
Quoted 1 line

omap2plus_defocnfig build breaks when customised with only

ARCH_OMAP4

Quoted 1 line

selected. This is because common files make references to the

functions

Quoted 4 lines

which are defined only for omap2xxx and omap3xxx.

LD .tmp_vmlinux1
arch/arm/mach-omap2/built-in.o: In function

`pm_dbg_regset_store':

Quoted 30 lines
Quoted 30 lines
Quoted 1 line

arch/arm/mach-omap2/pm-debug.c:335: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `omap2_pm_dump':
arch/arm/mach-omap2/pm-debug.c:121: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/pm-debug.c:123: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/pm-debug.c:124: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/pm-debug.c:125: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/built-in.o: In function

`omap_prcm_arch_reset':

Quoted 1 line

arch/arm/mach-omap2/prcm.c:106: undefined reference to

`omap2_prm_set_mod_reg_bits'

Quoted 1 line

arch/arm/mach-omap2/prcm.c:108: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/built-in.o: In function

`omap_prcm_get_reset_sources':

Quoted 1 line

arch/arm/mach-omap2/prcm.c:53: undefined reference to

`omap2_prm_read_mod_reg'

Quoted 1 line

arch/arm/mach-omap2/built-in.o: In function

`clkdm_clear_all_wkdeps':

Quoted 1 line

arch/arm/mach-omap2/clockdomain.c:545: undefined reference to

`omap2_prm_clear_mod_reg_bits'

Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `clkdm_del_wkdep':
arch/arm/mach-omap2/clockdomain.c:475: undefined reference to

`omap2_prm_clear_mod_reg_bits'

Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `clkdm_read_wkdep':
arch/arm/mach-omap2/clockdomain.c:511: undefined reference to

Quoted 7 lines
Quoted 7 lines

`omap2_prm_read_mod_bits_shift'

Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `clkdm_add_wkdep':
arch/arm/mach-omap2/clockdomain.c:440: undefined reference to

`omap2_prm_set_mod_reg_bits'

Quoted 3 lines

make: *** [.tmp_vmlinux1] Error 1

This patch adds stubs for these functions so that build

continues

Quoted 3 lines
Quoted 3 lines

to work.

Quoted 2 lines

Probably alternately the build can be fixed as below but that

not

Quoted 4 lines
Quoted 4 lines

seems to

Quoted 1 line

be the right way.

Since these functions now return 0, maybe it would be better to

call

Quoted 1 line
Quoted 1 line

WARN() or BUG() in these functions for OMAP4. Otherwise, they

are

Quoted 2 lines
Quoted 2 lines

going
to silently do the wrong thing, and someone needs to fix any

usage

Quoted 5 lines
Quoted 5 lines

of
these functions where they shouldn't be used. e.g., in mach- omap2/prcm.c
or mach-omap2/pm-debug.c ...

Quoted 6 lines
Quoted 1 line

Good point. Will update the patch accordingly and repost.

Please use WARN() instead of BUG() as this is not worthy of causing a
panic() for the whole kernel.

Yes. I plan to use WARN_ONCE()

Regards,
Santosh

maintainer
#19 lore raw

PATCH 1/5 omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask

In reply to Santosh Shilimkar

Hi Santosh

Quoted 37 lines · Santosh Shilimkar

struct clockdomain member clktrctrl_mask is available for only for OMAP2 and OMAP3 architectures. Technially it is also used only for these archs but this breaks the build with custom OMAP4 configuration.

CC arch/arm/mach-omap2/clockdomain.o
arch/arm/mach-omap2/clockdomain.c: In function '_enable_hwsup':
arch/arm/mach-omap2/clockdomain.c:251: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c:254: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function '_disable_hwsup':
arch/arm/mach-omap2/clockdomain.c:277: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c:280: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_sleep':
arch/arm/mach-omap2/clockdomain.c:744: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_wakeup':
arch/arm/mach-omap2/clockdomain.c:789: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_clk_enable':
arch/arm/mach-omap2/clockdomain.c:922: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c:926: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_clk_disable':
arch/arm/mach-omap2/clockdomain.c:994: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c:998: error: 'struct clockdomain' has no member named 'clktrctrl_mask' make[1]: *** [arch/arm/mach-omap2/clockdomain.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

Fix the build break with use of ARCH_OMAP2PLUS instead of OMAP2 or OMAP3

---
 arch/arm/mach-omap2/clockdomain.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/clockdomain.h +0 -0
index de3faa2..6fa82f5 100644

arch/arm/mach-omap2/clockdomain.h struct clockdomain { · line 106

Quoted 5 lines
arch/arm/mach-omap2/clockdomain.h +1 -1
@@ -103,7 +103,7 @@ struct clockdomain {
 		const char *name;
 		struct powerdomain *ptr;
 	} pwrdm;
-#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
+#ifdef CONFIG_ARCH_OMAP2PLUS

No need for this, just drop the #ifdef...

arch/arm/mach-omap2/clockdomain.h struct clockdomain { · line 107

Quoted 1 line
arch/arm/mach-omap2/clockdomain.h +0 -0
 	const u16 clktrctrl_mask;

- Paul

#20 lore raw

PATCH 1/5 omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask

Quoted 64 lines

-----Original Message-----
From: Paul Walmsley [mailto:paul at pwsan.com]
Sent: Wednesday, January 05, 2011 12:13 AM
To: Santosh Shilimkar
Cc: linux-omap at vger.kernel.org; khilman at ti.com; tony at atomide.com; linux-arm-kernel at lists.infradead.org
Subject: Re: [PATCH 1/5] omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask

Hi Santosh

Quoted 1 line · Santosh Shilimkar

struct clockdomain member clktrctrl_mask is available for only for

OMAP2

Quoted 1 line

and OMAP3 architectures. Technially it is also used only for these

archs

Quoted 5 lines

but this breaks the build with custom OMAP4 configuration.

CC arch/arm/mach-omap2/clockdomain.o
arch/arm/mach-omap2/clockdomain.c: In function '_enable_hwsup':
arch/arm/mach-omap2/clockdomain.c:251: error: 'struct clockdomain'

has no member named 'clktrctrl_mask'

Quoted 1 line

arch/arm/mach-omap2/clockdomain.c:254: error: 'struct clockdomain'

has no member named 'clktrctrl_mask'

Quoted 2 lines

arch/arm/mach-omap2/clockdomain.c: In function '_disable_hwsup':
arch/arm/mach-omap2/clockdomain.c:277: error: 'struct clockdomain'

has no member named 'clktrctrl_mask'

Quoted 1 line

arch/arm/mach-omap2/clockdomain.c:280: error: 'struct clockdomain'

has no member named 'clktrctrl_mask'

Quoted 1 line

arch/arm/mach-omap2/clockdomain.c: In function

'omap2_clkdm_sleep':

Quoted 1 line

arch/arm/mach-omap2/clockdomain.c:744: error: 'struct clockdomain'

has no member named 'clktrctrl_mask'

Quoted 1 line

arch/arm/mach-omap2/clockdomain.c: In function

'omap2_clkdm_wakeup':

Quoted 1 line

arch/arm/mach-omap2/clockdomain.c:789: error: 'struct clockdomain'

has no member named 'clktrctrl_mask'

Quoted 1 line

arch/arm/mach-omap2/clockdomain.c: In function

'omap2_clkdm_clk_enable':

Quoted 1 line

arch/arm/mach-omap2/clockdomain.c:922: error: 'struct clockdomain'

has no member named 'clktrctrl_mask'

Quoted 1 line

arch/arm/mach-omap2/clockdomain.c:926: error: 'struct clockdomain'

has no member named 'clktrctrl_mask'

Quoted 1 line

arch/arm/mach-omap2/clockdomain.c: In function

'omap2_clkdm_clk_disable':

Quoted 1 line

arch/arm/mach-omap2/clockdomain.c:994: error: 'struct clockdomain'

has no member named 'clktrctrl_mask'

Quoted 1 line

arch/arm/mach-omap2/clockdomain.c:998: error: 'struct clockdomain'

has no member named 'clktrctrl_mask'

Quoted 4 lines

make[1]: *** [arch/arm/mach-omap2/clockdomain.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

Fix the build break with use of ARCH_OMAP2PLUS instead of OMAP2 or

OMAP3

arch/arm/mach-

Quoted 8 lines
---
 arch/arm/mach-omap2/clockdomain.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach- renamed from arch/arm/mach-omap2/clockdomain.h +0 -0

omap2/clockdomain.h

Quoted 12 lines

arch/arm/mach-omap2/clockdomain.h struct clockdomain { · line 106

Quoted 9 lines

index de3faa2..6fa82f5 100644

arch/arm/mach-omap2/clockdomain.h +1 -1
@@ -103,7 +103,7 @@ struct clockdomain {
 		const char *name;
 		struct powerdomain *ptr;
 	} pwrdm;
-#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
+#ifdef CONFIG_ARCH_OMAP2PLUS

No need for this, just drop the #ifdef...

Perfect. Will fix this in v2

Quoted 4 lines

arch/arm/mach-omap2/clockdomain.h struct clockdomain { · line 107

Quoted 1 line
arch/arm/mach-omap2/clockdomain.h +0 -0
 	const u16 clktrctrl_mask;

- Paul

#21 lore raw

cover omap2plus: Trivial build break fixes

In reply to Santosh Shilimkar
Quoted 5 lines · Santosh Shilimkar

These are trivial build fixes which I found while doing some testing 'omap-for-linus' branch.

The series is generated against the linux-omap 'omap-for-linus' branch and boot tested on OMAP4430 SDP and OMAP3630 ZOOM.

Minor nit in your git-send-email config.

Can you add the following to your ~/.gitconfig, or update to newer git where this is now the default:

[sendemail]
chainreplyto = false

This will make all patches a reply to PATCH 0 instead of to the previous patch.

Thanks,

Kevin

Quoted 19 lines

The following changes since commit dc69d1af9e8d9cbbabff88bb35a6782187a22229:
Ben Gamari (1):
omap2: Make OMAP2PLUS select OMAP_DM_TIMER

Santosh Shilimkar (5):
omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask
omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'
omap2plus: voltage: Trivial warning fix 'no return statement'
omap2plus: voltage: Trivial linking fix 'undefined reference'
omap2plus: voltage: Trivial linking fix for 'EINVAL' undeclared

 arch/arm/mach-omap2/Makefile              |    2 +-
 arch/arm/mach-omap2/clockdomain.h         |    2 +-
 arch/arm/mach-omap2/prm2xxx_3xxx.h        |   45 ++++++++++++++++++++++++++++-
 arch/arm/plat-omap/include/plat/voltage.h |   17 ++++++++--
 4 files changed, 59 insertions(+), 7 deletions(-)
#22 lore raw

cover omap2plus: Trivial build break fixes

Quoted 23 lines

-----Original Message-----
From: Kevin Hilman [mailto:khilman at ti.com]
Sent: Wednesday, January 05, 2011 6:08 AM
To: Santosh Shilimkar
Cc: linux-omap at vger.kernel.org; tony at atomide.com; linux-arm- kernel at lists.infradead.org
Subject: Re: [PATCH 0/5] omap2plus: Trivial build break fixes

Quoted 4 lines · Santosh Shilimkar

These are trivial build fixes which I found while doing some testing 'omap-for-linus' branch.

The series is generated against the linux-omap 'omap-for-linus'

branch

Quoted 1 line

and boot tested on OMAP4430 SDP and OMAP3630 ZOOM.

Minor nit in your git-send-email config.

Can you add the following to your ~/.gitconfig, or update to newer git
where this is now the default:

Quoted 7 lines

[sendemail]
chainreplyto = false

This will make all patches a reply to PATCH 0 instead of to the previous
patch.

Have tried this in v2 I posted but it didn't appear to be a reply for PATCH 0.

May be I missed something.

Regards,
Santosh

#23 lore raw

cover omap2plus: Trivial build break fixes

Santosh Shilimkar <[email protected]> writes:

[...]

Quoted 9 lines
Quoted 9 lines

Minor nit in your git-send-email config.

Can you add the following to your ~/.gitconfig, or update to newer git
where this is now the default:

[sendemail]
chainreplyto = false

Quoted 6 lines
Quoted 4 lines

This will make all patches a reply to PATCH 0 instead of to the previous
patch.

Have tried this in v2 I posted but it didn't appear to be a reply for PATCH 0.

You didn't have (or I didn't see) a PATCH 0 in your v2 version. After patch 1, all patches are replies to patch 1 (using In-Reply-To: and References:) resulting in proper threading.

Quoted 1 line

May be I missed something.

I don't think so, it looks right now.

Kevin