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:   Thu, 11 Apr 2019 15:00:51 +0200
From:   Daniel Lezcano <daniel.lezcano@...aro.org>
To:     Andrey Smirnov <andrew.smirnov@...il.com>
Cc:     linux-pm@...r.kernel.org, Chris Healy <cphealy@...il.com>,
        Lucas Stach <l.stach@...gutronix.de>,
        Zhang Rui <rui.zhang@...el.com>,
        Eduardo Valentin <edubezval@...il.com>,
        Angus Ainslie <angus@...ea.ca>,
        dl-linux-imx <linux-imx@....com>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 09/13] thermal: qoriq: Convert driver to use regmap API

On 05/04/2019 20:24, Andrey Smirnov wrote:

[ ... ]

>>> +static const struct regmap_range qiriq_yes_ranges[] = {
>>> +     regmap_reg_range(REGS_TMR, REGS_TSCFGR),
>>> +     regmap_reg_range(REGS_TTRnCR(0), REGS_TTRnCR(3)),
>>> +     /* Read only registers below */
>>> +     regmap_reg_range(REGS_TRITSR(0), REGS_TRITSR(15)),
>>> +};
>>> +
>>> +static const struct regmap_access_table qiriq_wr_table = {
>>> +     .yes_ranges     = qiriq_yes_ranges,
>>> +     .n_yes_ranges   = ARRAY_SIZE(qiriq_yes_ranges) - 1,
>>> +};
>>> +
>>> +static const struct regmap_access_table qiriq_rd_table = {
>>> +     .yes_ranges     = qiriq_yes_ranges,
>>> +     .n_yes_ranges   = ARRAY_SIZE(qiriq_yes_ranges),
>>> +};
>>
>> As the table are the same, it would make sense to fold both structure to
>> a single one (and s/qiriq/qoriq/ ?)
>>
> 
> Writable registers are a subset of readable registers and n_yes_ranges
> is different between the two. Not sure how I could fold the two into a
> single struct.

Right, never mind my comment.




-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Powered by blists - more mailing lists