Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1695029

Re: [GIT PULL] MFD for v4.13

From Pavel Machek <pavel@ucw.cz>
Newsgroups linux.kernel
Subject Re: [GIT PULL] MFD for v4.13
Date 2017-07-24 21:30 +0200
Message-ID <u6Rdg-OM-9@gated-at.bofh.it> (permalink)
References <u0ydk-2cj-7@gated-at.bofh.it> <u0IcG-Hi-9@gated-at.bofh.it> <u0Ko9-2b0-11@gated-at.bofh.it> <u4a2L-2Ji-47@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [GIT PULL] MFD for v4.13 Pavel Machek <pavel@ucw.cz> - 2017-07-24 21:30 +0200

csiph-web