Re: [PATCH 1/5] Input: zinitix - Helper dev variable in probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 27, 2022 at 7:36 AM Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> wrote:
> On Sun, Apr 10, 2022 at 02:00:55PM +0200, Linus Walleij wrote:

> > Create a helper variable struct device *dev in probe() to
> > make the code more compact and easier to read.
>
> Actually I wonder if this is a good idea: when just seeing "dev" I often
> have hard time to remember what device we are dealing with, whereas
> "client->dev" gives a very string hint that we are dealing with I2C
> peripheral physical device.

Hm yeah that has a point I suppose.

> Did you observe object code savings from the conversion by chance?

No it is just cognitively easier for me (less characters on the screen)
but that is admittedly a bit of personal preference.

I'll drop this patch, because the subsystem maintainer's taste is
more important than mine.

Yours,
Linus Walleij



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux