Skip to contentSkip to conversation

ARM: imx/eukrea_mbimx27: fix compile warnings about unused variables

PATCH New Uwe Kleine-König 2 participants 5 messages Feb 8, 2011 – Feb 10, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: imx/eukrea_mbimx27: fix compile warnings about unused variables

---
 arch/arm/mach-imx/eukrea_mbimx27-baseboard.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +3 -2
index 275c858..9ac5348 100644
@@ -249,7 +249,7 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
 
 #define ADS7846_PENDOWN (GPIO_PORTD | 25)
 
-static void ads7846_dev_init(void)
+static void __maybe_unused ads7846_dev_init(void)
 {
 	if (gpio_request(ADS7846_PENDOWN, "ADS7846 pendown") < 0) {
 		printk(KERN_ERR "can't get ads746 pen down GPIO\n");
@@ -268,7 +268,8 @@ static struct ads7846_platform_data ads7846_config __initdata = {
 	.keep_vref_on		= 1,
 };
 
-static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = {
+static struct spi_board_info __maybe_unused
+eukrea_mbimx27_spi_board_info[] __initdata = {
 	[0] = {
 		.modalias	= "ads7846",
 		.bus_num	= 0,
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH 1/1 ARM: imx/eukrea_mbimx27: fix compile warnings about unused variables

Hello.

Quoted 1 line · Uwe Kleine-K?nig

[...]

Quoted 4 lines
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +0 -0
index 275c858..9ac5348 100644

[...]

arch/arm/mach-imx/eukrea_mbimx27-baseboard.c static struct ads7846_platform_data ads7846_config __initdata = { · line 272

Quoted 7 lines
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +2 -1
@@ -268,7 +268,8 @@ static struct ads7846_platform_data ads7846_config __initdata = {
  	.keep_vref_on		= 1,
  };
 
-static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = {
+static struct spi_board_info __maybe_unused
+eukrea_mbimx27_spi_board_info[] __initdata = {

I think the second line should be somewhat indented.

WBR, Sergei

#2 lore raw

PATCH 1/1 ARM: imx/eukrea_mbimx27: fix compile warnings about unused variables

Quoted 16 lines · Sergei Shtylyov

Hello.

Quoted 1 line · Uwe Kleine-K?nig

[...]

Quoted 4 lines
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +0 -0
index 275c858..9ac5348 100644

[...]

Quoted 4 lines
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +0 -0
@@ -268,7 +268,8 @@ static struct ads7846_platform_data ads7846_config __initdata = {
 	.keep_vref_on		= 1,
 };
 
Quoted 5 lines

arch/arm/mach-imx/eukrea_mbimx27-baseboard.c static struct ads7846_platform_data ads7846_config __initdata = { · line 272

Quoted 3 lines
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +2 -1
-static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = {
+static struct spi_board_info __maybe_unused
+eukrea_mbimx27_spi_board_info[] __initdata = {

I think the second line should be somewhat indented.

I like it as it is. There are no rules for that, no?

Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#3 lore raw

PATCH 1/1 ARM: imx/eukrea_mbimx27: fix compile warnings about unused variables

Hello.

Quoted 12 lines · Uwe Kleine-K?nig
Quoted 12 lines
Quoted 1 line

[...]

Quoted 4 lines
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +0 -0
index 275c858..9ac5348 100644

[...]

Quoted 4 lines
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +0 -0
@@ -268,7 +268,8 @@ static struct ads7846_platform_data ads7846_config __initdata = {
 	.keep_vref_on		= 1,
 };
 
Quoted 7 lines
Quoted 5 lines

arch/arm/mach-imx/eukrea_mbimx27-baseboard.c static struct ads7846_platform_data ads7846_config __initdata = { · line 272

Quoted 3 lines
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +2 -1
-static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = {
+static struct spi_board_info __maybe_unused
+eukrea_mbimx27_spi_board_info[] __initdata = {

I think the second line should be somewhat indented.

I like it as it is. There are no rules for that, no?

Documentation/CodingStyle, chapter 2.

Quoted 1 line

Uwe

WBR, Sergei

#4 lore raw

PATCH 1/1 ARM: imx/eukrea_mbimx27: fix compile warnings about unused variables

---
Hello,

Quoted 9 lines · Sergei Shtylyov
Quoted 7 lines
Quoted 5 lines

Review

Quoted 3 lines
(quoted diff) +2 -1
-static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = {
+static struct spi_board_info __maybe_unused
+eukrea_mbimx27_spi_board_info[] __initdata = {

I think the second line should be somewhat indented.

I like it as it is. There are no rules for that, no?

Documentation/CodingStyle, chapter 2.

hmm, this is how vim indents and checkpatch doesn't diagnose a style problem. Though I prefer it unindented, too, I don't care enough. So here's a patch with the 2nd line having 2 tabs. Up to Sascha which to include ...

Best regards and thanks,
Uwe

 arch/arm/mach-imx/eukrea_mbimx27-baseboard.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +3 -2
index 275c858..d12815d 100644
@@ -249,7 +249,7 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
 
 #define ADS7846_PENDOWN (GPIO_PORTD | 25)
 
-static void ads7846_dev_init(void)
+static void __maybe_unused ads7846_dev_init(void)
 {
 	if (gpio_request(ADS7846_PENDOWN, "ADS7846 pendown") < 0) {
 		printk(KERN_ERR "can't get ads746 pen down GPIO\n");
@@ -268,7 +268,8 @@ static struct ads7846_platform_data ads7846_config __initdata = {
 	.keep_vref_on		= 1,
 };
 
-static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = {
+static struct spi_board_info __maybe_unused
+		eukrea_mbimx27_spi_board_info[] __initdata = {
 	[0] = {
 		.modalias	= "ads7846",
 		.bus_num	= 0,
Signature · 1 line
1.7.2.3