[v1,40/43] ARM: ep93xx: soc: drop defines

Message ID 20230601054549.10843-22-nikita.shubin@maquefel.me
State New
Headers
Series None |

Commit Message

Nikita Shubin June 1, 2023, 5:45 a.m. UTC
  Remove unnecessary defines, as we dropped board files.

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
 include/linux/platform_data/eth-ep93xx.h    | 10 ------
 include/linux/platform_data/keypad-ep93xx.h | 32 -----------------
 include/linux/soc/cirrus/ep93xx.h           | 38 ++++++++-------------
 3 files changed, 14 insertions(+), 66 deletions(-)
 delete mode 100644 include/linux/platform_data/eth-ep93xx.h
 delete mode 100644 include/linux/platform_data/keypad-ep93xx.h
  

Comments

kernel test robot June 1, 2023, 2:18 p.m. UTC | #1
Hi Nikita,

kernel test robot noticed the following build warnings:

[auto build test WARNING on clk/clk-next]
[also build test WARNING on linusw-pinctrl/devel linusw-pinctrl/for-next linus/master v6.4-rc4]
[cannot apply to soc/for-next robh/for-next next-20230601]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Nikita-Shubin/dt-bindings-soc-Add-Cirrus-EP93xx/20230601-143415
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
patch link:    https://lore.kernel.org/r/20230601054549.10843-22-nikita.shubin%40maquefel.me
patch subject: [PATCH v1 40/43] ARM: ep93xx: soc: drop defines
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20230601/202306011611.BkjkqkuR-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 12.3.0
reproduce (this is a W=1 build):
        mkdir -p ~/bin
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/372fa9eb75b475c6b8f26079e8716c95622ae9b7
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Nikita-Shubin/dt-bindings-soc-Add-Cirrus-EP93xx/20230601-143415
        git checkout 372fa9eb75b475c6b8f26079e8716c95622ae9b7
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=alpha olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash drivers/input/keyboard/ sound/soc/cirrus/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306011611.BkjkqkuR-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/input/keyboard/ep93xx_keypad.c:30:
   include/linux/soc/cirrus/ep93xx.h: In function 'ep93xx_devcfg_set_clear':
   include/linux/soc/cirrus/ep93xx.h:22:16: error: 'return' with a value, in function returning void [-Werror=return-type]
      22 |         return 0;
         |                ^
   include/linux/soc/cirrus/ep93xx.h:19:20: note: declared here
      19 | static inline void ep93xx_devcfg_set_clear(unsigned int set_bits,
         |                    ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/soc/cirrus/ep93xx.h: At top level:
>> include/linux/soc/cirrus/ep93xx.h:24:6: warning: no previous prototype for 'ep93xx_syscon_swlocked_write' [-Wmissing-prototypes]
      24 | void ep93xx_syscon_swlocked_write(unsigned int val, unsigned int reg)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/soc/cirrus/ep93xx.h: In function 'ep93xx_syscon_swlocked_write':
   include/linux/soc/cirrus/ep93xx.h:26:16: error: 'return' with a value, in function returning void [-Werror=return-type]
      26 |         return 0;
         |                ^
   include/linux/soc/cirrus/ep93xx.h:24:6: note: declared here
      24 | void ep93xx_syscon_swlocked_write(unsigned int val, unsigned int reg)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/soc/cirrus/ep93xx.h: At top level:
>> include/linux/soc/cirrus/ep93xx.h:28:6: warning: no previous prototype for 'ep93xx_swlocked_update_bits' [-Wmissing-prototypes]
      28 | void ep93xx_swlocked_update_bits(unsigned int reg,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/soc/cirrus/ep93xx.h: In function 'ep93xx_swlocked_update_bits':
   include/linux/soc/cirrus/ep93xx.h:31:16: error: 'return' with a value, in function returning void [-Werror=return-type]
      31 |         return 0;
         |                ^
   include/linux/soc/cirrus/ep93xx.h:28:6: note: declared here
      28 | void ep93xx_swlocked_update_bits(unsigned int reg,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/input/keyboard/ep93xx_keypad.c: In function 'ep93xx_keypad_probe':
   drivers/input/keyboard/ep93xx_keypad.c:262:9: error: implicit declaration of function 'of_property_read_u32' [-Werror=implicit-function-declaration]
     262 |         of_property_read_u32(np, "cirrus,debounce-delay-ms", &keypad->debounce);
         |         ^~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from sound/soc/cirrus/ep93xx-i2s.c:28:
   include/linux/soc/cirrus/ep93xx.h: In function 'ep93xx_devcfg_set_clear':
   include/linux/soc/cirrus/ep93xx.h:22:16: error: 'return' with a value, in function returning void [-Werror=return-type]
      22 |         return 0;
         |                ^
   include/linux/soc/cirrus/ep93xx.h:19:20: note: declared here
      19 | static inline void ep93xx_devcfg_set_clear(unsigned int set_bits,
         |                    ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/soc/cirrus/ep93xx.h: At top level:
>> include/linux/soc/cirrus/ep93xx.h:24:6: warning: no previous prototype for 'ep93xx_syscon_swlocked_write' [-Wmissing-prototypes]
      24 | void ep93xx_syscon_swlocked_write(unsigned int val, unsigned int reg)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/soc/cirrus/ep93xx.h: In function 'ep93xx_syscon_swlocked_write':
   include/linux/soc/cirrus/ep93xx.h:26:16: error: 'return' with a value, in function returning void [-Werror=return-type]
      26 |         return 0;
         |                ^
   include/linux/soc/cirrus/ep93xx.h:24:6: note: declared here
      24 | void ep93xx_syscon_swlocked_write(unsigned int val, unsigned int reg)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/soc/cirrus/ep93xx.h: At top level:
>> include/linux/soc/cirrus/ep93xx.h:28:6: warning: no previous prototype for 'ep93xx_swlocked_update_bits' [-Wmissing-prototypes]
      28 | void ep93xx_swlocked_update_bits(unsigned int reg,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/soc/cirrus/ep93xx.h: In function 'ep93xx_swlocked_update_bits':
   include/linux/soc/cirrus/ep93xx.h:31:16: error: 'return' with a value, in function returning void [-Werror=return-type]
      31 |         return 0;
         |                ^
   include/linux/soc/cirrus/ep93xx.h:28:6: note: declared here
      28 | void ep93xx_swlocked_update_bits(unsigned int reg,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/ep93xx_syscon_swlocked_write +24 include/linux/soc/cirrus/ep93xx.h

    10	
    11	#if defined(CONFIG_ARCH_EP93XX)
    12	unsigned int ep93xx_chip_revision(void);
    13	void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits);
    14	void ep93xx_syscon_swlocked_write(unsigned int val, unsigned int reg);
    15	void ep93xx_swlocked_update_bits(unsigned int reg,
    16					 unsigned int mask, unsigned int val);
    17	#else
    18	static inline unsigned int ep93xx_chip_revision(void) { return 0; }
    19	static inline void ep93xx_devcfg_set_clear(unsigned int set_bits,
    20					unsigned int clear_bits)
    21	{
  > 22		return 0;
    23	}
  > 24	void ep93xx_syscon_swlocked_write(unsigned int val, unsigned int reg)
    25	{
  > 26		return 0;
    27	}
  > 28	void ep93xx_swlocked_update_bits(unsigned int reg,
    29					unsigned int mask, unsigned int val)
    30	{
    31		return 0;
    32	}
    33	#endif
    34
  

Patch

diff --git a/include/linux/platform_data/eth-ep93xx.h b/include/linux/platform_data/eth-ep93xx.h
deleted file mode 100644
index 8eef637a804d..000000000000
--- a/include/linux/platform_data/eth-ep93xx.h
+++ /dev/null
@@ -1,10 +0,0 @@ 
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _LINUX_PLATFORM_DATA_ETH_EP93XX
-#define _LINUX_PLATFORM_DATA_ETH_EP93XX
-
-struct ep93xx_eth_data {
-	unsigned char	dev_addr[6];
-	unsigned char	phy_id;
-};
-
-#endif
diff --git a/include/linux/platform_data/keypad-ep93xx.h b/include/linux/platform_data/keypad-ep93xx.h
deleted file mode 100644
index 3054fced8509..000000000000
--- a/include/linux/platform_data/keypad-ep93xx.h
+++ /dev/null
@@ -1,32 +0,0 @@ 
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __KEYPAD_EP93XX_H
-#define __KEYPAD_EP93XX_H
-
-struct matrix_keymap_data;
-
-/* flags for the ep93xx_keypad driver */
-#define EP93XX_KEYPAD_DISABLE_3_KEY	(1<<0)	/* disable 3-key reset */
-#define EP93XX_KEYPAD_DIAG_MODE		(1<<1)	/* diagnostic mode */
-#define EP93XX_KEYPAD_BACK_DRIVE	(1<<2)	/* back driving mode */
-#define EP93XX_KEYPAD_TEST_MODE		(1<<3)	/* scan only column 0 */
-#define EP93XX_KEYPAD_AUTOREPEAT	(1<<4)	/* enable key autorepeat */
-
-/**
- * struct ep93xx_keypad_platform_data - platform specific device structure
- * @keymap_data:	pointer to &matrix_keymap_data
- * @debounce:		debounce start count; terminal count is 0xff
- * @prescale:		row/column counter pre-scaler load value
- * @flags:		see above
- */
-struct ep93xx_keypad_platform_data {
-	struct matrix_keymap_data *keymap_data;
-	unsigned int	debounce;
-	unsigned int	prescale;
-	unsigned int	flags;
-	unsigned int	clk_rate;
-};
-
-#define EP93XX_MATRIX_ROWS		(8)
-#define EP93XX_MATRIX_COLS		(8)
-
-#endif	/* __KEYPAD_EP93XX_H */
diff --git a/include/linux/soc/cirrus/ep93xx.h b/include/linux/soc/cirrus/ep93xx.h
index 37c0e17a45c0..2acce55692a4 100644
--- a/include/linux/soc/cirrus/ep93xx.h
+++ b/include/linux/soc/cirrus/ep93xx.h
@@ -2,44 +2,34 @@ 
 #ifndef _SOC_EP93XX_H
 #define _SOC_EP93XX_H
 
-struct platform_device;
-
 #define EP93XX_CHIP_REV_D0	3
 #define EP93XX_CHIP_REV_D1	4
 #define EP93XX_CHIP_REV_E0	5
 #define EP93XX_CHIP_REV_E1	6
 #define EP93XX_CHIP_REV_E2	7
 
-#if defined(CONFIG_EP93XX_SOC_COMMON)
-int ep93xx_pwm_acquire_gpio(struct platform_device *pdev);
-void ep93xx_pwm_release_gpio(struct platform_device *pdev);
-int ep93xx_ide_acquire_gpio(struct platform_device *pdev);
-void ep93xx_ide_release_gpio(struct platform_device *pdev);
-int ep93xx_keypad_acquire_gpio(struct platform_device *pdev);
-void ep93xx_keypad_release_gpio(struct platform_device *pdev);
-int ep93xx_i2s_acquire(void);
-void ep93xx_i2s_release(void);
-#else
-static inline int ep93xx_pwm_acquire_gpio(struct platform_device *pdev) { return 0; }
-static inline void ep93xx_pwm_release_gpio(struct platform_device *pdev) {}
-static inline int ep93xx_ide_acquire_gpio(struct platform_device *pdev) { return 0; }
-static inline void ep93xx_ide_release_gpio(struct platform_device *pdev) {}
-static inline int ep93xx_keypad_acquire_gpio(struct platform_device *pdev) { return 0; }
-static inline void ep93xx_keypad_release_gpio(struct platform_device *pdev) {}
-static inline int ep93xx_i2s_acquire(void) { return 0; }
-static inline void ep93xx_i2s_release(void) {}
-#endif
-
 #if defined(CONFIG_ARCH_EP93XX)
 unsigned int ep93xx_chip_revision(void);
-#if defined(CONFIG_EP93XX_SOC)
 void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits);
 void ep93xx_syscon_swlocked_write(unsigned int val, unsigned int reg);
 void ep93xx_swlocked_update_bits(unsigned int reg,
 				 unsigned int mask, unsigned int val);
-#endif
 #else
 static inline unsigned int ep93xx_chip_revision(void) { return 0; }
+static inline void ep93xx_devcfg_set_clear(unsigned int set_bits,
+				unsigned int clear_bits)
+{
+	return 0;
+}
+void ep93xx_syscon_swlocked_write(unsigned int val, unsigned int reg)
+{
+	return 0;
+}
+void ep93xx_swlocked_update_bits(unsigned int reg,
+				unsigned int mask, unsigned int val)
+{
+	return 0;
+}
 #endif
 
 #endif