linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	linux-block@vger.kernel.org, linux-leds@vger.kernel.org,
	linux-scsi@vger.kernel.org,
	Frank Steiner <fsteiner-mail1@bio.ifi.lmu.de>,
	Dan Murphy <dmurphy@ti.com>, Jens Axboe <axboe@kernel.dk>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH 1/3] block: umem: rename LED_* macros to LEDCTRL_*
Date: Mon, 29 Jul 2019 21:13:38 +0200	[thread overview]
Message-ID: <20190729191338.GA2023@amd> (raw)
In-Reply-To: <CAC5umyggeHZJrW7BR7o+GgnQiW5zaSP+cqMeW_CgWwqLVOjNZQ@mail.gmail.com>

[-- 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 --]

  reply	other threads:[~2019-07-29 19:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190729191338.GA2023@amd \
    --to=pavel@ucw.cz \
    --cc=akinobu.mita@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=dmurphy@ti.com \
    --cc=fsteiner-mail1@bio.ifi.lmu.de \
    --cc=jacek.anaszewski@gmail.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).