mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Johan Hovold <johan@kernel.org>
Cc: Felix Gu <ustc.gu@gmail.com>, Mark Brown <broonie@kernel.org>,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/1] spi: Simplify devm_spi_*_controller()
Date: Thu, 26 Mar 2026 11:29:44 +0200	[thread overview]
Message-ID: <acT8iPKXzSCtM7d5@ashevche-desk.local> (raw)
In-Reply-To: <acP5T-pwlOfPdlQ0@hovoldconsulting.com>

On Wed, Mar 25, 2026 at 04:03:43PM +0100, Johan Hovold wrote:
> On Wed, Mar 25, 2026 at 11:54:34AM +0200, Andy Shevchenko wrote:
> > On Tue, Mar 24, 2026 at 10:55:48PM +0800, Felix Gu wrote:
> 
> > You mean buggy driver? Any real example of the use case?
> > 
> > In the 5. you implied something like
> > 
> > 	ret = spi_alloc_host();
> > 	...
> > 	ret = devm_spi_register_controller()
> > 
> > ?
> 
> We have some 50 spi driver using a non-managed controller allocation
> with managed registration.

Ouch!

> This was the only way to use these interfaces before managed allocation was
> added much later.
> 
> > But this is against the rule how devm must be used.
> 
> SPI is "special"... But yeah, we should eventually fix the API to avoid
> inconsistencies like this.

I see, yeah, it's better to do so.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-03-26  9:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-08 17:51 Andy Shevchenko
2026-01-09 15:30 ` Mark Brown
2026-03-24 14:55   ` Felix Gu
2026-03-25  9:54     ` Andy Shevchenko
2026-03-25 10:22       ` Felix Gu
2026-03-25 11:36         ` Andy Shevchenko
2026-03-25 15:03       ` Johan Hovold
2026-03-26  9:29         ` Andy Shevchenko [this message]
2026-03-25 14:59     ` Johan Hovold
  -- strict thread matches above, loose matches on Subject: below --
2025-11-27 19:51 Andy Shevchenko

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=acT8iPKXzSCtM7d5@ashevche-desk.local \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=ustc.gu@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®