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


Groups > linux.kernel > #1683455

Re: [GIT PULL] MFD for v4.13

From Lee Jones <lee.jones@linaro.org>
Newsgroups linux.kernel
Subject Re: [GIT PULL] MFD for v4.13
Date 2017-07-08 01:00 +0200
Message-ID <u0Ko9-2b0-11@gated-at.bofh.it> (permalink)
References <u0ydk-2cj-7@gated-at.bofh.it> <u0IcG-Hi-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 07 Jul 2017, Linus Torvalds wrote:

> On Fri, Jul 7, 2017 at 2:50 AM, Lee Jones <lee.jones@linaro.org> wrote:
> >
> >  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)
> 
> and similar things go for for pretty much EVERY SINGLE LINE in that
> 8-thousand line piece of nasty horrible crud.
> 
> Being auto-generated doesn't really make this kind of thing any
> better. In fact, it makes it worse, because those stupid hardcoded
> names are often *harder* to use, because you cannot use a variable to
> index into things (which you may often want).
> 
> So we have eight thousand lines of garbage that is
> 
>  (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

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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


Thread

[GIT PULL] MFD for v4.13 Lee Jones <lee.jones@linaro.org> - 2017-07-07 12:00 +0200
  Re: [GIT PULL] MFD for v4.13 Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-07 22:40 +0200
    Re: [GIT PULL] MFD for v4.13 Lee Jones <lee.jones@linaro.org> - 2017-07-08 01:00 +0200
      Re: [GIT PULL] MFD for v4.13 Charles Keepax <ckeepax@opensource.cirrus.com> - 2017-07-17 11:00 +0200

csiph-web