linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: omap2: remove redundant multiplatform checks
@ 2016-04-05 20:09 Jonas Rabenstein
  2016-04-05 21:49 ` kbuild test robot
  0 siblings, 1 reply; 9+ messages in thread
From: Jonas Rabenstein @ 2016-04-05 20:09 UTC (permalink / raw)
  To: linux, tony; +Cc: linux-omap, linux-arm-kernel, linux-kernel, Jonas Rabenstein

The directory arch/arm/mach-omap2 is only selected for compilation if
CONFIG_ARCH_OMAP2PLUS is selected. CONFIG_ARCH_OMAP2PLUS itself is a
silent option and all machines selecting this option are multiplatform
devices. As a consequence checks for CONFIG_ARCH_MULTIPLATFORM as well
as CONFIG_ARCH_OMAP2PLUS within that directory are superfluous and can
be removed.

Signed-off-by: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
---
 arch/arm/mach-omap2/Makefile |   2 +-
 arch/arm/mach-omap2/soc.h    | 119 ++-----------------------------------------
 2 files changed, 6 insertions(+), 115 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 0ba6a0e..04e276c 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
+ccflags-y := -I$(srctree)/$(src)/include \
 	-I$(srctree)/arch/arm/plat-omap/include
 
 # Common support
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index 364418c..f1418d4 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -42,79 +42,7 @@
  * Test if multicore OMAP support is needed
  */
 #undef MULTI_OMAP2
-#undef OMAP_NAME
-
-#ifdef CONFIG_ARCH_MULTIPLATFORM
 #define MULTI_OMAP2
-#endif
-#ifdef CONFIG_SOC_OMAP2420
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME omap2420
-# endif
-#endif
-#ifdef CONFIG_SOC_OMAP2430
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME omap2430
-# endif
-#endif
-#ifdef CONFIG_ARCH_OMAP3
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME omap3
-# endif
-#endif
-#ifdef CONFIG_ARCH_OMAP4
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME omap4
-# endif
-#endif
-
-#ifdef CONFIG_SOC_OMAP5
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME omap5
-# endif
-#endif
-
-#ifdef CONFIG_SOC_AM33XX
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME am33xx
-# endif
-#endif
-
-#ifdef CONFIG_SOC_AM43XX
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME am43xx
-# endif
-#endif
-
-#ifdef CONFIG_SOC_DRA7XX
-# ifdef OMAP_NAME
-#  undef MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME DRA7XX
-# endif
-#endif
 
 /*
  * Omap device type i.e. EMU/HS/TST/GP/BAD
@@ -242,11 +170,6 @@ IS_AM_SUBCLASS(437x, 0x437)
 IS_DRA_SUBCLASS(75x, 0x75)
 IS_DRA_SUBCLASS(72x, 0x72)
 
-#define soc_is_omap24xx()		0
-#define soc_is_omap242x()		0
-#define soc_is_omap243x()		0
-#define soc_is_omap34xx()		0
-#define soc_is_omap343x()		0
 #define soc_is_ti81xx()			0
 #define soc_is_ti816x()			0
 #define soc_is_ti814x()			0
@@ -265,46 +188,16 @@ IS_DRA_SUBCLASS(72x, 0x72)
 #define soc_is_dra74x()			0
 #define soc_is_dra72x()			0
 
-#if defined(MULTI_OMAP2)
-# if defined(CONFIG_ARCH_OMAP2)
-#  undef  soc_is_omap24xx
+#if defined(CONFIG_ARCH_OMAP2)
 #  define soc_is_omap24xx()		is_omap24xx()
-# endif
-# if defined (CONFIG_SOC_OMAP2420)
-#  undef  soc_is_omap242x
+#endif
+#if defined(CONFIG_SOC_OMAP2420)
 #  define soc_is_omap242x()		is_omap242x()
-# endif
-# if defined (CONFIG_SOC_OMAP2430)
-#  undef  soc_is_omap243x
+#if defined(CONFIG_SOC_OMAP2430)
 #  define soc_is_omap243x()		is_omap243x()
-# endif
-# if defined(CONFIG_ARCH_OMAP3)
-#  undef  soc_is_omap34xx
-#  undef  soc_is_omap343x
+#if defined(CONFIG_ARCH_OMAP3)
 #  define soc_is_omap34xx()		is_omap34xx()
 #  define soc_is_omap343x()		is_omap343x()
-# endif
-#else
-# if defined(CONFIG_ARCH_OMAP2)
-#  undef  soc_is_omap24xx
-#  define soc_is_omap24xx()		1
-# endif
-# if defined(CONFIG_SOC_OMAP2420)
-#  undef  soc_is_omap242x
-#  define soc_is_omap242x()		1
-# endif
-# if defined(CONFIG_SOC_OMAP2430)
-#  undef  soc_is_omap243x
-#  define soc_is_omap243x()		1
-# endif
-# if defined(CONFIG_ARCH_OMAP3)
-#  undef  soc_is_omap34xx
-#  define soc_is_omap34xx()		1
-# endif
-# if defined(CONFIG_SOC_OMAP3430)
-#  undef  soc_is_omap343x
-#  define soc_is_omap343x()		1
-# endif
 #endif
 
 /*
@@ -339,7 +232,6 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define soc_is_omap5430()		0
 
 /* These are needed for the common code */
-#ifdef CONFIG_ARCH_OMAP2PLUS
 #define soc_is_omap7xx()		0
 #define soc_is_omap15xx()		0
 #define soc_is_omap16xx()		0
@@ -350,7 +242,6 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define soc_is_omap1710()		0
 #define cpu_class_is_omap1()		0
 #define cpu_class_is_omap2()		1
-#endif
 
 #if defined(CONFIG_ARCH_OMAP2)
 # undef  soc_is_omap2420
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] arm: omap2: remove redundant multiplatform checks
  2016-04-05 20:09 [PATCH] arm: omap2: remove redundant multiplatform checks Jonas Rabenstein
@ 2016-04-05 21:49 ` kbuild test robot
  2016-04-05 22:35   ` [PATCH v2] " Jonas Rabenstein
  0 siblings, 1 reply; 9+ messages in thread
From: kbuild test robot @ 2016-04-05 21:49 UTC (permalink / raw)
  To: Jonas Rabenstein
  Cc: kbuild-all, linux, tony, linux-omap, linux-arm-kernel,
	linux-kernel, Jonas Rabenstein

[-- Attachment #1: Type: text/plain, Size: 30315 bytes --]

Hi Jonas,

[auto build test ERROR on arm-soc/for-next]
[also build test ERROR on v4.6-rc2 next-20160405]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Jonas-Rabenstein/arm-omap2-remove-redundant-multiplatform-checks/20160406-041516
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git for-next
config: arm-multi_v7_defconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All error/warnings (new ones prefixed by >>):

   In file included from arch/arm/mach-omap2/usb-host.c:33:0:
>> arch/arm/mach-omap2/soc.h:194:0: error: unterminated #if
    #if defined(CONFIG_SOC_OMAP2420)
    ^
>> arch/arm/mach-omap2/soc.h:36:0: error: unterminated #ifndef
    #ifndef __ASSEMBLY__
    ^
   arch/arm/mach-omap2/usb-host.c: In function 'usbhs_init':
>> arch/arm/mach-omap2/usb-host.c:295:2: error: implicit declaration of function 'cpu_is_omap34xx' [-Werror=implicit-function-declaration]
     if (cpu_is_omap34xx()) {
     ^
>> arch/arm/mach-omap2/usb-host.c:299:21: error: 'OMAP3430_REV_ES2_1' undeclared (first use in this function)
      if (omap_rev() <= OMAP3430_REV_ES2_1)
                        ^
   arch/arm/mach-omap2/usb-host.c:299:21: note: each undeclared identifier is reported only once for each function it appears in
   cc1: some warnings being treated as errors
--
   In file included from arch/arm/mach-omap2/twl-common.c:31:0:
>> arch/arm/mach-omap2/soc.h:194:0: error: unterminated #if
    #if defined(CONFIG_SOC_OMAP2420)
    ^
>> arch/arm/mach-omap2/soc.h:36:0: error: unterminated #ifndef
    #ifndef __ASSEMBLY__
    ^
--
   In file included from arch/arm/mach-omap2/id.c:34:0:
>> arch/arm/mach-omap2/soc.h:194:0: error: unterminated #if
    #if defined(CONFIG_SOC_OMAP2420)
    ^
>> arch/arm/mach-omap2/soc.h:36:0: error: unterminated #ifndef
    #ifndef __ASSEMBLY__
    ^
   arch/arm/mach-omap2/id.c: In function 'omap_type':
>> arch/arm/mach-omap2/id.c:60:2: error: implicit declaration of function 'soc_is_omap24xx' [-Werror=implicit-function-declaration]
     if (soc_is_omap24xx()) {
     ^
>> arch/arm/mach-omap2/id.c:66:2: error: implicit declaration of function 'soc_is_omap34xx' [-Werror=implicit-function-declaration]
     } else if (soc_is_omap34xx()) {
     ^
   arch/arm/mach-omap2/id.c: At top level:
>> arch/arm/mach-omap2/id.c:148:1: warning: data definition has no type or storage class
    omap_device_initcall(omap_feed_randpool);
    ^
>> arch/arm/mach-omap2/id.c:148:1: error: type defaults to 'int' in declaration of 'omap_device_initcall' [-Werror=implicit-int]
>> arch/arm/mach-omap2/id.c:148:1: warning: parameter names (without types) in function declaration
   arch/arm/mach-omap2/id.c: In function 'omap3_cpuinfo':
>> arch/arm/mach-omap2/id.c:221:2: error: implicit declaration of function 'soc_is_omap3630' [-Werror=implicit-function-declaration]
     if (soc_is_omap3630()) {
     ^
>> arch/arm/mach-omap2/id.c:224:3: error: implicit declaration of function 'omap3_has_sgx' [-Werror=implicit-function-declaration]
      cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505";
      ^
>> arch/arm/mach-omap2/id.c:233:2: error: implicit declaration of function 'omap3_has_iva' [-Werror=implicit-function-declaration]
     } else if (omap3_has_iva() && omap3_has_sgx()) {
     ^
>> arch/arm/mach-omap2/id.c:249:2: error: implicit declaration of function 'omap3_has_l2cache' [-Werror=implicit-function-declaration]
     OMAP3_SHOW_FEATURE(l2cache);
     ^
>> arch/arm/mach-omap2/id.c:252:2: error: implicit declaration of function 'omap3_has_neon' [-Werror=implicit-function-declaration]
     OMAP3_SHOW_FEATURE(neon);
     ^
>> arch/arm/mach-omap2/id.c:253:2: error: implicit declaration of function 'omap3_has_isp' [-Werror=implicit-function-declaration]
     OMAP3_SHOW_FEATURE(isp);
     ^
>> arch/arm/mach-omap2/id.c:254:2: error: implicit declaration of function 'omap3_has_192mhz_clk' [-Werror=implicit-function-declaration]
     OMAP3_SHOW_FEATURE(192mhz_clk);
     ^
   arch/arm/mach-omap2/id.c: In function 'omap3xxx_check_features':
>> arch/arm/mach-omap2/id.c:262:20: error: 'OMAP3_HAS_L2CACHE' undeclared (first use in this function)
      omap_features |= OMAP3_HAS_ ##feat;   \
                       ^
>> arch/arm/mach-omap2/id.c:273:2: note: in expansion of macro 'OMAP3_CHECK_FEATURE'
     OMAP3_CHECK_FEATURE(status, L2CACHE);
     ^
   arch/arm/mach-omap2/id.c:262:20: note: each undeclared identifier is reported only once for each function it appears in
      omap_features |= OMAP3_HAS_ ##feat;   \
                       ^
>> arch/arm/mach-omap2/id.c:273:2: note: in expansion of macro 'OMAP3_CHECK_FEATURE'
     OMAP3_CHECK_FEATURE(status, L2CACHE);
     ^
>> arch/arm/mach-omap2/id.c:262:20: error: 'OMAP3_HAS_IVA' undeclared (first use in this function)
      omap_features |= OMAP3_HAS_ ##feat;   \
                       ^
   arch/arm/mach-omap2/id.c:274:2: note: in expansion of macro 'OMAP3_CHECK_FEATURE'
     OMAP3_CHECK_FEATURE(status, IVA);
     ^
>> arch/arm/mach-omap2/id.c:262:20: error: 'OMAP3_HAS_SGX' undeclared (first use in this function)
      omap_features |= OMAP3_HAS_ ##feat;   \
                       ^
   arch/arm/mach-omap2/id.c:275:2: note: in expansion of macro 'OMAP3_CHECK_FEATURE'
     OMAP3_CHECK_FEATURE(status, SGX);
     ^
>> arch/arm/mach-omap2/id.c:262:20: error: 'OMAP3_HAS_NEON' undeclared (first use in this function)
      omap_features |= OMAP3_HAS_ ##feat;   \
                       ^
   arch/arm/mach-omap2/id.c:276:2: note: in expansion of macro 'OMAP3_CHECK_FEATURE'
     OMAP3_CHECK_FEATURE(status, NEON);
     ^
--
   In file included from arch/arm/mach-omap2/io.c:31:0:
>> arch/arm/mach-omap2/soc.h:194:0: error: unterminated #if
    #if defined(CONFIG_SOC_OMAP2420)
    ^
   In file included from arch/arm/mach-omap2/io.c:31:0:
>> arch/arm/mach-omap2/soc.h:36:0: error: unterminated #ifndef
    #ifndef __ASSEMBLY__
    ^
   arch/arm/mach-omap2/io.c: In function '_omap2_init_reprogram_sdrc':
>> arch/arm/mach-omap2/io.c:389:2: error: implicit declaration of function 'cpu_is_omap34xx' [-Werror=implicit-function-declaration]
     if (!cpu_is_omap34xx())
     ^
   arch/arm/mach-omap2/io.c: In function 'omap3_init_early':
>> arch/arm/mach-omap2/io.c:493:24: error: 'OMAP343X_CLASS' undeclared (first use in this function)
     omap2_set_globals_tap(OMAP343X_CLASS, OMAP2_L4_IO_ADDRESS(0x4830A000));
                           ^
   arch/arm/mach-omap2/io.c:493:24: note: each undeclared identifier is reported only once for each function it appears in
>> arch/arm/mach-omap2/io.c:505:2: error: implicit declaration of function 'omap3xxx_check_revision' [-Werror=implicit-function-declaration]
     omap3xxx_check_revision();
     ^
>> arch/arm/mach-omap2/io.c:506:2: error: implicit declaration of function 'omap3xxx_check_features' [-Werror=implicit-function-declaration]
     omap3xxx_check_features();
     ^
>> arch/arm/mach-omap2/io.c:522:3: error: implicit declaration of function 'cpu_is_omap3630' [-Werror=implicit-function-declaration]
      else if (cpu_is_omap3630())
      ^
>> arch/arm/mach-omap2/io.c:524:26: error: 'OMAP3430_REV_ES1_0' undeclared (first use in this function)
      else if (omap_rev() == OMAP3430_REV_ES1_0)
                             ^
   arch/arm/mach-omap2/io.c: In function 'ti814x_init_early':
>> arch/arm/mach-omap2/io.c:604:24: error: 'TI814X_CLASS' undeclared (first use in this function)
     omap2_set_globals_tap(TI814X_CLASS,
                           ^
>> arch/arm/mach-omap2/io.c:608:2: error: implicit declaration of function 'ti81xx_check_features' [-Werror=implicit-function-declaration]
     ti81xx_check_features();
     ^
   arch/arm/mach-omap2/io.c: In function 'ti816x_init_early':
>> arch/arm/mach-omap2/io.c:620:24: error: 'TI816X_CLASS' undeclared (first use in this function)
     omap2_set_globals_tap(TI816X_CLASS,
                           ^
   arch/arm/mach-omap2/io.c: In function 'am33xx_init_early':
>> arch/arm/mach-omap2/io.c:639:24: error: 'AM335X_CLASS' undeclared (first use in this function)
     omap2_set_globals_tap(AM335X_CLASS,
                           ^
>> arch/arm/mach-omap2/io.c:643:2: error: implicit declaration of function 'am33xx_check_features' [-Werror=implicit-function-declaration]
     am33xx_check_features();
     ^
   arch/arm/mach-omap2/io.c: In function 'am43xx_init_early':
   arch/arm/mach-omap2/io.c:661:24: error: 'AM335X_CLASS' undeclared (first use in this function)
     omap2_set_globals_tap(AM335X_CLASS,
                           ^
   arch/arm/mach-omap2/io.c: In function 'omap4430_init_early':
>> arch/arm/mach-omap2/io.c:685:24: error: 'OMAP443X_CLASS' undeclared (first use in this function)
     omap2_set_globals_tap(OMAP443X_CLASS,
                           ^
>> arch/arm/mach-omap2/io.c:689:2: error: implicit declaration of function 'omap4xxx_check_revision' [-Werror=implicit-function-declaration]
     omap4xxx_check_revision();
     ^
>> arch/arm/mach-omap2/io.c:690:2: error: implicit declaration of function 'omap4xxx_check_features' [-Werror=implicit-function-declaration]
     omap4xxx_check_features();
     ^
   arch/arm/mach-omap2/io.c: In function 'omap5_init_early':
>> arch/arm/mach-omap2/io.c:713:24: error: 'OMAP54XX_CLASS' undeclared (first use in this function)
     omap2_set_globals_tap(OMAP54XX_CLASS,
                           ^
>> arch/arm/mach-omap2/io.c:719:2: error: implicit declaration of function 'omap5xxx_check_revision' [-Werror=implicit-function-declaration]
     omap5xxx_check_revision();
     ^
   arch/arm/mach-omap2/io.c: In function 'dra7xx_init_early':
>> arch/arm/mach-omap2/io.c:744:2: error: implicit declaration of function 'dra7xxx_check_revision' [-Werror=implicit-function-declaration]
     dra7xxx_check_revision();
     ^
   arch/arm/mach-omap2/io.c: In function 'omap_sdrc_init':
>> arch/arm/mach-omap2/io.c:766:2: error: implicit declaration of function 'cpu_is_omap24xx' [-Werror=implicit-function-declaration]
     if (cpu_is_omap24xx() || omap3_has_sdrc()) {
     ^
--
   In file included from arch/arm/mach-omap2/control.c:21:0:
>> arch/arm/mach-omap2/soc.h:194:0: error: unterminated #if
    #if defined(CONFIG_SOC_OMAP2420)
    ^
>> arch/arm/mach-omap2/soc.h:36:0: error: unterminated #ifndef
    #ifndef __ASSEMBLY__
    ^
   arch/arm/mach-omap2/control.c: In function 'omap_ctrl_write_dsp_boot_addr':
>> arch/arm/mach-omap2/control.c:245:2: error: implicit declaration of function 'cpu_is_omap243x' [-Werror=implicit-function-declaration]
     u32 offset = cpu_is_omap243x() ? OMAP243X_CONTROL_IVA2_BOOTADDR :
     ^
>> arch/arm/mach-omap2/control.c:246:8: error: implicit declaration of function 'cpu_is_omap34xx' [-Werror=implicit-function-declaration]
           cpu_is_omap34xx() ? OMAP343X_CONTROL_IVA2_BOOTADDR :
           ^
>> arch/arm/mach-omap2/control.c:247:8: error: implicit declaration of function 'cpu_is_omap44xx' [-Werror=implicit-function-declaration]
           cpu_is_omap44xx() ? OMAP4_CTRL_MODULE_CORE_DSP_BOOTADDR :
           ^
   arch/arm/mach-omap2/control.c: In function 'omap3_save_scratchpad_contents':
>> arch/arm/mach-omap2/control.c:316:2: error: implicit declaration of function 'cpu_is_omap3630' [-Werror=implicit-function-declaration]
     if (cpu_is_omap3630())
     ^
>> arch/arm/mach-omap2/control.c:319:25: error: 'OMAP3430_REV_ES3_0' undeclared (first use in this function)
     else if (omap_rev() != OMAP3430_REV_ES3_0 &&
                            ^
   arch/arm/mach-omap2/control.c:319:25: note: each undeclared identifier is reported only once for each function it appears in
>> arch/arm/mach-omap2/control.c:320:20: error: 'OMAP3430_REV_ES3_1' undeclared (first use in this function)
         omap_rev() != OMAP3430_REV_ES3_1 &&
                       ^
>> arch/arm/mach-omap2/control.c:321:20: error: 'OMAP3430_REV_ES3_1_2' undeclared (first use in this function)
         omap_rev() != OMAP3430_REV_ES3_1_2)
                       ^
   cc1: some warnings being treated as errors
--
   In file included from arch/arm/mach-omap2/devices.c:31:0:
>> arch/arm/mach-omap2/soc.h:194:0: error: unterminated #if
    #if defined(CONFIG_SOC_OMAP2420)
    ^
>> arch/arm/mach-omap2/soc.h:36:0: error: unterminated #ifndef
    #ifndef __ASSEMBLY__
    ^
   arch/arm/mach-omap2/devices.c: In function 'omap3_l3_init':
>> arch/arm/mach-omap2/devices.c:50:2: error: implicit declaration of function 'cpu_is_omap34xx' [-Werror=implicit-function-declaration]
     if (!(cpu_is_omap34xx()) || of_have_populated_dt())
     ^
   arch/arm/mach-omap2/devices.c: At top level:
>> arch/arm/mach-omap2/devices.c:66:1: warning: data definition has no type or storage class
    omap_postcore_initcall(omap3_l3_init);
    ^
>> arch/arm/mach-omap2/devices.c:66:1: error: type defaults to 'int' in declaration of 'omap_postcore_initcall' [-Werror=implicit-int]
>> arch/arm/mach-omap2/devices.c:66:1: warning: parameter names (without types) in function declaration
   arch/arm/mach-omap2/devices.c:214:1: warning: data definition has no type or storage class
    omap_arch_initcall(omap2_init_devices);
    ^
>> arch/arm/mach-omap2/devices.c:214:1: error: type defaults to 'int' in declaration of 'omap_arch_initcall' [-Werror=implicit-int]
   arch/arm/mach-omap2/devices.c:214:1: warning: parameter names (without types) in function declaration
   arch/arm/mach-omap2/devices.c:240:1: warning: data definition has no type or storage class
    omap_postcore_initcall(omap_gpmc_init);
    ^
   arch/arm/mach-omap2/devices.c:240:1: error: type defaults to 'int' in declaration of 'omap_postcore_initcall' [-Werror=implicit-int]
   arch/arm/mach-omap2/devices.c:240:1: warning: parameter names (without types) in function declaration
   arch/arm/mach-omap2/devices.c:40:19: warning: 'omap3_l3_init' defined but not used [-Wunused-function]
    static int __init omap3_l3_init(void)
                      ^
   arch/arm/mach-omap2/devices.c:193:19: warning: 'omap2_init_devices' defined but not used [-Wunused-function]
    static int __init omap2_init_devices(void)
                      ^
   arch/arm/mach-omap2/devices.c:216:19: warning: 'omap_gpmc_init' defined but not used [-Wunused-function]
    static int __init omap_gpmc_init(void)
                      ^
   cc1: some warnings being treated as errors
--
   In file included from arch/arm/mach-omap2/serial.c:36:0:
>> arch/arm/mach-omap2/soc.h:194:0: error: unterminated #if
    #if defined(CONFIG_SOC_OMAP2420)
    ^
>> arch/arm/mach-omap2/soc.h:36:0: error: unterminated #ifndef
    #ifndef __ASSEMBLY__
    ^
>> arch/arm/mach-omap2/serial.c:216:1: warning: data definition has no type or storage class
    omap_postcore_initcall(omap_serial_early_init);
    ^
>> arch/arm/mach-omap2/serial.c:216:1: error: type defaults to 'int' in declaration of 'omap_postcore_initcall' [-Werror=implicit-int]
>> arch/arm/mach-omap2/serial.c:216:1: warning: parameter names (without types) in function declaration
   arch/arm/mach-omap2/serial.c: In function 'omap_serial_init_port':
>> arch/arm/mach-omap2/serial.c:289:2: error: implicit declaration of function 'cpu_is_omap34xx' [-Werror=implicit-function-declaration]
     if (((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads)
     ^
>> arch/arm/mach-omap2/serial.c:289:2: error: implicit declaration of function 'cpu_is_omap44xx' [-Werror=implicit-function-declaration]
   arch/arm/mach-omap2/serial.c: At top level:
   arch/arm/mach-omap2/serial.c:176:19: warning: 'omap_serial_early_init' defined but not used [-Wunused-function]
    static int __init omap_serial_early_init(void)
                      ^
   cc1: some warnings being treated as errors
--
   In file included from arch/arm/mach-omap2/timer.c:55:0:
>> arch/arm/mach-omap2/soc.h:194:0: error: unterminated #if
    #if defined(CONFIG_SOC_OMAP2420)
    ^
>> arch/arm/mach-omap2/soc.h:36:0: error: unterminated #ifndef
    #ifndef __ASSEMBLY__
    ^
   arch/arm/mach-omap2/timer.c: In function 'omap_dmtimer_init':
>> arch/arm/mach-omap2/timer.c:206:2: error: implicit declaration of function 'cpu_is_omap34xx' [-Werror=implicit-function-declaration]
     if (!cpu_is_omap34xx() && !soc_is_dra7xx())
     ^
   arch/arm/mach-omap2/timer.c: In function 'omap_dm_timer_get_errata':
>> arch/arm/mach-omap2/timer.c:223:2: error: implicit declaration of function 'cpu_is_omap24xx' [-Werror=implicit-function-declaration]
     if (cpu_is_omap24xx())
     ^
   arch/arm/mach-omap2/timer.c: At top level:
>> arch/arm/mach-omap2/timer.c:746:1: warning: data definition has no type or storage class
    omap_arch_initcall(omap2_dm_timer_init);
    ^
>> arch/arm/mach-omap2/timer.c:746:1: error: type defaults to 'int' in declaration of 'omap_arch_initcall' [-Werror=implicit-int]
>> arch/arm/mach-omap2/timer.c:746:1: warning: parameter names (without types) in function declaration
   arch/arm/mach-omap2/timer.c:730:19: warning: 'omap2_dm_timer_init' defined but not used [-Wunused-function]
    static int __init omap2_dm_timer_init(void)
                      ^
   cc1: some warnings being treated as errors
--
   In file included from arch/arm/mach-omap2/pm.c:27:0:
>> arch/arm/mach-omap2/soc.h:194:0: error: unterminated #if
    #if defined(CONFIG_SOC_OMAP2420)
    ^
>> arch/arm/mach-omap2/soc.h:36:0: error: unterminated #ifndef
    #ifndef __ASSEMBLY__
    ^
   arch/arm/mach-omap2/pm.c: In function 'omap2_init_processor_devices':
>> arch/arm/mach-omap2/pm.c:99:2: error: implicit declaration of function 'omap3_has_iva' [-Werror=implicit-function-declaration]
     if (omap3_has_iva())
     ^
>> arch/arm/mach-omap2/pm.c:102:2: error: implicit declaration of function 'cpu_is_omap44xx' [-Werror=implicit-function-declaration]
     if (cpu_is_omap44xx()) {
     ^
   arch/arm/mach-omap2/pm.c: In function 'omap_pm_begin':
>> arch/arm/mach-omap2/pm.c:224:2: error: implicit declaration of function 'cpu_is_omap34xx' [-Werror=implicit-function-declaration]
     if (cpu_is_omap34xx())
     ^
   arch/arm/mach-omap2/pm.c: At top level:
>> arch/arm/mach-omap2/pm.c:297:1: warning: data definition has no type or storage class
    omap_postcore_initcall(omap2_common_pm_init);
    ^
>> arch/arm/mach-omap2/pm.c:297:1: error: type defaults to 'int' in declaration of 'omap_postcore_initcall' [-Werror=implicit-int]
>> arch/arm/mach-omap2/pm.c:297:1: warning: parameter names (without types) in function declaration
   arch/arm/mach-omap2/pm.c:289:19: warning: 'omap2_common_pm_init' defined but not used [-Wunused-function]
    static int __init omap2_common_pm_init(void)
                      ^
   cc1: some warnings being treated as errors
..

vim +194 arch/arm/mach-omap2/soc.h

c49f34bc Tony Lindgren  2012-08-31   30  #include "omap34xx.h"
c49f34bc Tony Lindgren  2012-08-31   31  #include "omap44xx.h"
c49f34bc Tony Lindgren  2012-08-31   32  #include "ti81xx.h"
c49f34bc Tony Lindgren  2012-08-31   33  #include "am33xx.h"
c49f34bc Tony Lindgren  2012-08-31   34  #include "omap54xx.h"
e4c060db Tony Lindgren  2012-10-05   35  
e4c060db Tony Lindgren  2012-10-05  @36  #ifndef __ASSEMBLY__
e4c060db Tony Lindgren  2012-10-05   37  
e4c060db Tony Lindgren  2012-10-05   38  #include <linux/bitops.h>
6852215a R Sricharan    2013-02-06   39  #include <linux/of.h>
e4c060db Tony Lindgren  2012-10-05   40  
e4c060db Tony Lindgren  2012-10-05   41  /*
e4c060db Tony Lindgren  2012-10-05   42   * Test if multicore OMAP support is needed
e4c060db Tony Lindgren  2012-10-05   43   */
e4c060db Tony Lindgren  2012-10-05   44  #undef MULTI_OMAP2
e4c060db Tony Lindgren  2012-10-05   45  #define MULTI_OMAP2
6852215a R Sricharan    2013-02-06   46  
e4c060db Tony Lindgren  2012-10-05   47  /*
e4c060db Tony Lindgren  2012-10-05   48   * Omap device type i.e. EMU/HS/TST/GP/BAD
e4c060db Tony Lindgren  2012-10-05   49   */
e4c060db Tony Lindgren  2012-10-05   50  #define OMAP2_DEVICE_TYPE_TEST		0
e4c060db Tony Lindgren  2012-10-05   51  #define OMAP2_DEVICE_TYPE_EMU		1
e4c060db Tony Lindgren  2012-10-05   52  #define OMAP2_DEVICE_TYPE_SEC		2
e4c060db Tony Lindgren  2012-10-05   53  #define OMAP2_DEVICE_TYPE_GP		3
e4c060db Tony Lindgren  2012-10-05   54  #define OMAP2_DEVICE_TYPE_BAD		4
e4c060db Tony Lindgren  2012-10-05   55  
e4c060db Tony Lindgren  2012-10-05   56  int omap_type(void);
e4c060db Tony Lindgren  2012-10-05   57  
e4c060db Tony Lindgren  2012-10-05   58  /*
e4c060db Tony Lindgren  2012-10-05   59   * omap_rev bits:
d0b50905 Tony Lindgren  2015-10-16   60   * SoC id bits	(0730, 1510, 1710, 2422...)	[31:16]
d0b50905 Tony Lindgren  2015-10-16   61   * SoC revision	(See _REV_ defined in cpu.h)	[15:08]
d0b50905 Tony Lindgren  2015-10-16   62   * SoC class bits (15xx, 16xx, 24xx, 34xx...)	[07:00]
e4c060db Tony Lindgren  2012-10-05   63   */
e4c060db Tony Lindgren  2012-10-05   64  unsigned int omap_rev(void);
e4c060db Tony Lindgren  2012-10-05   65  
816a65ef Tony Lindgren  2013-01-11   66  static inline int soc_is_omap(void)
816a65ef Tony Lindgren  2013-01-11   67  {
816a65ef Tony Lindgren  2013-01-11   68  	return omap_rev() != 0;
816a65ef Tony Lindgren  2013-01-11   69  }
816a65ef Tony Lindgren  2013-01-11   70  
e4c060db Tony Lindgren  2012-10-05   71  /*
d0b50905 Tony Lindgren  2015-10-16   72   * Get the SoC revision for OMAP devices
e4c060db Tony Lindgren  2012-10-05   73   */
e4c060db Tony Lindgren  2012-10-05   74  #define GET_OMAP_REVISION()	((omap_rev() >> 8) & 0xff)
e4c060db Tony Lindgren  2012-10-05   75  
e4c060db Tony Lindgren  2012-10-05   76  /*
e4c060db Tony Lindgren  2012-10-05   77   * Macros to group OMAP into cpu classes.
e4c060db Tony Lindgren  2012-10-05   78   * These can be used in most places.
d0b50905 Tony Lindgren  2015-10-16   79   * soc_is_omap24xx():	True for OMAP2420, OMAP2422, OMAP2423, OMAP2430
d0b50905 Tony Lindgren  2015-10-16   80   * soc_is_omap242x():	True for OMAP2420, OMAP2422, OMAP2423
d0b50905 Tony Lindgren  2015-10-16   81   * soc_is_omap243x():	True for OMAP2430
d0b50905 Tony Lindgren  2015-10-16   82   * soc_is_omap343x():	True for OMAP3430
d0b50905 Tony Lindgren  2015-10-16   83   * soc_is_omap443x():	True for OMAP4430
d0b50905 Tony Lindgren  2015-10-16   84   * soc_is_omap446x():	True for OMAP4460
d0b50905 Tony Lindgren  2015-10-16   85   * soc_is_omap447x():	True for OMAP4470
e4c060db Tony Lindgren  2012-10-05   86   * soc_is_omap543x():	True for OMAP5430, OMAP5432
e4c060db Tony Lindgren  2012-10-05   87   */
e4c060db Tony Lindgren  2012-10-05   88  #define GET_OMAP_CLASS	(omap_rev() & 0xff)
e4c060db Tony Lindgren  2012-10-05   89  
e4c060db Tony Lindgren  2012-10-05   90  #define IS_OMAP_CLASS(class, id)			\
e4c060db Tony Lindgren  2012-10-05   91  static inline int is_omap ##class (void)		\
e4c060db Tony Lindgren  2012-10-05   92  {							\
e4c060db Tony Lindgren  2012-10-05   93  	return (GET_OMAP_CLASS == (id)) ? 1 : 0;	\
e4c060db Tony Lindgren  2012-10-05   94  }
e4c060db Tony Lindgren  2012-10-05   95  
e4c060db Tony Lindgren  2012-10-05   96  #define GET_AM_CLASS	((omap_rev() >> 24) & 0xff)
e4c060db Tony Lindgren  2012-10-05   97  
e4c060db Tony Lindgren  2012-10-05   98  #define IS_AM_CLASS(class, id)				\
e4c060db Tony Lindgren  2012-10-05   99  static inline int is_am ##class (void)			\
e4c060db Tony Lindgren  2012-10-05  100  {							\
e4c060db Tony Lindgren  2012-10-05  101  	return (GET_AM_CLASS == (id)) ? 1 : 0;		\
e4c060db Tony Lindgren  2012-10-05  102  }
e4c060db Tony Lindgren  2012-10-05  103  
e4c060db Tony Lindgren  2012-10-05  104  #define GET_TI_CLASS	((omap_rev() >> 24) & 0xff)
e4c060db Tony Lindgren  2012-10-05  105  
e4c060db Tony Lindgren  2012-10-05  106  #define IS_TI_CLASS(class, id)			\
e4c060db Tony Lindgren  2012-10-05  107  static inline int is_ti ##class (void)		\
e4c060db Tony Lindgren  2012-10-05  108  {							\
e4c060db Tony Lindgren  2012-10-05  109  	return (GET_TI_CLASS == (id)) ? 1 : 0;	\
e4c060db Tony Lindgren  2012-10-05  110  }
e4c060db Tony Lindgren  2012-10-05  111  
06c2d368 Keerthy        2016-02-17  112  #define GET_DRA_CLASS	((omap_rev() >> 24) & 0xff)
06c2d368 Keerthy        2016-02-17  113  
06c2d368 Keerthy        2016-02-17  114  #define IS_DRA_CLASS(class, id)				\
06c2d368 Keerthy        2016-02-17  115  static inline int is_dra ##class (void)			\
06c2d368 Keerthy        2016-02-17  116  {							\
06c2d368 Keerthy        2016-02-17  117  	return (GET_DRA_CLASS == (id)) ? 1 : 0;		\
06c2d368 Keerthy        2016-02-17  118  }
06c2d368 Keerthy        2016-02-17  119  
e4c060db Tony Lindgren  2012-10-05  120  #define GET_OMAP_SUBCLASS	((omap_rev() >> 20) & 0x0fff)
e4c060db Tony Lindgren  2012-10-05  121  
e4c060db Tony Lindgren  2012-10-05  122  #define IS_OMAP_SUBCLASS(subclass, id)			\
e4c060db Tony Lindgren  2012-10-05  123  static inline int is_omap ##subclass (void)		\
e4c060db Tony Lindgren  2012-10-05  124  {							\
e4c060db Tony Lindgren  2012-10-05  125  	return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0;	\
e4c060db Tony Lindgren  2012-10-05  126  }
e4c060db Tony Lindgren  2012-10-05  127  
e4c060db Tony Lindgren  2012-10-05  128  #define IS_TI_SUBCLASS(subclass, id)			\
e4c060db Tony Lindgren  2012-10-05  129  static inline int is_ti ##subclass (void)		\
e4c060db Tony Lindgren  2012-10-05  130  {							\
e4c060db Tony Lindgren  2012-10-05  131  	return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0;	\
e4c060db Tony Lindgren  2012-10-05  132  }
e4c060db Tony Lindgren  2012-10-05  133  
e4c060db Tony Lindgren  2012-10-05  134  #define IS_AM_SUBCLASS(subclass, id)			\
e4c060db Tony Lindgren  2012-10-05  135  static inline int is_am ##subclass (void)		\
e4c060db Tony Lindgren  2012-10-05  136  {							\
e4c060db Tony Lindgren  2012-10-05  137  	return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0;	\
e4c060db Tony Lindgren  2012-10-05  138  }
e4c060db Tony Lindgren  2012-10-05  139  
06c2d368 Keerthy        2016-02-17  140  #define IS_DRA_SUBCLASS(subclass, id)			\
06c2d368 Keerthy        2016-02-17  141  static inline int is_dra ##subclass (void)		\
06c2d368 Keerthy        2016-02-17  142  {							\
06c2d368 Keerthy        2016-02-17  143  	return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0;	\
06c2d368 Keerthy        2016-02-17  144  }
06c2d368 Keerthy        2016-02-17  145  
e4c060db Tony Lindgren  2012-10-05  146  IS_OMAP_CLASS(24xx, 0x24)
e4c060db Tony Lindgren  2012-10-05  147  IS_OMAP_CLASS(34xx, 0x34)
e4c060db Tony Lindgren  2012-10-05  148  IS_OMAP_CLASS(44xx, 0x44)
e4c060db Tony Lindgren  2012-10-05  149  IS_AM_CLASS(35xx, 0x35)
e4c060db Tony Lindgren  2012-10-05  150  IS_OMAP_CLASS(54xx, 0x54)
e4c060db Tony Lindgren  2012-10-05  151  IS_AM_CLASS(33xx, 0x33)
c664d0a9 Afzal Mohammed 2013-05-27  152  IS_AM_CLASS(43xx, 0x43)
e4c060db Tony Lindgren  2012-10-05  153  
e4c060db Tony Lindgren  2012-10-05  154  IS_TI_CLASS(81xx, 0x81)
06c2d368 Keerthy        2016-02-17  155  IS_DRA_CLASS(7xx, 0x7)
e4c060db Tony Lindgren  2012-10-05  156  
e4c060db Tony Lindgren  2012-10-05  157  IS_OMAP_SUBCLASS(242x, 0x242)
e4c060db Tony Lindgren  2012-10-05  158  IS_OMAP_SUBCLASS(243x, 0x243)
e4c060db Tony Lindgren  2012-10-05  159  IS_OMAP_SUBCLASS(343x, 0x343)
e4c060db Tony Lindgren  2012-10-05  160  IS_OMAP_SUBCLASS(363x, 0x363)
e4c060db Tony Lindgren  2012-10-05  161  IS_OMAP_SUBCLASS(443x, 0x443)
e4c060db Tony Lindgren  2012-10-05  162  IS_OMAP_SUBCLASS(446x, 0x446)
e4c060db Tony Lindgren  2012-10-05  163  IS_OMAP_SUBCLASS(447x, 0x447)
e4c060db Tony Lindgren  2012-10-05  164  IS_OMAP_SUBCLASS(543x, 0x543)
e4c060db Tony Lindgren  2012-10-05  165  
e4c060db Tony Lindgren  2012-10-05  166  IS_TI_SUBCLASS(816x, 0x816)
e4c060db Tony Lindgren  2012-10-05  167  IS_TI_SUBCLASS(814x, 0x814)
e4c060db Tony Lindgren  2012-10-05  168  IS_AM_SUBCLASS(335x, 0x335)
c664d0a9 Afzal Mohammed 2013-05-27  169  IS_AM_SUBCLASS(437x, 0x437)
06c2d368 Keerthy        2016-02-17  170  IS_DRA_SUBCLASS(75x, 0x75)
06c2d368 Keerthy        2016-02-17  171  IS_DRA_SUBCLASS(72x, 0x72)
e4c060db Tony Lindgren  2012-10-05  172  
d0b50905 Tony Lindgren  2015-10-16  173  #define soc_is_ti81xx()			0
d0b50905 Tony Lindgren  2015-10-16  174  #define soc_is_ti816x()			0
d0b50905 Tony Lindgren  2015-10-16  175  #define soc_is_ti814x()			0
e4c060db Tony Lindgren  2012-10-05  176  #define soc_is_am35xx()			0
e4c060db Tony Lindgren  2012-10-05  177  #define soc_is_am33xx()			0
e4c060db Tony Lindgren  2012-10-05  178  #define soc_is_am335x()			0
c664d0a9 Afzal Mohammed 2013-05-27  179  #define soc_is_am43xx()			0
c664d0a9 Afzal Mohammed 2013-05-27  180  #define soc_is_am437x()			0
d0b50905 Tony Lindgren  2015-10-16  181  #define soc_is_omap44xx()		0
d0b50905 Tony Lindgren  2015-10-16  182  #define soc_is_omap443x()		0
d0b50905 Tony Lindgren  2015-10-16  183  #define soc_is_omap446x()		0
d0b50905 Tony Lindgren  2015-10-16  184  #define soc_is_omap447x()		0
e4c060db Tony Lindgren  2012-10-05  185  #define soc_is_omap54xx()		0
e4c060db Tony Lindgren  2012-10-05  186  #define soc_is_omap543x()		0
6852215a R Sricharan    2013-02-06  187  #define soc_is_dra7xx()			0
af438fec Rajendra Nayak 2014-08-27  188  #define soc_is_dra74x()			0
af438fec Rajendra Nayak 2014-08-27  189  #define soc_is_dra72x()			0
e4c060db Tony Lindgren  2012-10-05  190  
e4c060db Tony Lindgren  2012-10-05  191  #if defined(CONFIG_ARCH_OMAP2)
d0b50905 Tony Lindgren  2015-10-16  192  #  define soc_is_omap24xx()		is_omap24xx()
e4c060db Tony Lindgren  2012-10-05  193  #endif
e4c060db Tony Lindgren  2012-10-05 @194  #if defined(CONFIG_SOC_OMAP2420)
d0b50905 Tony Lindgren  2015-10-16  195  #  define soc_is_omap242x()		is_omap242x()
e4c060db Tony Lindgren  2012-10-05  196  #if defined(CONFIG_SOC_OMAP2430)
d0b50905 Tony Lindgren  2015-10-16  197  #  define soc_is_omap243x()		is_omap243x()

:::::: The code at line 194 was first introduced by commit
:::::: e4c060db2c13f10de09101afc564763f9fd0019a ARM: OMAP: Split plat/cpu.h into local soc.h for mach-omap1 and mach-omap2

:::::: TO: Tony Lindgren <tony@atomide.com>
:::::: CC: Tony Lindgren <tony@atomide.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 36970 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] arm: omap2: remove redundant multiplatform checks
  2016-04-05 21:49 ` kbuild test robot
@ 2016-04-05 22:35   ` Jonas Rabenstein
  2016-04-06  0:05     ` kbuild test robot
  2016-04-06  4:26     ` Lokesh Vutla
  0 siblings, 2 replies; 9+ messages in thread
From: Jonas Rabenstein @ 2016-04-05 22:35 UTC (permalink / raw)
  To: linux, tony; +Cc: linux-omap, linux-arm-kernel, linux-kernel, Jonas Rabenstein

The directory arch/arm/mach-omap2 is only selected for compilation if
CONFIG_ARCH_OMAP2PLUS is selected. CONFIG_ARCH_OMAP2PLUS itself is a
silent option and all machines selecting this option are multiplatform
devices. As a consequence checks for CONFIG_ARCH_MULTIPLATFORM as well
as CONFIG_ARCH_OMAP2PLUS within that directory are superfluous and can
be removed.

Signed-off-by: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
---
changes in v2:
 * missed two #endif's

 arch/arm/mach-omap2/Makefile |   2 +-
 arch/arm/mach-omap2/soc.h    | 121 +++----------------------------------------
 2 files changed, 8 insertions(+), 115 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 0ba6a0e..04e276c 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
+ccflags-y := -I$(srctree)/$(src)/include \
 	-I$(srctree)/arch/arm/plat-omap/include
 
 # Common support
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index 364418c..79f1573 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -42,79 +42,7 @@
  * Test if multicore OMAP support is needed
  */
 #undef MULTI_OMAP2
-#undef OMAP_NAME
-
-#ifdef CONFIG_ARCH_MULTIPLATFORM
 #define MULTI_OMAP2
-#endif
-#ifdef CONFIG_SOC_OMAP2420
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME omap2420
-# endif
-#endif
-#ifdef CONFIG_SOC_OMAP2430
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME omap2430
-# endif
-#endif
-#ifdef CONFIG_ARCH_OMAP3
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME omap3
-# endif
-#endif
-#ifdef CONFIG_ARCH_OMAP4
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME omap4
-# endif
-#endif
-
-#ifdef CONFIG_SOC_OMAP5
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME omap5
-# endif
-#endif
-
-#ifdef CONFIG_SOC_AM33XX
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME am33xx
-# endif
-#endif
-
-#ifdef CONFIG_SOC_AM43XX
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME am43xx
-# endif
-#endif
-
-#ifdef CONFIG_SOC_DRA7XX
-# ifdef OMAP_NAME
-#  undef MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME DRA7XX
-# endif
-#endif
 
 /*
  * Omap device type i.e. EMU/HS/TST/GP/BAD
@@ -242,11 +170,6 @@ IS_AM_SUBCLASS(437x, 0x437)
 IS_DRA_SUBCLASS(75x, 0x75)
 IS_DRA_SUBCLASS(72x, 0x72)
 
-#define soc_is_omap24xx()		0
-#define soc_is_omap242x()		0
-#define soc_is_omap243x()		0
-#define soc_is_omap34xx()		0
-#define soc_is_omap343x()		0
 #define soc_is_ti81xx()			0
 #define soc_is_ti816x()			0
 #define soc_is_ti814x()			0
@@ -265,46 +188,18 @@ IS_DRA_SUBCLASS(72x, 0x72)
 #define soc_is_dra74x()			0
 #define soc_is_dra72x()			0
 
-#if defined(MULTI_OMAP2)
-# if defined(CONFIG_ARCH_OMAP2)
-#  undef  soc_is_omap24xx
+#if defined(CONFIG_ARCH_OMAP2)
 #  define soc_is_omap24xx()		is_omap24xx()
-# endif
-# if defined (CONFIG_SOC_OMAP2420)
-#  undef  soc_is_omap242x
+#endif
+#if defined(CONFIG_SOC_OMAP2420)
 #  define soc_is_omap242x()		is_omap242x()
-# endif
-# if defined (CONFIG_SOC_OMAP2430)
-#  undef  soc_is_omap243x
+#endif
+#if defined(CONFIG_SOC_OMAP2430)
 #  define soc_is_omap243x()		is_omap243x()
-# endif
-# if defined(CONFIG_ARCH_OMAP3)
-#  undef  soc_is_omap34xx
-#  undef  soc_is_omap343x
+#endif
+#if defined(CONFIG_ARCH_OMAP3)
 #  define soc_is_omap34xx()		is_omap34xx()
 #  define soc_is_omap343x()		is_omap343x()
-# endif
-#else
-# if defined(CONFIG_ARCH_OMAP2)
-#  undef  soc_is_omap24xx
-#  define soc_is_omap24xx()		1
-# endif
-# if defined(CONFIG_SOC_OMAP2420)
-#  undef  soc_is_omap242x
-#  define soc_is_omap242x()		1
-# endif
-# if defined(CONFIG_SOC_OMAP2430)
-#  undef  soc_is_omap243x
-#  define soc_is_omap243x()		1
-# endif
-# if defined(CONFIG_ARCH_OMAP3)
-#  undef  soc_is_omap34xx
-#  define soc_is_omap34xx()		1
-# endif
-# if defined(CONFIG_SOC_OMAP3430)
-#  undef  soc_is_omap343x
-#  define soc_is_omap343x()		1
-# endif
 #endif
 
 /*
@@ -339,7 +234,6 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define soc_is_omap5430()		0
 
 /* These are needed for the common code */
-#ifdef CONFIG_ARCH_OMAP2PLUS
 #define soc_is_omap7xx()		0
 #define soc_is_omap15xx()		0
 #define soc_is_omap16xx()		0
@@ -350,7 +244,6 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define soc_is_omap1710()		0
 #define cpu_class_is_omap1()		0
 #define cpu_class_is_omap2()		1
-#endif
 
 #if defined(CONFIG_ARCH_OMAP2)
 # undef  soc_is_omap2420
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] arm: omap2: remove redundant multiplatform checks
  2016-04-05 22:35   ` [PATCH v2] " Jonas Rabenstein
@ 2016-04-06  0:05     ` kbuild test robot
  2016-04-06  4:26     ` Lokesh Vutla
  1 sibling, 0 replies; 9+ messages in thread
From: kbuild test robot @ 2016-04-06  0:05 UTC (permalink / raw)
  To: Jonas Rabenstein
  Cc: kbuild-all, linux, tony, linux-omap, linux-arm-kernel,
	linux-kernel, Jonas Rabenstein

[-- Attachment #1: Type: text/plain, Size: 4843 bytes --]

Hi Jonas,

[auto build test ERROR on arm-soc/for-next]
[also build test ERROR on v4.6-rc2 next-20160405]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Jonas-Rabenstein/arm-omap2-remove-redundant-multiplatform-checks/20160406-064050
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git for-next
config: arm-multi_v7_defconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   arch/arm/mach-omap2/io.c: In function 'omap_sdrc_init':
>> arch/arm/mach-omap2/io.c:766:2: error: implicit declaration of function 'soc_is_omap24xx' [-Werror=implicit-function-declaration]
     if (cpu_is_omap24xx() || omap3_has_sdrc()) {
     ^
   cc1: some warnings being treated as errors
--
   arch/arm/mach-omap2/control.c: In function 'omap_ctrl_write_dsp_boot_addr':
>> arch/arm/mach-omap2/control.c:245:2: error: implicit declaration of function 'soc_is_omap243x' [-Werror=implicit-function-declaration]
     u32 offset = cpu_is_omap243x() ? OMAP243X_CONTROL_IVA2_BOOTADDR :
     ^
   cc1: some warnings being treated as errors
--
   arch/arm/mach-omap2/timer.c: In function 'omap_dm_timer_get_errata':
>> arch/arm/mach-omap2/timer.c:223:2: error: implicit declaration of function 'soc_is_omap24xx' [-Werror=implicit-function-declaration]
     if (cpu_is_omap24xx())
     ^
   cc1: some warnings being treated as errors
--
   arch/arm/mach-omap2/display.c: In function 'omap_display_get_version':
>> arch/arm/mach-omap2/display.c:265:2: error: implicit declaration of function 'soc_is_omap24xx' [-Werror=implicit-function-declaration]
     if (cpu_is_omap24xx())
     ^
   cc1: some warnings being treated as errors
--
   arch/arm/mach-omap2/i2c.c: In function 'omap_i2c_nr_ports':
>> arch/arm/mach-omap2/i2c.c:115:2: error: implicit declaration of function 'soc_is_omap24xx' [-Werror=implicit-function-declaration]
     if (cpu_is_omap24xx())
     ^
   cc1: some warnings being treated as errors
--
   arch/arm/mach-omap2/omap_hwmod.c: In function 'omap_hwmod_init':
>> arch/arm/mach-omap2/omap_hwmod.c:3895:2: error: implicit declaration of function 'soc_is_omap24xx' [-Werror=implicit-function-declaration]
     if (cpu_is_omap24xx()) {
     ^
   cc1: some warnings being treated as errors
--
   arch/arm/mach-omap2/sram.c: In function 'is_sram_locked':
>> arch/arm/mach-omap2/sram.c:66:3: error: implicit declaration of function 'soc_is_omap242x' [-Werror=implicit-function-declaration]
      if (cpu_is_omap242x()) {
      ^
   arch/arm/mach-omap2/sram.c: In function 'omap_detect_sram':
>> arch/arm/mach-omap2/sram.c:114:4: error: implicit declaration of function 'soc_is_omap243x' [-Werror=implicit-function-declaration]
       else if (cpu_is_omap243x())
       ^
   cc1: some warnings being treated as errors
--
   arch/arm/mach-omap2/clockdomain.c: In function 'clkdm_hwmod_enable':
>> arch/arm/mach-omap2/clockdomain.c:1233:2: error: implicit declaration of function 'soc_is_omap24xx' [-Werror=implicit-function-declaration]
     if (cpu_is_omap24xx() || cpu_is_omap34xx())
     ^
   cc1: some warnings being treated as errors
--
   arch/arm/mach-omap2/clock.c: In function 'ti_clk_init_features':
>> arch/arm/mach-omap2/clock.c:194:2: error: implicit declaration of function 'soc_is_omap24xx' [-Werror=implicit-function-declaration]
     if (cpu_is_omap24xx()) {
     ^
   cc1: some warnings being treated as errors

vim +/soc_is_omap24xx +766 arch/arm/mach-omap2/io.c

a3a9384a R Sricharan      2013-07-03  760  
a4ca9dbe Tony Lindgren    2011-08-22  761  void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
4805734b Paul Walmsley    2010-12-21  762  				      struct omap_sdrc_params *sdrc_cs1)
4805734b Paul Walmsley    2010-12-21  763  {
a66cb345 Tony Lindgren    2011-10-04  764  	omap_sram_init();
a66cb345 Tony Lindgren    2011-10-04  765  
01001712 Hemant Pedanekar 2011-02-16 @766  	if (cpu_is_omap24xx() || omap3_has_sdrc()) {
58cda884 Jean Pihet       2009-07-24  767  		omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
2f135eaf Paul Walmsley    2009-06-19  768  		_omap2_init_reprogram_sdrc();
aa4b1f6e Kevin Hilman     2010-03-10  769  	}

:::::: The code at line 766 was first introduced by commit
:::::: 01001712c96f82e6317b1e09729d8fc4bcc66957 TI816X: Update common OMAP machine specific sources

:::::: TO: Hemant Pedanekar <hemantp@ti.com>
:::::: CC: Tony Lindgren <tony@atomide.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 36970 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] arm: omap2: remove redundant multiplatform checks
  2016-04-05 22:35   ` [PATCH v2] " Jonas Rabenstein
  2016-04-06  0:05     ` kbuild test robot
@ 2016-04-06  4:26     ` Lokesh Vutla
  2016-04-06  8:14       ` [PATCH v3] " Jonas Rabenstein
  1 sibling, 1 reply; 9+ messages in thread
From: Lokesh Vutla @ 2016-04-06  4:26 UTC (permalink / raw)
  To: Jonas Rabenstein, linux, tony; +Cc: linux-omap, linux-arm-kernel, linux-kernel



On Wednesday 06 April 2016 04:05 AM, Jonas Rabenstein wrote:
> The directory arch/arm/mach-omap2 is only selected for compilation if
> CONFIG_ARCH_OMAP2PLUS is selected. CONFIG_ARCH_OMAP2PLUS itself is a
> silent option and all machines selecting this option are multiplatform
> devices. As a consequence checks for CONFIG_ARCH_MULTIPLATFORM as well
> as CONFIG_ARCH_OMAP2PLUS within that directory are superfluous and can
> be removed.
> 
> Signed-off-by: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
> ---
> changes in v2:
>  * missed two #endif's
> 
>  arch/arm/mach-omap2/Makefile |   2 +-
>  arch/arm/mach-omap2/soc.h    | 121 +++----------------------------------------
>  2 files changed, 8 insertions(+), 115 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 0ba6a0e..04e276c 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -2,7 +2,7 @@
>  # Makefile for the linux kernel.
>  #
>  
> -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
> +ccflags-y := -I$(srctree)/$(src)/include \
>  	-I$(srctree)/arch/arm/plat-omap/include
>  
>  # Common support
> diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
> index 364418c..79f1573 100644
> --- a/arch/arm/mach-omap2/soc.h
> +++ b/arch/arm/mach-omap2/soc.h
> @@ -42,79 +42,7 @@
>   * Test if multicore OMAP support is needed
>   */
>  #undef MULTI_OMAP2
> -#undef OMAP_NAME
> -
> -#ifdef CONFIG_ARCH_MULTIPLATFORM
>  #define MULTI_OMAP2
> -#endif
> -#ifdef CONFIG_SOC_OMAP2420
> -# ifdef OMAP_NAME
> -#  undef  MULTI_OMAP2
> -#  define MULTI_OMAP2
> -# else
> -#  define OMAP_NAME omap2420
> -# endif
> -#endif
> -#ifdef CONFIG_SOC_OMAP2430
> -# ifdef OMAP_NAME
> -#  undef  MULTI_OMAP2
> -#  define MULTI_OMAP2
> -# else
> -#  define OMAP_NAME omap2430
> -# endif
> -#endif
> -#ifdef CONFIG_ARCH_OMAP3
> -# ifdef OMAP_NAME
> -#  undef  MULTI_OMAP2
> -#  define MULTI_OMAP2
> -# else
> -#  define OMAP_NAME omap3
> -# endif
> -#endif
> -#ifdef CONFIG_ARCH_OMAP4
> -# ifdef OMAP_NAME
> -#  undef  MULTI_OMAP2
> -#  define MULTI_OMAP2
> -# else
> -#  define OMAP_NAME omap4
> -# endif
> -#endif
> -
> -#ifdef CONFIG_SOC_OMAP5
> -# ifdef OMAP_NAME
> -#  undef  MULTI_OMAP2
> -#  define MULTI_OMAP2
> -# else
> -#  define OMAP_NAME omap5
> -# endif
> -#endif
> -
> -#ifdef CONFIG_SOC_AM33XX
> -# ifdef OMAP_NAME
> -#  undef  MULTI_OMAP2
> -#  define MULTI_OMAP2
> -# else
> -#  define OMAP_NAME am33xx
> -# endif
> -#endif
> -
> -#ifdef CONFIG_SOC_AM43XX
> -# ifdef OMAP_NAME
> -#  undef  MULTI_OMAP2
> -#  define MULTI_OMAP2
> -# else
> -#  define OMAP_NAME am43xx
> -# endif
> -#endif
> -
> -#ifdef CONFIG_SOC_DRA7XX
> -# ifdef OMAP_NAME
> -#  undef MULTI_OMAP2
> -#  define MULTI_OMAP2
> -# else
> -#  define OMAP_NAME DRA7XX
> -# endif
> -#endif
>  
>  /*
>   * Omap device type i.e. EMU/HS/TST/GP/BAD
> @@ -242,11 +170,6 @@ IS_AM_SUBCLASS(437x, 0x437)
>  IS_DRA_SUBCLASS(75x, 0x75)
>  IS_DRA_SUBCLASS(72x, 0x72)
>  
> -#define soc_is_omap24xx()		0
> -#define soc_is_omap242x()		0
> -#define soc_is_omap243x()		0
> -#define soc_is_omap34xx()		0
> -#define soc_is_omap343x()		0

Why are you deleting these definitions. Without these I am sure there
will be a build error when you don't select ARCH_OMAP2 or ARCH_OMAP3 and
building with omap2plus_defconfig.

Thanks and regards,
Lokesh

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v3] arm: omap2: remove redundant multiplatform checks
  2016-04-06  4:26     ` Lokesh Vutla
@ 2016-04-06  8:14       ` Jonas Rabenstein
  2016-04-06  8:45         ` Lokesh Vutla
  0 siblings, 1 reply; 9+ messages in thread
From: Jonas Rabenstein @ 2016-04-06  8:14 UTC (permalink / raw)
  To: Lokesh Vutla; +Cc: Jonas Rabenstein, linux-omap, linux-arm-kernel, linux-kernel

From: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>

The directory arch/arm/mach-omap2 is only selected for compilation if
CONFIG_ARCH_OMAP2PLUS is selected. CONFIG_ARCH_OMAP2PLUS itself is a
silent option and all machines selecting this option are multiplatform
devices. As a consequence checks for CONFIG_ARCH_MULTIPLATFORM as well
as CONFIG_ARCH_OMAP2PLUS within that directory are superfluous and can
be removed.

Signed-off-by: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
---
change in v3:
 * fix build error with unselected ARCH_OMAP2 and ARCH_OMAP3

 arch/arm/mach-omap2/Makefile |   2 +-
 arch/arm/mach-omap2/soc.h    | 140 +++++++------------------------------------
 2 files changed, 22 insertions(+), 120 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 0ba6a0e..04e276c 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
+ccflags-y := -I$(srctree)/$(src)/include \
 	-I$(srctree)/arch/arm/plat-omap/include
 
 # Common support
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index 364418c..2aa01c2 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -39,82 +39,10 @@
 #include <linux/of.h>
 
 /*
- * Test if multicore OMAP support is needed
+ * OMAP2+ is always defined as ARCH_MULTIPLATFORM in Kconfig
  */
 #undef MULTI_OMAP2
-#undef OMAP_NAME
-
-#ifdef CONFIG_ARCH_MULTIPLATFORM
 #define MULTI_OMAP2
-#endif
-#ifdef CONFIG_SOC_OMAP2420
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME omap2420
-# endif
-#endif
-#ifdef CONFIG_SOC_OMAP2430
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME omap2430
-# endif
-#endif
-#ifdef CONFIG_ARCH_OMAP3
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME omap3
-# endif
-#endif
-#ifdef CONFIG_ARCH_OMAP4
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME omap4
-# endif
-#endif
-
-#ifdef CONFIG_SOC_OMAP5
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME omap5
-# endif
-#endif
-
-#ifdef CONFIG_SOC_AM33XX
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME am33xx
-# endif
-#endif
-
-#ifdef CONFIG_SOC_AM43XX
-# ifdef OMAP_NAME
-#  undef  MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME am43xx
-# endif
-#endif
-
-#ifdef CONFIG_SOC_DRA7XX
-# ifdef OMAP_NAME
-#  undef MULTI_OMAP2
-#  define MULTI_OMAP2
-# else
-#  define OMAP_NAME DRA7XX
-# endif
-#endif
 
 /*
  * Omap device type i.e. EMU/HS/TST/GP/BAD
@@ -242,11 +170,6 @@ IS_AM_SUBCLASS(437x, 0x437)
 IS_DRA_SUBCLASS(75x, 0x75)
 IS_DRA_SUBCLASS(72x, 0x72)
 
-#define soc_is_omap24xx()		0
-#define soc_is_omap242x()		0
-#define soc_is_omap243x()		0
-#define soc_is_omap34xx()		0
-#define soc_is_omap343x()		0
 #define soc_is_ti81xx()			0
 #define soc_is_ti816x()			0
 #define soc_is_ti814x()			0
@@ -265,46 +188,27 @@ IS_DRA_SUBCLASS(72x, 0x72)
 #define soc_is_dra74x()			0
 #define soc_is_dra72x()			0
 
-#if defined(MULTI_OMAP2)
-# if defined(CONFIG_ARCH_OMAP2)
-#  undef  soc_is_omap24xx
-#  define soc_is_omap24xx()		is_omap24xx()
-# endif
-# if defined (CONFIG_SOC_OMAP2420)
-#  undef  soc_is_omap242x
-#  define soc_is_omap242x()		is_omap242x()
-# endif
-# if defined (CONFIG_SOC_OMAP2430)
-#  undef  soc_is_omap243x
-#  define soc_is_omap243x()		is_omap243x()
-# endif
-# if defined(CONFIG_ARCH_OMAP3)
-#  undef  soc_is_omap34xx
-#  undef  soc_is_omap343x
-#  define soc_is_omap34xx()		is_omap34xx()
-#  define soc_is_omap343x()		is_omap343x()
-# endif
+#if defined(CONFIG_ARCH_OMAP2)
+# define soc_is_omap24xx()		is_omap24xx()
 #else
-# if defined(CONFIG_ARCH_OMAP2)
-#  undef  soc_is_omap24xx
-#  define soc_is_omap24xx()		1
-# endif
-# if defined(CONFIG_SOC_OMAP2420)
-#  undef  soc_is_omap242x
-#  define soc_is_omap242x()		1
-# endif
-# if defined(CONFIG_SOC_OMAP2430)
-#  undef  soc_is_omap243x
-#  define soc_is_omap243x()		1
-# endif
-# if defined(CONFIG_ARCH_OMAP3)
-#  undef  soc_is_omap34xx
-#  define soc_is_omap34xx()		1
-# endif
-# if defined(CONFIG_SOC_OMAP3430)
-#  undef  soc_is_omap343x
-#  define soc_is_omap343x()		1
-# endif
+# define soc_is_omap24xx()		0
+#endif
+#if defined(CONFIG_SOC_OMAP2420)
+# define soc_is_omap242x()		is_omap242x()
+#else
+# define soc_is_omap242x()		0
+#endif
+#if defined(CONFIG_SOC_OMAP2430)
+# define soc_is_omap243x()		is_omap243x()
+#else
+# define soc_is_omap243x()		0
+#endif
+#if defined(CONFIG_ARCH_OMAP3)
+# define soc_is_omap34xx()		is_omap34xx()
+# define soc_is_omap343x()		is_omap343x()
+#else
+# define soc_is_omap34xx()		0
+# define soc_is_omap343x()		0
 #endif
 
 /*
@@ -339,7 +243,6 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define soc_is_omap5430()		0
 
 /* These are needed for the common code */
-#ifdef CONFIG_ARCH_OMAP2PLUS
 #define soc_is_omap7xx()		0
 #define soc_is_omap15xx()		0
 #define soc_is_omap16xx()		0
@@ -350,7 +253,6 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define soc_is_omap1710()		0
 #define cpu_class_is_omap1()		0
 #define cpu_class_is_omap2()		1
-#endif
 
 #if defined(CONFIG_ARCH_OMAP2)
 # undef  soc_is_omap2420
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v3] arm: omap2: remove redundant multiplatform checks
  2016-04-06  8:14       ` [PATCH v3] " Jonas Rabenstein
@ 2016-04-06  8:45         ` Lokesh Vutla
  2016-04-06 19:14           ` Tony Lindgren
  0 siblings, 1 reply; 9+ messages in thread
From: Lokesh Vutla @ 2016-04-06  8:45 UTC (permalink / raw)
  To: Jonas Rabenstein, Tony Lindgren
  Cc: Jonas Rabenstein, linux-omap, linux-arm-kernel, linux-kernel

+Tony

On Wednesday 06 April 2016 01:44 PM, Jonas Rabenstein wrote:
> From: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
> 
> The directory arch/arm/mach-omap2 is only selected for compilation if
> CONFIG_ARCH_OMAP2PLUS is selected. CONFIG_ARCH_OMAP2PLUS itself is a
> silent option and all machines selecting this option are multiplatform
> devices. As a consequence checks for CONFIG_ARCH_MULTIPLATFORM as well
> as CONFIG_ARCH_OMAP2PLUS within that directory are superfluous and can
> be removed.

Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

Thanks and regards,
Lokesh

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3] arm: omap2: remove redundant multiplatform checks
  2016-04-06  8:45         ` Lokesh Vutla
@ 2016-04-06 19:14           ` Tony Lindgren
  2016-04-13 21:07             ` Tony Lindgren
  0 siblings, 1 reply; 9+ messages in thread
From: Tony Lindgren @ 2016-04-06 19:14 UTC (permalink / raw)
  To: Lokesh Vutla
  Cc: Jonas Rabenstein, Jonas Rabenstein, linux-omap, linux-arm-kernel,
	linux-kernel

* Lokesh Vutla <lokeshvutla@ti.com> [160406 01:50]:
> +Tony
> 
> On Wednesday 06 April 2016 01:44 PM, Jonas Rabenstein wrote:
> > From: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
> > 
> > The directory arch/arm/mach-omap2 is only selected for compilation if
> > CONFIG_ARCH_OMAP2PLUS is selected. CONFIG_ARCH_OMAP2PLUS itself is a
> > silent option and all machines selecting this option are multiplatform
> > devices. As a consequence checks for CONFIG_ARCH_MULTIPLATFORM as well
> > as CONFIG_ARCH_OMAP2PLUS within that directory are superfluous and can
> > be removed.
> 
> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

Yeah nice if we can remove the legacy multi SoC options. I'll take
a closer look within few days as I'm still at ELC.

Regards,

Tony

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3] arm: omap2: remove redundant multiplatform checks
  2016-04-06 19:14           ` Tony Lindgren
@ 2016-04-13 21:07             ` Tony Lindgren
  0 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2016-04-13 21:07 UTC (permalink / raw)
  To: Lokesh Vutla
  Cc: Jonas Rabenstein, Jonas Rabenstein, linux-omap, linux-arm-kernel,
	linux-kernel

* Tony Lindgren <tony@atomide.com> [160406 12:16]:
> * Lokesh Vutla <lokeshvutla@ti.com> [160406 01:50]:
> > +Tony
> > 
> > On Wednesday 06 April 2016 01:44 PM, Jonas Rabenstein wrote:
> > > From: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
> > > 
> > > The directory arch/arm/mach-omap2 is only selected for compilation if
> > > CONFIG_ARCH_OMAP2PLUS is selected. CONFIG_ARCH_OMAP2PLUS itself is a
> > > silent option and all machines selecting this option are multiplatform
> > > devices. As a consequence checks for CONFIG_ARCH_MULTIPLATFORM as well
> > > as CONFIG_ARCH_OMAP2PLUS within that directory are superfluous and can
> > > be removed.
> > 
> > Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
> 
> Yeah nice if we can remove the legacy multi SoC options. I'll take
> a closer look within few days as I'm still at ELC.

Applying into omap-for-v4.7/soc thanks.

Tony

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-04-13 21:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-05 20:09 [PATCH] arm: omap2: remove redundant multiplatform checks Jonas Rabenstein
2016-04-05 21:49 ` kbuild test robot
2016-04-05 22:35   ` [PATCH v2] " Jonas Rabenstein
2016-04-06  0:05     ` kbuild test robot
2016-04-06  4:26     ` Lokesh Vutla
2016-04-06  8:14       ` [PATCH v3] " Jonas Rabenstein
2016-04-06  8:45         ` Lokesh Vutla
2016-04-06 19:14           ` Tony Lindgren
2016-04-13 21:07             ` Tony Lindgren

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).