Messages in this thread | | | From | Linus Walleij <> | Date | Wed, 6 Sep 2023 23:39:41 +0200 | Subject | Re: [PATCH 2/2] gpiolib: rename gpio_chip_hwgpio() for consistency |
| |
On Tue, Sep 5, 2023 at 10:37 AM Bartosz Golaszewski <brgl@bgdev.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
| |