public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Orson Zhai" <orsonzhai@gmail.com>,
	"Baolin Wang" <baolin.wang@linux.alibaba.com>,
	"Chunyan Zhang" <zhang.lyra@gmail.com>,
	"Wolfram Sang" <wsa@kernel.org>,
	kernel@pengutronix.de, linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c: sprd: Delete i2c adapter in .remove's error path
Date: Thu, 15 Jun 2023 10:34:23 +0200 (CEST)	[thread overview]
Message-ID: <6df0cbb6-19ed-8a5e-376-9222688d8953@linux-m68k.org> (raw)
In-Reply-To: <CAHp75VeMO+0VisrQXTGj9yuGz23jMaX8G0PDPUhhD1bMJ4ji2w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1281 bytes --]

 	Hi Andy,

Just noticed this patch is being backported to stable...

On Thu, 9 Mar 2023, Andy Shevchenko wrote:
> On Thu, Mar 9, 2023 at 11:58 AM Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de> wrote:
>>
>> If pm runtime resume fails the .remove callback used to exit early. This
>> resulted in an error message by the driver core but the device gets
>> removed anyhow. This lets the registered i2c adapter stay around with an
>> unbound parent device.
>>
>> So only skip clk disabling if resume failed, but do delete the adapter.
>
> Still worrisome. I would disable clock independently, but the questions are:
> 1) why the heck we need this dance with PM runtime for disabling clocks;

Exactly. There is no point in calling pm_runtime_get_sync() and
pm_runtime_put_noidle() here, as no hardware is accessed in between,
is it?

> 2) why can't we use devm_clk_get_enabled() or so in the probe;
> ?

Because that helper didn't exist when this driver was introduced ;-)

Gr{oetje,eeting}s,

 						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
 							    -- Linus Torvalds

  parent reply	other threads:[~2023-06-15  8:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09  9:58 [PATCH] i2c: sprd: Delete i2c adapter in .remove's error path Uwe Kleine-König
2023-03-09 11:17 ` Andy Shevchenko
2023-03-09 12:04   ` Uwe Kleine-König
2023-05-30 13:53     ` Uwe Kleine-König
2023-06-06 16:16     ` Andi Shyti
2023-06-15  8:34   ` Geert Uytterhoeven [this message]
2023-06-07 10:30 ` Wolfram Sang

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=6df0cbb6-19ed-8a5e-376-9222688d8953@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wsa@kernel.org \
    --cc=zhang.lyra@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