From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
linux-spi@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
Dan Carpenter <dan.carpenter@linaro.org>
Subject: Re: [RFT PATCH v2] spi: bcm2835: reduce the abuse of the GPIO API
Date: Mon, 4 Sep 2023 11:55:39 +0300 [thread overview]
Message-ID: <ZPWbi3caxQWbn2Wr@smile.fi.intel.com> (raw)
In-Reply-To: <CACRpkdaDG30k_OM_xTCM6yOTB3rjzxrsbbrLZpvYCh7e66Zt7g@mail.gmail.com>
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@kernel.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
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
linux-spi@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
Dan Carpenter <dan.carpenter@linaro.org>
Subject: Re: [RFT PATCH v2] spi: bcm2835: reduce the abuse of the GPIO API
Date: Mon, 4 Sep 2023 11:55:39 +0300 [thread overview]
Message-ID: <ZPWbi3caxQWbn2Wr@smile.fi.intel.com> (raw)
In-Reply-To: <CACRpkdaDG30k_OM_xTCM6yOTB3rjzxrsbbrLZpvYCh7e66Zt7g@mail.gmail.com>
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@kernel.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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-09-04 8:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-01 11:15 [RFT PATCH v2] spi: bcm2835: reduce the abuse of the GPIO API Bartosz Golaszewski
2023-09-01 11:15 ` Bartosz Golaszewski
2023-09-01 12:15 ` Linus Walleij
2023-09-01 12:15 ` Linus Walleij
2023-09-01 12:30 ` Mark Brown
2023-09-01 12:30 ` Mark Brown
2023-09-01 12:33 ` Bartosz Golaszewski
2023-09-01 12:33 ` Bartosz Golaszewski
2023-09-01 12:57 ` Mark Brown
2023-09-01 12:57 ` Mark Brown
2023-09-02 16:56 ` Linus Walleij
2023-09-02 16:56 ` Linus Walleij
2023-09-04 8:55 ` Andy Shevchenko [this message]
2023-09-04 8:55 ` Andy Shevchenko
2023-09-05 8:27 ` Dan Carpenter
2023-09-05 8:27 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZPWbi3caxQWbn2Wr@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=brgl@bgdev.pl \
--cc=broonie@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=florian.fainelli@broadcom.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.