Re: [PATCH 1/3] block: umem: rename LED_* macros to LEDCTRL_*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux