[PATCH 13/15] gpio: sodaville: use new generic GPIO chip API

Bartosz Golaszewski brgl at bgdev.pl
Tue Sep 9 07:05:41 PDT 2025


On Tue, Sep 9, 2025 at 4:02 PM Andy Shevchenko
<andriy.shevchenko at intel.com> wrote:
>
> On Tue, Sep 09, 2025 at 03:56:41PM +0200, Bartosz Golaszewski wrote:
> > On Tue, Sep 9, 2025 at 3:47 PM Andy Shevchenko
> > <andriy.shevchenko at intel.com> wrote:
> > >
> > > TBH, I think those 6 all made the same mistake, i.e. thinking of the compound
> > > literal as a cast. Which is not!
> >
> > What do you suggest?
>
> Write it in less odd way :-)
>
> foo = (struct bar) { ... };

I don't get your reasoning. typeof() itself is well established in the
kernel and doesn't

foo = (struct bar){ ... };

evaluate to the same thing as

foo = (typeof(foo)){ ... };

? Isn't it still the same compound literal?

Bartosz

>
> > And are we not allowed to use C99 features now anyway?
>
> It's fine, it's not about the C standard number.
>



More information about the Linux-mediatek mailing list