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: <CAHp75VcYZCr=N_3YNe4kO1Vm95mJcxV4dKkBEz-NqXzumzXa1w@mail.gmail.com>
Date: Tue, 21 May 2024 20:34:18 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Patrick Rudolph <patrick.rudolph@...ements.com>
Cc: Linus Walleij <linus.walleij@...aro.org>, naresh.solanki@...ements.com, 
	broonie@...nel.org, linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] pinctrl: cy8c95x0: Use regmap ranges

On Tue, May 21, 2024 at 6:26 PM Patrick Rudolph
<patrick.rudolph@...ements.com> wrote:
>
> Instead of implementing a custom register paging mechanism in
> the driver use the existing regmap ranges feature.

driver, use

..


> +static const struct regmap_range_cfg cy8c95x0_ranges[] = {
> +       {
> +               .range_min = CY8C95X0_VIRTUAL,
> +               .range_max = 0,         /* Updated at runtime */

This and similar comments are misleading since the data is defined as
const. Updated --> Filled or alike here and elsewhere.

> +               .selector_reg = CY8C95X0_PORTSEL,
> +               .selector_mask = 0x07,
> +               .selector_shift = 0x0,
> +               .window_start = CY8C95X0_INTMASK,
> +               .window_len = MUXED_STRIDE,
> +       }
>  };

..

> +                       regcache_cache_only(chip->regmap, true);
> +                       regmap_update_bits(chip->regmap, off, mask & val, 0);
> +                       regcache_cache_only(chip->regmap, false);

A side note: It's strange to see mask & val, 0 in the parameters of
regmap calls. Perhaps refactor this (in a separate patch) to use
standard approach?

..

> +       memcpy(&regmap_range_conf, &cy8c95x0_ranges[0], sizeof(regmap_range_conf));

       memcpy(&regmap_range_conf, cy8c95x0_ranges, sizeof(regmap_range_conf));

..

Note, if you are not using --histogram diff algo, please start using
it from the next version of this series.

P.S. I will test the next version on Intel Galileo Gen1 as currently I
have some issues with the HW I need to fix first.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ