linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] rename LED_OFF and LED_ON to avoid name collision with leds subsystem
@ 2019-07-28 14:00 Akinobu Mita
  2019-07-28 14:00 ` [PATCH 1/3] block: umem: rename LED_* macros to LEDCTRL_* Akinobu Mita
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Akinobu Mita @ 2019-07-28 14:00 UTC (permalink / raw)
  To: linux-block, linux-leds, linux-scsi
  Cc: Akinobu Mita, Frank Steiner, Jacek Anaszewski, Pavel Machek,
	Dan Murphy, Jens Axboe, James E.J. Bottomley, Martin K. Petersen,
	GOTO Masanori, YOKOTA Hiroshi

These are preparatory changes for LED block device activity trigger.

Some drivers internally defines LED_OFF and LED_ON, but they conflict with
the LED subsystem's LED_OFF and LED_ON enums.
This renames these driver's LED_* definisions to avoid the name collision.

Akinobu Mita (3):
  block: umem: rename LED_* macros to LEDCTRL_*
  scsi: mvsas: rename LED_* enums to SGPIO_LED_*
  scsi: nsp32: rename LED_* macros to EXT_PORT_LED_*

 drivers/block/umem.c         | 20 ++++++++++----------
 drivers/block/umem.h         | 20 ++++++++++----------
 drivers/scsi/mvsas/mv_94xx.c |  2 +-
 drivers/scsi/mvsas/mv_94xx.h | 24 ++++++++++++------------
 drivers/scsi/nsp32.c         |  6 +++---
 drivers/scsi/nsp32.h         |  4 ++--
 6 files changed, 38 insertions(+), 38 deletions(-)

Cc: Frank Steiner <fsteiner-mail1@bio.ifi.lmu.de>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: GOTO Masanori <gotom@debian.or.jp>
Cc: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
-- 
2.7.4


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

* [PATCH 1/3] block: umem: rename LED_* macros to LEDCTRL_*
  2019-07-28 14:00 [PATCH 0/3] rename LED_OFF and LED_ON to avoid name collision with leds subsystem Akinobu Mita
@ 2019-07-28 14:00 ` Akinobu Mita
  2019-07-28 17:30   ` Jacek Anaszewski
  2019-07-29  9:43   ` Hannes Reinecke
  2019-07-28 14:00 ` [PATCH 2/3] scsi: mvsas: rename LED_* enums to SGPIO_LED_* Akinobu Mita
  2019-07-28 14:00 ` [PATCH 3/3] scsi: nsp32: rename LED_* macros to EXT_PORT_LED_* Akinobu Mita
  2 siblings, 2 replies; 13+ messages in thread
From: Akinobu Mita @ 2019-07-28 14:00 UTC (permalink / raw)
  To: linux-block, linux-leds, linux-scsi
  Cc: Akinobu Mita, Frank Steiner, Jacek Anaszewski, Pavel Machek,
	Dan Murphy, Jens Axboe, James E.J. Bottomley, Martin K. Petersen

The umem driver defines LED_* macros for MEMCTRLCMD_LEDCTRL register
values.  The LED_OFF and LED_ON macros conflict with the LED subsystem's
LED_OFF and LED_ON enums.

This renames these LED_* macros to LEDCTRL_* in umem driver.

Cc: Frank Steiner <fsteiner-mail1@bio.ifi.lmu.de>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
 drivers/block/umem.c | 20 ++++++++++----------
 drivers/block/umem.h | 20 ++++++++++----------
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/block/umem.c b/drivers/block/umem.c
index 1f3f9e0..ea63c14 100644
--- a/drivers/block/umem.c
+++ b/drivers/block/umem.c
@@ -167,14 +167,14 @@ static int set_userbit(struct cardinfo *card, int bit, unsigned char state)
 }
 
 /*
- * NOTE: For the power LED, use the LED_POWER_* macros since they differ
+ * NOTE: For the power LED, use the LEDCTRL_POWER_* macros since they differ
  */
 static void set_led(struct cardinfo *card, int shift, unsigned char state)
 {
 	unsigned char led;
 
 	led = readb(card->csr_remap + MEMCTRLCMD_LEDCTRL);
-	if (state == LED_FLIP)
+	if (state == LEDCTRL_FLIP)
 		led ^= (1<<shift);
 	else {
 		led &= ~(0x03 << shift);
@@ -268,7 +268,7 @@ static void mm_start_io(struct cardinfo *card)
 
 
 	if (debug & DEBUG_LED_ON_TRANSFER)
-		set_led(card, LED_REMOVE, LED_ON);
+		set_led(card, LEDCTRL_REMOVE, LEDCTRL_ON);
 
 	desc = &page->desc[page->headcnt];
 	writel(0, card->csr_remap + DMA_PCI_ADDR);
@@ -477,7 +477,7 @@ static void process_page(unsigned long data)
 	}
 
 	if (debug & DEBUG_LED_ON_TRANSFER)
-		set_led(card, LED_REMOVE, LED_OFF);
+		set_led(card, LEDCTRL_REMOVE, LEDCTRL_OFF);
 
 	if (card->check_batteries) {
 		card->check_batteries = 0;
@@ -652,13 +652,13 @@ HW_TRACE(0x36);
 static void set_fault_to_battery_status(struct cardinfo *card)
 {
 	if (card->battery[0].good && card->battery[1].good)
-		set_led(card, LED_FAULT, LED_OFF);
+		set_led(card, LEDCTRL_FAULT, LEDCTRL_OFF);
 	else if (card->battery[0].warned || card->battery[1].warned)
-		set_led(card, LED_FAULT, LED_ON);
+		set_led(card, LEDCTRL_FAULT, LEDCTRL_ON);
 	else if (!card->battery[0].good && !card->battery[1].good)
-		set_led(card, LED_FAULT, LED_FLASH_7_0);
+		set_led(card, LEDCTRL_FAULT, LEDCTRL_FLASH_7_0);
 	else
-		set_led(card, LED_FAULT, LED_FLASH_3_5);
+		set_led(card, LEDCTRL_FAULT, LEDCTRL_FLASH_3_5);
 }
 
 static void init_battery_timer(void);
@@ -919,8 +919,8 @@ static int mm_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	}
 
 	/* Clear the LED's we control */
-	set_led(card, LED_REMOVE, LED_OFF);
-	set_led(card, LED_FAULT, LED_OFF);
+	set_led(card, LEDCTRL_REMOVE, LEDCTRL_OFF);
+	set_led(card, LEDCTRL_FAULT, LEDCTRL_OFF);
 
 	batt_status = readb(card->csr_remap + MEMCTRLSTATUS_BATTERY);
 
diff --git a/drivers/block/umem.h b/drivers/block/umem.h
index 5838497..8563fdc 100644
--- a/drivers/block/umem.h
+++ b/drivers/block/umem.h
@@ -32,16 +32,16 @@
 #define  MEM_2_GB		0xe0
 
 #define MEMCTRLCMD_LEDCTRL	0x08
-#define  LED_REMOVE		2
-#define  LED_FAULT		4
-#define  LED_POWER		6
-#define	 LED_FLIP		255
-#define  LED_OFF		0x00
-#define  LED_ON			0x01
-#define  LED_FLASH_3_5		0x02
-#define  LED_FLASH_7_0		0x03
-#define  LED_POWER_ON		0x00
-#define  LED_POWER_OFF		0x01
+#define  LEDCTRL_REMOVE		2
+#define  LEDCTRL_FAULT		4
+#define  LEDCTRL_POWER		6
+#define	 LEDCTRL_FLIP		255
+#define  LEDCTRL_OFF		0x00
+#define  LEDCTRL_ON		0x01
+#define  LEDCTRL_FLASH_3_5	0x02
+#define  LEDCTRL_FLASH_7_0	0x03
+#define  LEDCTRL_POWER_ON	0x00
+#define  LEDCTRL_POWER_OFF	0x01
 #define  USER_BIT1		0x01
 #define  USER_BIT2		0x02
 
-- 
2.7.4


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

* [PATCH 2/3] scsi: mvsas: rename LED_* enums to SGPIO_LED_*
  2019-07-28 14:00 [PATCH 0/3] rename LED_OFF and LED_ON to avoid name collision with leds subsystem Akinobu Mita
  2019-07-28 14:00 ` [PATCH 1/3] block: umem: rename LED_* macros to LEDCTRL_* Akinobu Mita
@ 2019-07-28 14:00 ` Akinobu Mita
  2019-07-29  9:43   ` Hannes Reinecke
  2019-07-29 11:27   ` Pavel Machek
  2019-07-28 14:00 ` [PATCH 3/3] scsi: nsp32: rename LED_* macros to EXT_PORT_LED_* Akinobu Mita
  2 siblings, 2 replies; 13+ messages in thread
From: Akinobu Mita @ 2019-07-28 14:00 UTC (permalink / raw)
  To: linux-block, linux-leds, linux-scsi
  Cc: Akinobu Mita, Frank Steiner, Jacek Anaszewski, Pavel Machek,
	Dan Murphy, Jens Axboe, James E.J. Bottomley, Martin K. Petersen

The mvsas driver declares LED_* enums for enum sgpio_led_status. The
LED_OFF and LED_ON enums cause redeclaration of enumerator with the
LED subsystem's LED_OFF and LED_ON enums.

This adds 'SGPIO_' prefix to these enums in mvsas driver.

Cc: Frank Steiner <fsteiner-mail1@bio.ifi.lmu.de>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
 drivers/scsi/mvsas/mv_94xx.c |  2 +-
 drivers/scsi/mvsas/mv_94xx.h | 24 ++++++++++++------------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_94xx.c b/drivers/scsi/mvsas/mv_94xx.c
index fc0b8eb..3558a625 100644
--- a/drivers/scsi/mvsas/mv_94xx.c
+++ b/drivers/scsi/mvsas/mv_94xx.c
@@ -1085,7 +1085,7 @@ static int mvs_94xx_gpio_write(struct mvs_prv_info *mvs_prv,
 				block &= ~((0x7 << MVS_SGPIO_DCTRL_ACT_SHIFT)
 					<< driveshift);
 					/* hardwire activity bit to SOF */
-				block |= LED_BLINKA_SOF << (
+				block |= SGPIO_LED_BLINKA_SOF << (
 					MVS_SGPIO_DCTRL_ACT_SHIFT +
 					driveshift);
 				break;
diff --git a/drivers/scsi/mvsas/mv_94xx.h b/drivers/scsi/mvsas/mv_94xx.h
index a243182..2c96ff1 100644
--- a/drivers/scsi/mvsas/mv_94xx.h
+++ b/drivers/scsi/mvsas/mv_94xx.h
@@ -275,23 +275,23 @@ enum sgpio_registers {
 };
 
 enum sgpio_led_status {
-	LED_OFF	= 0,
-	LED_ON	= 1,
-	LED_BLINKA	= 2,
-	LED_BLINKA_INV	= 3,
-	LED_BLINKA_SOF	= 4,
-	LED_BLINKA_EOF	= 5,
-	LED_BLINKB	= 6,
-	LED_BLINKB_INV	= 7,
+	SGPIO_LED_OFF		= 0,
+	SGPIO_LED_ON		= 1,
+	SGPIO_LED_BLINKA	= 2,
+	SGPIO_LED_BLINKA_INV	= 3,
+	SGPIO_LED_BLINKA_SOF	= 4,
+	SGPIO_LED_BLINKA_EOF	= 5,
+	SGPIO_LED_BLINKB	= 6,
+	SGPIO_LED_BLINKB_INV	= 7,
 };
 
-#define DEFAULT_SGPIO_BITS ((LED_BLINKA_SOF << \
+#define DEFAULT_SGPIO_BITS ((SGPIO_LED_BLINKA_SOF << \
 				MVS_SGPIO_DCTRL_ACT_SHIFT) << (8 * 3) | \
-			(LED_BLINKA_SOF << \
+			(SGPIO_LED_BLINKA_SOF << \
 				MVS_SGPIO_DCTRL_ACT_SHIFT) << (8 * 2) | \
-			(LED_BLINKA_SOF << \
+			(SGPIO_LED_BLINKA_SOF << \
 				MVS_SGPIO_DCTRL_ACT_SHIFT) << (8 * 1) | \
-			(LED_BLINKA_SOF << \
+			(SGPIO_LED_BLINKA_SOF << \
 				MVS_SGPIO_DCTRL_ACT_SHIFT) << (8 * 0))
 
 /*
-- 
2.7.4


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

* [PATCH 3/3] scsi: nsp32: rename LED_* macros to EXT_PORT_LED_*
  2019-07-28 14:00 [PATCH 0/3] rename LED_OFF and LED_ON to avoid name collision with leds subsystem Akinobu Mita
  2019-07-28 14:00 ` [PATCH 1/3] block: umem: rename LED_* macros to LEDCTRL_* Akinobu Mita
  2019-07-28 14:00 ` [PATCH 2/3] scsi: mvsas: rename LED_* enums to SGPIO_LED_* Akinobu Mita
@ 2019-07-28 14:00 ` Akinobu Mita
  2019-07-29  9:44   ` Hannes Reinecke
  2019-07-29 11:27   ` Pavel Machek
  2 siblings, 2 replies; 13+ messages in thread
From: Akinobu Mita @ 2019-07-28 14:00 UTC (permalink / raw)
  To: linux-block, linux-leds, linux-scsi
  Cc: Akinobu Mita, Frank Steiner, Jacek Anaszewski, Pavel Machek,
	Dan Murphy, Jens Axboe, James E.J. Bottomley, Martin K. Petersen,
	GOTO Masanori, YOKOTA Hiroshi

The nsp32 driver defines LED_ON and LED_OFF macros for EXT_PORT_DDR or
EXT_PORT register values.  The LED_OFF and LED_ON macros conflict with
the LED subsystem's LED_OFF and LED_ON enums.

This renames these LED_* macros to EXT_PORT_LED_* in nsp32 driver.

Cc: Frank Steiner <fsteiner-mail1@bio.ifi.lmu.de>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: GOTO Masanori <gotom@debian.or.jp>
Cc: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
 drivers/scsi/nsp32.c | 6 +++---
 drivers/scsi/nsp32.h | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index 70db792..330cf4c 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -763,7 +763,7 @@ static int nsp32_arbitration(struct scsi_cmnd *SCpnt, unsigned int base)
 	if (arbit & ARBIT_WIN) {
 		/* Arbitration succeeded */
 		SCpnt->result = DID_OK << 16;
-		nsp32_index_write1(base, EXT_PORT, LED_ON); /* PCI LED on */
+		nsp32_index_write1(base, EXT_PORT, EXT_PORT_LED_ON); /* PCI LED on */
 	} else if (arbit & ARBIT_FAIL) {
 		/* Arbitration failed */
 		SCpnt->result = DID_BUS_BUSY << 16;
@@ -1137,8 +1137,8 @@ static int nsp32hw_init(nsp32_hw_data *data)
 	nsp32_write2(base, IRQ_CONTROL, 0);
 
 	/* PCI LED off */
-	nsp32_index_write1(base, EXT_PORT_DDR, LED_OFF);
-	nsp32_index_write1(base, EXT_PORT,     LED_OFF);
+	nsp32_index_write1(base, EXT_PORT_DDR, EXT_PORT_LED_OFF);
+	nsp32_index_write1(base, EXT_PORT,     EXT_PORT_LED_OFF);
 
 	return TRUE;
 }
diff --git a/drivers/scsi/nsp32.h b/drivers/scsi/nsp32.h
index ab0726c..a7553ea 100644
--- a/drivers/scsi/nsp32.h
+++ b/drivers/scsi/nsp32.h
@@ -306,8 +306,8 @@ typedef u16 u16_le;
 
 #define EXT_PORT_DDR		0x02	/* BASE+08, IDX+02, B, R/W */
 #define EXT_PORT		0x03	/* BASE+08, IDX+03, B, R/W */
-# define LED_ON	 (0)
-# define LED_OFF BIT(0)
+# define EXT_PORT_LED_ON	(0)
+# define EXT_PORT_LED_OFF	BIT(0)
 
 #define IRQ_SELECT		0x04	/* BASE+08, IDX+04, W, R/W */
 # define IRQSELECT_RESELECT_IRQ      BIT(0)
-- 
2.7.4


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

* Re: [PATCH 1/3] block: umem: rename LED_* macros to LEDCTRL_*
  2019-07-28 14:00 ` [PATCH 1/3] block: umem: rename LED_* macros to LEDCTRL_* Akinobu Mita
@ 2019-07-28 17:30   ` Jacek Anaszewski
  2019-07-29 15:21     ` Akinobu Mita
  2019-07-29  9:43   ` Hannes Reinecke
  1 sibling, 1 reply; 13+ messages in thread
From: Jacek Anaszewski @ 2019-07-28 17:30 UTC (permalink / raw)
  To: Akinobu Mita, linux-block, linux-leds, linux-scsi
  Cc: Frank Steiner, Pavel Machek, Dan Murphy, Jens Axboe,
	James E.J. Bottomley, Martin K. Petersen

Hi Akinobu,

On 7/28/19 4:00 PM, Akinobu Mita wrote:
> The umem driver defines LED_* macros for MEMCTRLCMD_LEDCTRL register
> values.  The LED_OFF and LED_ON macros conflict with the LED subsystem's
> LED_OFF and LED_ON enums.
> 
> This renames these LED_* macros to LEDCTRL_* in umem driver.
[...]
>  
> diff --git a/drivers/block/umem.h b/drivers/block/umem.h
> index 5838497..8563fdc 100644
> --- a/drivers/block/umem.h
> +++ b/drivers/block/umem.h
> @@ -32,16 +32,16 @@
>  #define  MEM_2_GB		0xe0
>  
>  #define MEMCTRLCMD_LEDCTRL	0x08
> -#define  LED_REMOVE		2
> -#define  LED_FAULT		4
> -#define  LED_POWER		6
> -#define	 LED_FLIP		255
> -#define  LED_OFF		0x00
> -#define  LED_ON			0x01
> -#define  LED_FLASH_3_5		0x02
> -#define  LED_FLASH_7_0		0x03
> -#define  LED_POWER_ON		0x00
> -#define  LED_POWER_OFF		0x01
> +#define  LEDCTRL_REMOVE		2

This way the namespacing prefix still begins with "LED",
which can lead to further conflicts in the future.

> +#define  LEDCTRL_FAULT		4
> +#define  LEDCTRL_POWER		6
> +#define	 LEDCTRL_FLIP		255
> +#define  LEDCTRL_OFF		0x00
> +#define  LEDCTRL_ON		0x01
> +#define  LEDCTRL_FLASH_3_5	0x02
> +#define  LEDCTRL_FLASH_7_0	0x03
> +#define  LEDCTRL_POWER_ON	0x00
> +#define  LEDCTRL_POWER_OFF	0x01
>  #define  USER_BIT1		0x01
>  #define  USER_BIT2		0x02
>  
> 

-- 
Best regards,
Jacek Anaszewski

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

* Re: [PATCH 1/3] block: umem: rename LED_* macros to LEDCTRL_*
  2019-07-28 14:00 ` [PATCH 1/3] block: umem: rename LED_* macros to LEDCTRL_* Akinobu Mita
  2019-07-28 17:30   ` Jacek Anaszewski
@ 2019-07-29  9:43   ` Hannes Reinecke
  1 sibling, 0 replies; 13+ messages in thread
From: Hannes Reinecke @ 2019-07-29  9:43 UTC (permalink / raw)
  To: Akinobu Mita, linux-block, linux-leds, linux-scsi
  Cc: Frank Steiner, Jacek Anaszewski, Pavel Machek, Dan Murphy,
	Jens Axboe, James E.J. Bottomley, Martin K. Petersen

On 7/28/19 4:00 PM, Akinobu Mita wrote:
> The umem driver defines LED_* macros for MEMCTRLCMD_LEDCTRL register
> values.  The LED_OFF and LED_ON macros conflict with the LED subsystem's
> LED_OFF and LED_ON enums.
> 
> This renames these LED_* macros to LEDCTRL_* in umem driver.
> 
> Cc: Frank Steiner <fsteiner-mail1@bio.ifi.lmu.de>
> Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Dan Murphy <dmurphy@ti.com>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> ---
>  drivers/block/umem.c | 20 ++++++++++----------
>  drivers/block/umem.h | 20 ++++++++++----------
>  2 files changed, 20 insertions(+), 20 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 2/3] scsi: mvsas: rename LED_* enums to SGPIO_LED_*
  2019-07-28 14:00 ` [PATCH 2/3] scsi: mvsas: rename LED_* enums to SGPIO_LED_* Akinobu Mita
@ 2019-07-29  9:43   ` Hannes Reinecke
  2019-07-29 11:27   ` Pavel Machek
  1 sibling, 0 replies; 13+ messages in thread
From: Hannes Reinecke @ 2019-07-29  9:43 UTC (permalink / raw)
  To: Akinobu Mita, linux-block, linux-leds, linux-scsi
  Cc: Frank Steiner, Jacek Anaszewski, Pavel Machek, Dan Murphy,
	Jens Axboe, James E.J. Bottomley, Martin K. Petersen

On 7/28/19 4:00 PM, Akinobu Mita wrote:
> The mvsas driver declares LED_* enums for enum sgpio_led_status. The
> LED_OFF and LED_ON enums cause redeclaration of enumerator with the
> LED subsystem's LED_OFF and LED_ON enums.
> 
> This adds 'SGPIO_' prefix to these enums in mvsas driver.
> 
> Cc: Frank Steiner <fsteiner-mail1@bio.ifi.lmu.de>
> Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Dan Murphy <dmurphy@ti.com>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> ---
>  drivers/scsi/mvsas/mv_94xx.c |  2 +-
>  drivers/scsi/mvsas/mv_94xx.h | 24 ++++++++++++------------
>  2 files changed, 13 insertions(+), 13 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 3/3] scsi: nsp32: rename LED_* macros to EXT_PORT_LED_*
  2019-07-28 14:00 ` [PATCH 3/3] scsi: nsp32: rename LED_* macros to EXT_PORT_LED_* Akinobu Mita
@ 2019-07-29  9:44   ` Hannes Reinecke
  2019-07-29 11:27   ` Pavel Machek
  1 sibling, 0 replies; 13+ messages in thread
From: Hannes Reinecke @ 2019-07-29  9:44 UTC (permalink / raw)
  To: Akinobu Mita, linux-block, linux-leds, linux-scsi
  Cc: Frank Steiner, Jacek Anaszewski, Pavel Machek, Dan Murphy,
	Jens Axboe, James E.J. Bottomley, Martin K. Petersen,
	GOTO Masanori, YOKOTA Hiroshi

On 7/28/19 4:00 PM, Akinobu Mita wrote:
> The nsp32 driver defines LED_ON and LED_OFF macros for EXT_PORT_DDR or
> EXT_PORT register values.  The LED_OFF and LED_ON macros conflict with
> the LED subsystem's LED_OFF and LED_ON enums.
> 
> This renames these LED_* macros to EXT_PORT_LED_* in nsp32 driver.
> 
> Cc: Frank Steiner <fsteiner-mail1@bio.ifi.lmu.de>
> Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Dan Murphy <dmurphy@ti.com>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Cc: GOTO Masanori <gotom@debian.or.jp>
> Cc: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> ---
>  drivers/scsi/nsp32.c | 6 +++---
>  drivers/scsi/nsp32.h | 4 ++--
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 2/3] scsi: mvsas: rename LED_* enums to SGPIO_LED_*
  2019-07-28 14:00 ` [PATCH 2/3] scsi: mvsas: rename LED_* enums to SGPIO_LED_* Akinobu Mita
  2019-07-29  9:43   ` Hannes Reinecke
@ 2019-07-29 11:27   ` Pavel Machek
  1 sibling, 0 replies; 13+ messages in thread
From: Pavel Machek @ 2019-07-29 11:27 UTC (permalink / raw)
  To: Akinobu Mita
  Cc: linux-block, linux-leds, linux-scsi, Frank Steiner,
	Jacek Anaszewski, Dan Murphy, Jens Axboe, James E.J. Bottomley,
	Martin K. Petersen

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

On Sun 2019-07-28 23:00:45, Akinobu Mita wrote:
> The mvsas driver declares LED_* enums for enum sgpio_led_status. The
> LED_OFF and LED_ON enums cause redeclaration of enumerator with the
> LED subsystem's LED_OFF and LED_ON enums.
> 
> This adds 'SGPIO_' prefix to these enums in mvsas driver.
> 
> Cc: Frank Steiner <fsteiner-mail1@bio.ifi.lmu.de>
> Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>

Acked-by: Pavel Machek <pavel@ucw.cz>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [PATCH 3/3] scsi: nsp32: rename LED_* macros to EXT_PORT_LED_*
  2019-07-28 14:00 ` [PATCH 3/3] scsi: nsp32: rename LED_* macros to EXT_PORT_LED_* Akinobu Mita
  2019-07-29  9:44   ` Hannes Reinecke
@ 2019-07-29 11:27   ` Pavel Machek
  1 sibling, 0 replies; 13+ messages in thread
From: Pavel Machek @ 2019-07-29 11:27 UTC (permalink / raw)
  To: Akinobu Mita
  Cc: linux-block, linux-leds, linux-scsi, Frank Steiner,
	Jacek Anaszewski, Dan Murphy, Jens Axboe, James E.J. Bottomley,
	Martin K. Petersen, GOTO Masanori, YOKOTA Hiroshi

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

On Sun 2019-07-28 23:00:46, Akinobu Mita wrote:
> The nsp32 driver defines LED_ON and LED_OFF macros for EXT_PORT_DDR or
> EXT_PORT register values.  The LED_OFF and LED_ON macros conflict with
> the LED subsystem's LED_OFF and LED_ON enums.
> 
> This renames these LED_* macros to EXT_PORT_LED_* in nsp32 driver.
> 
> Cc: Frank Steiner <fsteiner-mail1@bio.ifi.lmu.de>
> Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>

Acked-by: Pavel Machek <pavel@ucw.cz>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [PATCH 1/3] block: umem: rename LED_* macros to LEDCTRL_*
  2019-07-28 17:30   ` Jacek Anaszewski
@ 2019-07-29 15:21     ` Akinobu Mita
  2019-07-29 19:13       ` Pavel Machek
  0 siblings, 1 reply; 13+ messages in thread
From: Akinobu Mita @ 2019-07-29 15:21 UTC (permalink / raw)
  To: Jacek Anaszewski
  Cc: linux-block, linux-leds, linux-scsi, Frank Steiner, Pavel Machek,
	Dan Murphy, Jens Axboe, James E.J. Bottomley, Martin K. Petersen

2019年7月29日(月) 2:30 Jacek Anaszewski <jacek.anaszewski@gmail.com>:
>
> Hi Akinobu,
>
> On 7/28/19 4:00 PM, Akinobu Mita wrote:
> > The umem driver defines LED_* macros for MEMCTRLCMD_LEDCTRL register
> > values.  The LED_OFF and LED_ON macros conflict with the LED subsystem's
> > LED_OFF and LED_ON enums.
> >
> > This renames these LED_* macros to LEDCTRL_* in umem driver.
> [...]
> >
> > diff --git a/drivers/block/umem.h b/drivers/block/umem.h
> > index 5838497..8563fdc 100644
> > --- a/drivers/block/umem.h
> > +++ b/drivers/block/umem.h
> > @@ -32,16 +32,16 @@
> >  #define  MEM_2_GB            0xe0
> >
> >  #define MEMCTRLCMD_LEDCTRL   0x08
> > -#define  LED_REMOVE          2
> > -#define  LED_FAULT           4
> > -#define  LED_POWER           6
> > -#define       LED_FLIP               255
> > -#define  LED_OFF             0x00
> > -#define  LED_ON                      0x01
> > -#define  LED_FLASH_3_5               0x02
> > -#define  LED_FLASH_7_0               0x03
> > -#define  LED_POWER_ON                0x00
> > -#define  LED_POWER_OFF               0x01
> > +#define  LEDCTRL_REMOVE              2
>
> This way the namespacing prefix still begins with "LED",
> which can lead to further conflicts in the future.

How about renaming 'LED_ON' to 'MEMCTRLCMD_LEDCTRL_ON', and 'LED_OFF' to
'MEMCTRLCMD_LEDCTRL_OFF' ?

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

* Re: [PATCH 1/3] block: umem: rename LED_* macros to LEDCTRL_*
  2019-07-29 15:21     ` Akinobu Mita
@ 2019-07-29 19:13       ` Pavel Machek
  2019-07-29 19:24         ` Jacek Anaszewski
  0 siblings, 1 reply; 13+ messages in thread
From: Pavel Machek @ 2019-07-29 19:13 UTC (permalink / raw)
  To: Akinobu Mita
  Cc: Jacek Anaszewski, linux-block, linux-leds, linux-scsi,
	Frank Steiner, Dan Murphy, Jens Axboe, James E.J. Bottomley,
	Martin K. Petersen

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

On Tue 2019-07-30 00:21:14, Akinobu Mita wrote:
> 2019年7月29日(月) 2:30 Jacek Anaszewski <jacek.anaszewski@gmail.com>:
> >
> > Hi Akinobu,
> >
> > On 7/28/19 4:00 PM, Akinobu Mita wrote:
> > > The umem driver defines LED_* macros for MEMCTRLCMD_LEDCTRL register
> > > values.  The LED_OFF and LED_ON macros conflict with the LED subsystem's
> > > LED_OFF and LED_ON enums.
> > >
> > > This renames these LED_* macros to LEDCTRL_* in umem driver.
> > [...]
> > >
> > > diff --git a/drivers/block/umem.h b/drivers/block/umem.h
> > > index 5838497..8563fdc 100644
> > > --- a/drivers/block/umem.h
> > > +++ b/drivers/block/umem.h
> > > @@ -32,16 +32,16 @@
> > >  #define  MEM_2_GB            0xe0
> > >
> > >  #define MEMCTRLCMD_LEDCTRL   0x08
> > > -#define  LED_REMOVE          2
> > > -#define  LED_FAULT           4
> > > -#define  LED_POWER           6
> > > -#define       LED_FLIP               255
> > > -#define  LED_OFF             0x00
> > > -#define  LED_ON                      0x01
> > > -#define  LED_FLASH_3_5               0x02
> > > -#define  LED_FLASH_7_0               0x03
> > > -#define  LED_POWER_ON                0x00
> > > -#define  LED_POWER_OFF               0x01
> > > +#define  LEDCTRL_REMOVE              2
> >
> > This way the namespacing prefix still begins with "LED",
> > which can lead to further conflicts in the future.
> 
> How about renaming 'LED_ON' to 'MEMCTRLCMD_LEDCTRL_ON', and 'LED_OFF' to
> 'MEMCTRLCMD_LEDCTRL_OFF' ?

I'd say that "MEMCTRL_LED_ON" woudl e enough, but... :-).
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [PATCH 1/3] block: umem: rename LED_* macros to LEDCTRL_*
  2019-07-29 19:13       ` Pavel Machek
@ 2019-07-29 19:24         ` Jacek Anaszewski
  0 siblings, 0 replies; 13+ messages in thread
From: Jacek Anaszewski @ 2019-07-29 19:24 UTC (permalink / raw)
  To: Pavel Machek, Akinobu Mita
  Cc: linux-block, linux-leds, linux-scsi, Frank Steiner, Dan Murphy,
	Jens Axboe, James E.J. Bottomley, Martin K. Petersen

On 7/29/19 9:13 PM, Pavel Machek wrote:
> On Tue 2019-07-30 00:21:14, Akinobu Mita wrote:
>> 2019年7月29日(月) 2:30 Jacek Anaszewski <jacek.anaszewski@gmail.com>:
>>>
>>> Hi Akinobu,
>>>
>>> On 7/28/19 4:00 PM, Akinobu Mita wrote:
>>>> The umem driver defines LED_* macros for MEMCTRLCMD_LEDCTRL register
>>>> values.  The LED_OFF and LED_ON macros conflict with the LED subsystem's
>>>> LED_OFF and LED_ON enums.
>>>>
>>>> This renames these LED_* macros to LEDCTRL_* in umem driver.
>>> [...]
>>>>
>>>> diff --git a/drivers/block/umem.h b/drivers/block/umem.h
>>>> index 5838497..8563fdc 100644
>>>> --- a/drivers/block/umem.h
>>>> +++ b/drivers/block/umem.h
>>>> @@ -32,16 +32,16 @@
>>>>  #define  MEM_2_GB            0xe0
>>>>
>>>>  #define MEMCTRLCMD_LEDCTRL   0x08
>>>> -#define  LED_REMOVE          2
>>>> -#define  LED_FAULT           4
>>>> -#define  LED_POWER           6
>>>> -#define       LED_FLIP               255
>>>> -#define  LED_OFF             0x00
>>>> -#define  LED_ON                      0x01
>>>> -#define  LED_FLASH_3_5               0x02
>>>> -#define  LED_FLASH_7_0               0x03
>>>> -#define  LED_POWER_ON                0x00
>>>> -#define  LED_POWER_OFF               0x01
>>>> +#define  LEDCTRL_REMOVE              2
>>>
>>> This way the namespacing prefix still begins with "LED",
>>> which can lead to further conflicts in the future.
>>
>> How about renaming 'LED_ON' to 'MEMCTRLCMD_LEDCTRL_ON', and 'LED_OFF' to
>> 'MEMCTRLCMD_LEDCTRL_OFF' ?
> 
> I'd say that "MEMCTRL_LED_ON" woudl e enough, but... :-).

I agree, it looks neater.

-- 
Best regards,
Jacek Anaszewski

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

end of thread, other threads:[~2019-07-29 20:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-28 14:00 [PATCH 0/3] rename LED_OFF and LED_ON to avoid name collision with leds subsystem Akinobu Mita
2019-07-28 14:00 ` [PATCH 1/3] block: umem: rename LED_* macros to LEDCTRL_* Akinobu Mita
2019-07-28 17:30   ` Jacek Anaszewski
2019-07-29 15:21     ` Akinobu Mita
2019-07-29 19:13       ` Pavel Machek
2019-07-29 19:24         ` Jacek Anaszewski
2019-07-29  9:43   ` Hannes Reinecke
2019-07-28 14:00 ` [PATCH 2/3] scsi: mvsas: rename LED_* enums to SGPIO_LED_* Akinobu Mita
2019-07-29  9:43   ` Hannes Reinecke
2019-07-29 11:27   ` Pavel Machek
2019-07-28 14:00 ` [PATCH 3/3] scsi: nsp32: rename LED_* macros to EXT_PORT_LED_* Akinobu Mita
2019-07-29  9:44   ` Hannes Reinecke
2019-07-29 11:27   ` Pavel Machek

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