From: Joe Perches <joe@perches.com>
To: Ronnie.Kunin@microchip.com, Woojung.Huh@microchip.com,
netdev@vger.kernel.org, linux-usb@vger.kernel.org
Cc: f.fainelli@gmail.com, UNGLinuxDriver@microchip.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] lan78xx: Remove trailing underscores from macros
Date: Tue, 06 Sep 2016 19:13:14 -0700 [thread overview]
Message-ID: <1473214394.29864.4.camel@perches.com> (raw)
In-Reply-To: <CB1A8EE47AAD7B4897132E685E5108C551F87491@CHN-SV-EXMX02.mchp-main.com>
On Wed, 2016-09-07 at 02:00 +0000, Ronnie.Kunin@microchip.com wrote:
> Microchip's internal convention is for register (offset) definitions
> to be capitalized (i.e.: MY_REGISTER). Our convention for bits
> (position) definitions within a register is to carry as a prefix the
> name of the register and suffix it with the bit name and adding a
> trailing underscore (i.e. MY_REGISTER_MY_BIT_). The trailing
> underscore is what easily lets us distinguish a bit from a register
> definition when reading code. We have been using this convention for
> many years and has worked very well for us across all projects (by now
> hundreds).
I think it's kind of an ugly convention, but <shrug> no
skin off my nose really.
> > Is there anything other than a one-time cost
> > to apply these? Is the same code used for
> > other platforms?
>
> Yes, a single header file with the definition of registers and bits is
> shared (either as a standalone file or with its contents pasted into a
> native environment "carrier" header file) across all drivers (and
> other non driver software projects as well) for the same device. So a
> change like this indeed has a high cost for Microchip and we'd rather
> not do this unless it is an absolutely mandated requirement.
No worries, if you don't like it, don't apply it.
Send a NAK too so David Miller doesn't apply it either.
prev parent reply other threads:[~2016-09-07 2:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 23:04 [PATCH 0/2] lan78xx: Remove trailing underscores from macros Joe Perches
2016-09-06 23:04 ` [PATCH 1/2] lan78xx: Remove locally defined trailing underscores from defines and uses Joe Perches
2016-09-06 23:04 ` [PATCH 2/2] microchipphy.h and uses: Remove " Joe Perches
[not found] ` <cover.1473202982.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2016-09-06 23:19 ` [PATCH 0/2] lan78xx: Remove trailing underscores from macros Woojung.Huh-UWL1GkI3JZL3oGB3hsPCZA
2016-09-07 1:18 ` Joe Perches
2016-09-07 2:00 ` Ronnie.Kunin
2016-09-07 2:13 ` Joe Perches [this message]
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=1473214394.29864.4.camel@perches.com \
--to=joe@perches.com \
--cc=Ronnie.Kunin@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=Woojung.Huh@microchip.com \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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).