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: <CACRpkdYO=uzzP8JMgdci=qkvGP=1AcrqD3PSBm9vkJYsFqX_gQ@mail.gmail.com>
Date:   Wed, 6 Sep 2023 23:39:41 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Bartosz Golaszewski <brgl@...ev.pl>
Cc:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
        Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH 2/2] gpiolib: rename gpio_chip_hwgpio() for consistency

On Tue, Sep 5, 2023 at 10:37 AM Bartosz Golaszewski <brgl@...ev.pl> wrote:

> gpio_chip_hwgpio() is a
> terrible name and if I didn't know, I couldn't tell you what it does
> just from looking at the name.

Probably my fault.

"For the chip containing this desc obtain the corresponding
hardware GPIO number/offset" is what I would put in kerneldoc.
(Which is by the way also horrible.)

Let's rename it to something that says clearly what it does.
(Rusty Russell's API design hierarchy.)

I guess I would just name it something like *_get_chip_hw_offset()
or *_get_chip_hwgpio_offset() but it gets a bit long, maybe it is a bit
talkative but easy to understand. (I stay off the prefix discussion.)

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ