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] [day] [month] [year] [list]
Message-ID: <CH2PR12MB38950929588D6AF386C4C22FD71AA@CH2PR12MB3895.namprd12.prod.outlook.com>
Date:   Thu, 17 Aug 2023 15:07:53 +0000
From:   Asmaa Mnebhi <asmaa@...dia.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
CC:     "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "linus.walleij@...aro.org" <linus.walleij@...aro.org>,
        "bgolaszewski@...libre.com" <bgolaszewski@...libre.com>,
        "brgl@...ev.pl" <brgl@...ev.pl>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 2/2] gpio: mlxbf3: Support add_pin_ranges()


> > I would like to get the gpio block id which can only be 0 or 1 on BlueField-3
> (only 2 gpio blocks, one with 32 gpio pins and one with 24 gpio pins).
> > The above logic was an "easy" way for me to get the gpio block id. Then the
> pin_base for each gpio block is:
> > pin_base = id * MLXBF3_GPIO_MAX_PINS_PER_BLOCK
> 
> It's fragile. Use a direct case switch for that, which will be more explicit and
> robust (however still can fail for any new chip revision/version where it might
> be a different GPIO layout).
> 
Thanks Andy! Will do. Hopefully it is too late to change the BF3 hardware at this point so we should be good ; ) .

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ