public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: Lee Jones <lee.jones@linaro.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	broonie@kernel.org, rf@opensource.wolfsonmicro.com
Subject: Re: [GIT PULL] MFD for v4.13
Date: Mon, 24 Jul 2017 21:20:04 +0200	[thread overview]
Message-ID: <20170724192004.GD32425@amd> (raw)
In-Reply-To: <20170717085650.gcauhi5tfqemtvme@localhost.localdomain>

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

Hi!

> > > >  include/linux/mfd/madera/registers.h               | 8832 ++++++++++++++++++++
> > > 
> > > So I've pulled everything but this, because honestly, that file looks
> > > like utter garbage.
> > > 
> > > Why are there all those _hundreds_ of odd defines for
> > > 
> > >   MADERA_WSEQ_SEQUENCE_xx
> > > 
> > > when it looks like you could just do one single one:
> > > 
> > >   // The sequence is one-based because somebody doesn't
> > >   // know that indices start at 0. Thus the "-2".
> > >   #define MADERA_WSEQ_SEQUENCE(x) (0x3000 + (x)*2 - 2)
...
> > >  (a) probably closer to 200x too many lines
> > >  (b) less flexible than doing it right
> > > 
> > > Honestly, tell me why would I want to merge something monstrous like that?
> > 
> > I'm inclined to agree and had my reservations.  However based on
> > a previous conversation [0], I was convinced that it's actually the
> > right thing to do. 
> > 
> > https://lkml.org/lkml/2017/4/7/229
...
> We really quite like to keep all the registers defined because it
> makes the source highly greppable, which is extremely useful. A
> type of question which is often asked is "what does the driver
> do with register bits XYZ" or "where does it use register
> bits XYZ". Eliminating definitions into generator macros or
> block-indexing code makes these questions more difficult to
> answer. Another convenience is that it makes it easier for people
> to translate raw hardware configurations (which are a list
> of register values) into ALSA and pdata settings if they can

Well, easy grep is a nice thing, but not worth the cost of 8000 lines
vs. 40 lines. I'm sure you can write the required regexps in less than
7960 lines.

									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:[~2017-07-24 19:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07  9:50 [GIT PULL] MFD for v4.13 Lee Jones
2017-07-07 20:36 ` Linus Torvalds
2017-07-07 22:50   ` Lee Jones
2017-07-17  8:56     ` Charles Keepax
2017-07-24 19:20       ` Pavel Machek [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=20170724192004.GD32425@amd \
    --to=pavel@ucw.cz \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rf@opensource.wolfsonmicro.com \
    --cc=torvalds@linux-foundation.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