[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aGJhX9MhFAIopdwy@smile.fi.intel.com>
Date: Mon, 30 Jun 2025 13:05:19 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: Ahmad Fatoum <a.fatoum@...gutronix.de>,
Kent Gibson <warthog618@...il.com>,
Jan Lübbe <jlu@...gutronix.de>,
Marek Vasut <marex@...x.de>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Linus Walleij <linus.walleij@...aro.org>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH v2 4/9] gpio: sysfs: don't use driver data in sysfs
callbacks for line attributes
On Mon, Jun 30, 2025 at 10:57:06AM +0200, Bartosz Golaszewski wrote:
> On Fri, Jun 27, 2025 at 5:41 PM Andy Shevchenko
> <andriy.shevchenko@...el.com> wrote:
> > On Mon, Jun 23, 2025 at 10:59:52AM +0200, Bartosz Golaszewski wrote:
...
> > Defining once something like
> >
> > #define to_gpiod_data() ...
> >
> > we may leave this and others as one-liners.
>
> We'd need one per every attribute. Look closer, we do get a different
> attr address in every pair of callbacks.
I see, thanks for pointing that out.
...
> > > + attrs[GPIO_SYSFS_LINE_ATTR_ACTIVE_LOW] =
> > > + &data->active_low_attr.attr;
> >
> > What's the point of two lines here?
> >
>
> I tend to stick with the 80 chars limit even though it was lifted.
The above looks just ugly. Saving one character on the line here doesn't
justify readability loss.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists