mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Florian Fainelli <florian.fainelli@broadcom.com>,
	Christophe Jaillet <christophe.jaillet@wanadoo.fr>,
	netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Jonas Gorski <jonas.gorski@gmail.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Vladimir Oltean <olteanv@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: Re: net: dsa: bcm_sf2: Use devm_clk_get_optional_enabled() in bcm_sf2_sw_probe()
Date: Fri, 20 Nov 2026 08:00:08 +0100	[thread overview]
Message-ID: <ab5a8304-9976-40e1-bdcd-161cb3f81ab3@web.de> (raw)
In-Reply-To: <c4715b1f-c2cc-4b4f-8610-dd2e0ec71c45@broadcom.com>

>> NACK, this patch is wrong because the remove function and the error handling path of the probe need to be updated.
> 
> My bad you are right this creates the following regressions: devm_clk_get_optional_enabled() registers a devres action that calls clk_disable_unprepare() on detach. The patch leaves the manual
> clk_disable_unprepare(priv->clk) in two places in drivers/net/dsa/bcm_sf2.c: the probe error path (out_clk:) and bcm_sf2_sw_remove().
> 
> pw-bot: cr

Do you expect more functionality from a devm_clk_get_optional_enabled() call
than from the combination of devm_clk_get_optional() and clk_prepare_enable() so far?

https://elixir.bootlin.com/linux/v7.4-rc1/source/include/linux/clk.h#L680-L699
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/driver-api/driver-model/devres.rst?id=d220c9443db6e5f20a60cad55c6a0ae7a75c63b8#n242

https://elixir.bootlin.com/linux/v7.4-rc1/source/drivers/net/dsa/bcm_sf2.c#L1365-L1568

Regards,
Markus

  reply	other threads:[~2026-11-20  7:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 16:37 [PATCH net-next] " Markus Elfring
2026-11-19 17:45 ` Florian Fainelli
2026-11-19 20:21 ` Christophe JAILLET
2026-11-19 21:06   ` Florian Fainelli
2026-11-20  7:00     ` Markus Elfring [this message]
2026-11-20  6:54   ` Markus Elfring

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=ab5a8304-9976-40e1-bdcd-161cb3f81ab3@web.de \
    --to=markus.elfring@web.de \
    --cc=andrew@lunn.ch \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=jonas.gorski@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.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®