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]
Message-ID: <xU4ZOVJZM7e2sDSZJ2mAJIBPI1teACp7@localhost>
Date:   Sat, 11 Jun 2022 15:22:30 +0100
From:   Aidan MacDonald <aidanmacdonald.0x0@...il.com>
To:     Mark Brown <broonie@...nel.org>
Cc:     linus.walleij@...aro.org, brgl@...ev.pl, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, wens@...e.org, jic23@...nel.org,
        lee.jones@...aro.org, sre@...nel.org, gregkh@...uxfoundation.org,
        lgirdwood@...il.com, lars@...afoo.de, rafael@...nel.org,
        quic_gurus@...cinc.com, linux-gpio@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-iio@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH v2 02/17] regmap-irq: Add get_irq_reg to support unusual
 register layouts


Mark Brown <broonie@...nel.org> writes:

> On Fri, Jun 10, 2022 at 04:40:20PM +0100, Aidan MacDonald wrote:
>> Mark Brown <broonie@...nel.org> writes:
>> > On Tue, Jun 07, 2022 at 04:53:09PM +0100, Aidan MacDonald wrote:
>
>> >> -	if (!chip->sub_reg_offsets || !chip->not_fixed_stride) {
>> >> +	if (chip->get_irq_reg) {
>> >> +		reg = chip->get_irq_reg(base_reg, i);
>> >> +	} else if (!chip->sub_reg_offsets || !chip->not_fixed_stride) {
>
>> > It seems like it would be cleaner and clearer to refactor things so that
>> > we always have a get_irq_reg() with standard chips getting given a
>> > default implementation which implements the current behaviour.
>
>> I don't think that is a good way to clean things up. I only intended
>> get_irq_reg() to be a quick hack to solve a problem; in my opinion it
>> would be a poor abstraction to base the API around.
>
> I'm not sure why you are proposing this change if you are so convinced
> it's a bad idea.  If you want to propose a different rework go ahead,
> but adding the new operation without any form of factoring out is an
> issue.  At first glance your suggestion looked plausible.

This patch isn't a refactor and I don't think it's a bad idea when
viewed as minimal solution to a problem, which was my intention.
I just think it wouldn't be a good abstraction to refactor around.
Thanks for your input anyhow.

Just as a heads up, I'll be resending these regmap-irq patches in v3
so the series stays self-contained while I work on refactoring. Feel
free to ignore them if you don't want to take them.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ