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:   Mon, 21 Feb 2022 21:40:56 +0100
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Jagath Jog J <jagathjog1996@...il.com>
Cc:     jic23@...nel.org, lars@...afoo.de, sst@...zta.fm,
        robh+dt@...nel.org, linux-iio@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/6] iio: potentiometer: Add channel information in
 device data

On Fri, Feb 18, 2022 at 5:20 AM Jagath Jog J <jagathjog1996@...il.com> wrote:
>
> Adding each device wiper count and channel information into
> device private data.
> Utilizing addr member of struct iio_chan_spec to get the
> wiper register address so that the value can be read or write
> to the same address.

Looks much better!

...

>  static const struct ds1803_cfg ds1803_cfg[] = {
> -       [DS1803_010] = { .avail = { 0, 1, 255 }, .kohms =  10, },
> -       [DS1803_050] = { .avail = { 0, 1, 255 }, .kohms =  50, },
> -       [DS1803_100] = { .avail = { 0, 1, 255 }, .kohms = 100, },
> +       [DS1803_010] = { .wipers = 2, .avail = { 0, 1, 255 }, .kohms =  10,
> +                        .channels = ds1803_channels,
> +                        .num_channels = ARRAY_SIZE(ds1803_channels) },
> +       [DS1803_050] = { .wipers = 2, .avail = { 0, 1, 255 }, .kohms =  50,
> +                        .channels = ds1803_channels,
> +                        .num_channels = ARRAY_SIZE(ds1803_channels) },
> +       [DS1803_100] = { .wipers = 2, .avail = { 0, 1, 255 }, .kohms = 100,
> +                        .channels = ds1803_channels,
> +                        .num_channels = ARRAY_SIZE(ds1803_channels) },
>  };

Now, you may see you touch still the lines that are not changed, so
consider in the _previous_ patch to define each entry like the
following:

  [DS1803_...] = {
    .avail = {...},
    .kohms = ...,
  },

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ