diff mbox series

[15/20] input: touchscreen: cyttsp4_core: Move 'cyttsp4_tch_abs_string' to the only file that references it

Message ID 20201104162427.2984742-16-lee.jones@linaro.org
State Accepted
Commit 45353186575d97a4cd35a429c0e4ec195376f4ed
Headers show
Series Rid W=1 issues from Input | expand

Commit Message

Lee Jones Nov. 4, 2020, 4:24 p.m. UTC
Fixes the following W=1 kernel build warning(s):

In file included from drivers/input/touchscreen/cyttsp_i2c_common.c:24:
 drivers/input/touchscreen/cyttsp4_core.h:236:27: warning: ‘cyttsp4_tch_abs_string’ defined but not used [-Wunused-const-variable=]
 236 | static const char  const cyttsp4_tch_abs_string[] = {
 | ^~~~~~~~~~~~~~~~~~~~~~
 In file included from drivers/input/touchscreen/cyttsp4_i2c.c:17:
 drivers/input/touchscreen/cyttsp4_core.h:236:27: warning: ‘cyttsp4_tch_abs_string’ defined but not used [-Wunused-const-variable=]
 236 | static const char * const cyttsp4_tch_abs_string[] = {
 | ^~~~~~~~~~~~~~~~~~~~~~
 In file included from drivers/input/touchscreen/cyttsp4_spi.c:17:
 drivers/input/touchscreen/cyttsp4_core.h:236:27: warning: ‘cyttsp4_tch_abs_string’ defined but not used [-Wunused-const-variable=]
 236 | static const char * const cyttsp4_tch_abs_string[] = {
 | ^~~~~~~~~~~~~~~~~~~~~~

Cc: Ferruh Yigit <fery@cypress.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "at www.cypress.com" <ttdrivers@cypress.com>
Cc: linux-input@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>

---
 drivers/input/touchscreen/cyttsp4_core.c | 14 ++++++++++++++
 drivers/input/touchscreen/cyttsp4_core.h | 14 --------------
 2 files changed, 14 insertions(+), 14 deletions(-)

-- 
2.25.1

Comments

Dmitry Torokhov Nov. 9, 2020, 6:36 a.m. UTC | #1
On Wed, Nov 04, 2020 at 04:24:22PM +0000, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):

> 

> In file included from drivers/input/touchscreen/cyttsp_i2c_common.c:24:

>  drivers/input/touchscreen/cyttsp4_core.h:236:27: warning: ‘cyttsp4_tch_abs_string’ defined but not used [-Wunused-const-variable=]

>  236 | static const char  const cyttsp4_tch_abs_string[] = {

>  | ^~~~~~~~~~~~~~~~~~~~~~

>  In file included from drivers/input/touchscreen/cyttsp4_i2c.c:17:

>  drivers/input/touchscreen/cyttsp4_core.h:236:27: warning: ‘cyttsp4_tch_abs_string’ defined but not used [-Wunused-const-variable=]

>  236 | static const char * const cyttsp4_tch_abs_string[] = {

>  | ^~~~~~~~~~~~~~~~~~~~~~

>  In file included from drivers/input/touchscreen/cyttsp4_spi.c:17:

>  drivers/input/touchscreen/cyttsp4_core.h:236:27: warning: ‘cyttsp4_tch_abs_string’ defined but not used [-Wunused-const-variable=]

>  236 | static const char * const cyttsp4_tch_abs_string[] = {

>  | ^~~~~~~~~~~~~~~~~~~~~~

> 

> Cc: Ferruh Yigit <fery@cypress.com>

> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>

> Cc: "at www.cypress.com" <ttdrivers@cypress.com>

> Cc: linux-input@vger.kernel.org

> Signed-off-by: Lee Jones <lee.jones@linaro.org>


Applied, thank you.

-- 
Dmitry
Lee Jones Nov. 9, 2020, 9:17 a.m. UTC | #2
On Sun, 08 Nov 2020, Dmitry Torokhov wrote:

> On Wed, Nov 04, 2020 at 04:24:22PM +0000, Lee Jones wrote:

> > Fixes the following W=1 kernel build warning(s):

> > 

> > In file included from drivers/input/touchscreen/cyttsp_i2c_common.c:24:

> >  drivers/input/touchscreen/cyttsp4_core.h:236:27: warning: ‘cyttsp4_tch_abs_string’ defined but not used [-Wunused-const-variable=]

> >  236 | static const char  const cyttsp4_tch_abs_string[] = {

> >  | ^~~~~~~~~~~~~~~~~~~~~~

> >  In file included from drivers/input/touchscreen/cyttsp4_i2c.c:17:

> >  drivers/input/touchscreen/cyttsp4_core.h:236:27: warning: ‘cyttsp4_tch_abs_string’ defined but not used [-Wunused-const-variable=]

> >  236 | static const char * const cyttsp4_tch_abs_string[] = {

> >  | ^~~~~~~~~~~~~~~~~~~~~~

> >  In file included from drivers/input/touchscreen/cyttsp4_spi.c:17:

> >  drivers/input/touchscreen/cyttsp4_core.h:236:27: warning: ‘cyttsp4_tch_abs_string’ defined but not used [-Wunused-const-variable=]

> >  236 | static const char * const cyttsp4_tch_abs_string[] = {

> >  | ^~~~~~~~~~~~~~~~~~~~~~

> > 

> > Cc: Ferruh Yigit <fery@cypress.com>

> > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>

> > Cc: "at www.cypress.com" <ttdrivers@cypress.com>

> > Cc: linux-input@vger.kernel.org

> > Signed-off-by: Lee Jones <lee.jones@linaro.org>

> 

> Applied, thank you.


Thanks for this Dmitry.

I'll rebase in a couple of days and fix the stragglers.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
diff mbox series

Patch

diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c
index 02a73d9a4defe..dccbcb942fe59 100644
--- a/drivers/input/touchscreen/cyttsp4_core.c
+++ b/drivers/input/touchscreen/cyttsp4_core.c
@@ -30,6 +30,20 @@ 
 
 #define CY_CORE_STARTUP_RETRY_COUNT		3
 
+static const char * const cyttsp4_tch_abs_string[] = {
+	[CY_TCH_X]	= "X",
+	[CY_TCH_Y]	= "Y",
+	[CY_TCH_P]	= "P",
+	[CY_TCH_T]	= "T",
+	[CY_TCH_E]	= "E",
+	[CY_TCH_O]	= "O",
+	[CY_TCH_W]	= "W",
+	[CY_TCH_MAJ]	= "MAJ",
+	[CY_TCH_MIN]	= "MIN",
+	[CY_TCH_OR]	= "OR",
+	[CY_TCH_NUM_ABS] = "INVALID"
+};
+
 static const u8 ldr_exit[] = {
 	0xFF, 0x01, 0x3B, 0x00, 0x00, 0x4F, 0x6D, 0x17
 };
diff --git a/drivers/input/touchscreen/cyttsp4_core.h b/drivers/input/touchscreen/cyttsp4_core.h
index f3e4443594404..6262f6e450751 100644
--- a/drivers/input/touchscreen/cyttsp4_core.h
+++ b/drivers/input/touchscreen/cyttsp4_core.h
@@ -233,20 +233,6 @@  enum cyttsp4_tch_abs {	/* for ordering within the extracted touch data array */
 	CY_TCH_NUM_ABS
 };
 
-static const char * const cyttsp4_tch_abs_string[] = {
-	[CY_TCH_X]	= "X",
-	[CY_TCH_Y]	= "Y",
-	[CY_TCH_P]	= "P",
-	[CY_TCH_T]	= "T",
-	[CY_TCH_E]	= "E",
-	[CY_TCH_O]	= "O",
-	[CY_TCH_W]	= "W",
-	[CY_TCH_MAJ]	= "MAJ",
-	[CY_TCH_MIN]	= "MIN",
-	[CY_TCH_OR]	= "OR",
-	[CY_TCH_NUM_ABS] = "INVALID"
-};
-
 struct cyttsp4_touch {
 	int abs[CY_TCH_NUM_ABS];
 };