lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 5 Jun 2018 09:31:40 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Lee Jones <lee.jones@...aro.org>
Cc:     Marek Vasut <marek.vasut@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Marek Vasut <marek.vasut+renesas@...il.com>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Mark Brown <broonie@...nel.org>,
        Steve Twiss <stwiss.opensource@...semi.com>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>
Subject: Re: [PATCH v3 02/10] mfd: da9063: Use REGMAP_IRQ_REG

Hi Lee,

On Tue, Jun 5, 2018 at 9:09 AM, Lee Jones <lee.jones@...aro.org> wrote:
> On Mon, 04 Jun 2018, Marek Vasut wrote:
>> On 06/04/2018 02:26 PM, Lee Jones wrote:
>> > On Sat, 02 Jun 2018, Marek Vasut wrote:
>> >> Convert the regmap_irq table to use REGMAP_IRQ_REG().
>> >>
>> >> Signed-off-by: Marek Vasut <marek.vasut+renesas@...il.com>
>> >> Cc: Geert Uytterhoeven <geert+renesas@...der.be>
>> >> Cc: Lee Jones <lee.jones@...aro.org>
>> >> Cc: Mark Brown <broonie@...nel.org>
>> >> Cc: Steve Twiss <stwiss.opensource@...semi.com>
>> >> Cc: Wolfram Sang <wsa+renesas@...g-engineering.com>
>> >> Cc: linux-renesas-soc@...r.kernel.org
>> >> ---
>> >> V3: New patch
>> >> Note: A sed oneliner was used:
>> >>       sed -i "/\[DA9063_IRQ_/ {N;N;N;s/\n//g;s/.*\[\(DA9063_IRQ_[^]]\+\)].*reg_offset = \([^,]\+\),.* = \([^,]\+\),.*/\tREGMAP_IRQ_REG(\1, \2, \3),/}" drivers/mfd/da9063-irq.c
>> >> ---
>> >>  drivers/mfd/da9063-irq.c | 145 ++++++++++-------------------------------------
>> >>  1 file changed, 29 insertions(+), 116 deletions(-)
>> >>
>> >> diff --git a/drivers/mfd/da9063-irq.c b/drivers/mfd/da9063-irq.c
>> >> index 207bbfe55449..5b406ecfc14a 100644
>> >> --- a/drivers/mfd/da9063-irq.c
>> >> +++ b/drivers/mfd/da9063-irq.c
>> >> @@ -28,125 +28,38 @@
>> >>
>> >>  static const struct regmap_irq da9063_irqs[] = {
>> >>    /* DA9063 event A register */
>> >> -  [DA9063_IRQ_ONKEY] = {
>> >> -          .reg_offset = DA9063_REG_EVENT_A_OFFSET,
>> >> -          .mask = DA9063_M_ONKEY,
>> >> -  },
>> >> -  [DA9063_IRQ_ALARM] = {
>> >> -          .reg_offset = DA9063_REG_EVENT_A_OFFSET,
>> >> -          .mask = DA9063_M_ALARM,
>> >> -  },
>> >> -  [DA9063_IRQ_TICK] = {
>> >> -          .reg_offset = DA9063_REG_EVENT_A_OFFSET,
>> >> -          .mask = DA9063_M_TICK,
>> >> -  },
>> >> -  [DA9063_IRQ_ADC_RDY] = {
>> >> -          .reg_offset = DA9063_REG_EVENT_A_OFFSET,
>> >> -          .mask = DA9063_M_ADC_RDY,
>> >> -  },
>> >> -  [DA9063_IRQ_SEQ_RDY] = {
>> >> -          .reg_offset = DA9063_REG_EVENT_A_OFFSET,
>> >> -          .mask = DA9063_M_SEQ_RDY,
>> >> -  },
>> >> +  REGMAP_IRQ_REG(DA9063_IRQ_ONKEY, DA9063_REG_EVENT_A_OFFSET, DA9063_M_ONKEY),
>> >> +  REGMAP_IRQ_REG(DA9063_IRQ_ALARM, DA9063_REG_EVENT_A_OFFSET, DA9063_M_ALARM),
>> >> +  REGMAP_IRQ_REG(DA9063_IRQ_TICK, DA9063_REG_EVENT_A_OFFSET, DA9063_M_TICK),
>> >> +  REGMAP_IRQ_REG(DA9063_IRQ_ADC_RDY, DA9063_REG_EVENT_A_OFFSET, DA9063_M_ADC_RDY),
>> >> +  REGMAP_IRQ_REG(DA9063_IRQ_SEQ_RDY, DA9063_REG_EVENT_A_OFFSET, DA9063_M_SEQ_RDY),
>> >
>> > Nice, but I think checkpatch.pl would complain.
>> >
>> > Better to break after the first argument I think.
>>
>> Doesn't really help the readability, but done.
>
> I don't make the rules. :)

Documentation/process/coding-style.rst:

"Statements longer than 80 columns will be broken into sensible chunks, unless
 exceeding 80 columns significantly increases readability and does not hide
 information."

> Personally /me is hoping that the 80 char limit is lifted to ~120 soon.

Please no ;-)

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ