From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Markus Elfring <Markus.Elfring@web.de>,
linux-usb@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com,
Al Cooper <alcooperx@gmail.com>,
Justin Chen <justin.chen@broadcom.com>,
Neill Kapron <nkapron@google.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] usb: bdc: Use devm_clk_get_optional_enabled() in bdc_probe()
Date: Fri, 20 Nov 2026 05:34:17 +0100 [thread overview]
Message-ID: <2026112005-shadiness-prism-c312@gregkh> (raw)
In-Reply-To: <111e6c03-017f-47f2-a941-cba45697c1e4@wanadoo.fr>
On Thu, Nov 19, 2026 at 09:19:16PM +0100, Christophe JAILLET wrote:
> Le 19/11/2026 à 20:06, Markus Elfring a écrit :
> > From: Markus Elfring <elfring@users.sourceforge.net>
> > Date: Thu, 19 Nov 2026 20:00:07 +0100
> >
> > Reuse existing functionality from devm_clk_get_optional_enabled()
> > instead of keeping duplicate source code.
> >
> > The source code was transformed by using the Coccinelle software.
> >
> > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> > ---
> > drivers/usb/gadget/udc/bdc/bdc_core.c | 8 +-------
> > 1 file changed, 1 insertion(+), 7 deletions(-)
> >
> > diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c
> > index 5149c98bf9bf..ce09327250f4 100644
> > --- a/drivers/usb/gadget/udc/bdc/bdc_core.c
> > +++ b/drivers/usb/gadget/udc/bdc/bdc_core.c
> > @@ -530,16 +530,10 @@ static int bdc_probe(struct platform_device *pdev)
> > }
> > }
> > - bdc->clk = devm_clk_get_optional(dev, "sw_usbd");
> > + bdc->clk = devm_clk_get_optional_enabled(dev, "sw_usbd");
> > if (IS_ERR(bdc->clk))
> > return PTR_ERR(bdc->clk);
> > - ret = clk_prepare_enable(bdc->clk);
> > - if (ret) {
> > - dev_err(dev, "could not enable clock\n");
> > - return ret;
> > - }
> > -
> > ret = bdc_phy_init(bdc);
> > if (ret) {
> > dev_err(bdc->dev, "BDC phy init failure:%d\n", ret);
>
> Hi,
>
> this patch is wrong because the remove function and the error handling path
> of the probe need to be updated.
Don't worry, we don't apply patches from this bot :)
next prev parent reply other threads:[~2026-11-20 4:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 19:06 [PATCH] usb: bdc: Use devm_clk_get_optional_enabled() in bdc_probe() Markus Elfring
2026-11-19 19:12 ` sashiko-bot
2026-11-19 20:19 ` Christophe JAILLET
2026-11-20 4:34 ` Greg Kroah-Hartman [this message]
2026-11-20 7:15 ` Markus Elfring
2026-11-20 7:06 ` 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=2026112005-shadiness-prism-c312@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Markus.Elfring@web.de \
--cc=alcooperx@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=justin.chen@broadcom.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nkapron@google.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.