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
| ||
|
Message-ID: <Yuqw5+lLh65flC4D@euler> Date: Wed, 3 Aug 2022 10:31:19 -0700 From: Colin Foster <colin.foster@...advantage.com> To: Andy Shevchenko <andy.shevchenko@...il.com> Cc: linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>, "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>, netdev <netdev@...r.kernel.org>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, devicetree <devicetree@...r.kernel.org>, Terry Bowman <terry.bowman@....com>, Vladimir Oltean <vladimir.oltean@....com>, Wolfram Sang <wsa@...nel.org>, Microchip Linux Driver Support <UNGLinuxDriver@...rochip.com>, Steen Hegelund <Steen.Hegelund@...rochip.com>, Lars Povlsen <lars.povlsen@...rochip.com>, Linus Walleij <linus.walleij@...aro.org>, Paolo Abeni <pabeni@...hat.com>, Jakub Kicinski <kuba@...nel.org>, Eric Dumazet <edumazet@...gle.com>, "David S. Miller" <davem@...emloft.net>, Russell King <linux@...linux.org.uk>, Heiner Kallweit <hkallweit1@...il.com>, Andrew Lunn <andrew@...n.ch>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Rob Herring <robh+dt@...nel.org>, Lee Jones <lee.jones@...aro.org>, katie.morris@...advantage.com Subject: Re: [PATCH v15 mfd 9/9] mfd: ocelot: add support for the vsc7512 chip via spi On Wed, Aug 03, 2022 at 07:10:38PM +0200, Andy Shevchenko wrote: > On Wed, Aug 3, 2022 at 5:56 PM Colin Foster > <colin.foster@...advantage.com> wrote: > > On Wed, Aug 03, 2022 at 01:45:04PM +0200, Andy Shevchenko wrote: > > > On Wed, Aug 3, 2022 at 7:48 AM Colin Foster > > > <colin.foster@...advantage.com> wrote: > > ... > > > > > + regmap_config.max_register = res->end - res->start; > > > > > > Hmm... First of all, resource_size() is for that (with - 1 to the > > > result). But don't you need to use stride in the calculations? > > > > DEFINE_RES_NAMED populates the resource .end with (_start) + (_size) - 1 > > so I don't think resource_size is correct to use here. > > Have you read what I put in parentheses? Basically it becomes very > well the same as a result, but in a cleaner manner (you calculate > resource size - 1 which will be exactly the last byte offset of the > register file), no? Ahh... I see your point. I agree with your suggestion and will clean it up. > > > reg_stride gets handled at the top of regmap_read(), so I don't think > > that's really needed either. > > Okay. > > > For reference: > > > > #define VSC7512_DEVCPU_ORG_RES_START 0x71000000 > > #define VSC7512_DEVCPU_ORG_RES_SIZE 0x38 > > Right, for 0x38 you supply 0x37, which is exactly resource_size() - 1. > > > # cat range > > 0-34 > > -- > With Best Regards, > Andy Shevchenko
Powered by blists - more mailing lists