[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZPWbi3caxQWbn2Wr@smile.fi.intel.com>
Date: Mon, 4 Sep 2023 11:55:39 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Mark Brown <broonie@...nel.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@...adcom.com>, linux-spi@...r.kernel.org,
linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-gpio@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
Dan Carpenter <dan.carpenter@...aro.org>
Subject: Re: [RFT PATCH v2] spi: bcm2835: reduce the abuse of the GPIO API
On Sat, Sep 02, 2023 at 06:56:51PM +0200, Linus Walleij wrote:
> On Fri, Sep 1, 2023 at 2:31 PM Mark Brown <broonie@...nel.org> wrote:
>
> > > > + struct gpiod_lookup_table *lookup __free(kfree) = NULL;
> >
> > > Whoa!
> > > This is really neat.
> > > As noted, it will confuse static checkers at no end, but they just have
> > > to adopt. (CC to Dan C if he now runs into this.)
> >
> > It also doesn't look amazing for humans, it's very not C like...
>
> <linux/cleanup.h> and the __free() macro was introduced by Peter
> Z who also very famously suggested (OTOMH!) that instead of
> adopting Rust to the kernel it would be possible to bring the
> desired Rust features into C.
Competition is always good :-)
> Which is what he does, well the feature has been there for a while
> but he identified it and made it easily accessible.
>
> Now if this path is desirable ... yeah. Maybe a matter of taste.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists