Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp12101lqp; Thu, 4 Apr 2024 06:01:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV7OILuU1mmyjF8VgovIN0tDa6HdGiNrm62z0exieCk5ExVIvvwZNnL6+RJN5cvJBZOS8eIC6NP/IrHo1qJVsGhA8g2OKhGcZDyXIRFkA== X-Google-Smtp-Source: AGHT+IGaf4BCqAxSudlqI5pu0LgwbXU/gY7SvK9CF5vtU7ytjBVfV819vzHU3PiW0x1Zge1BfcnD X-Received: by 2002:a05:6a00:9a2:b0:6e6:c38e:e8a6 with SMTP id u34-20020a056a0009a200b006e6c38ee8a6mr2609121pfg.4.1712235667293; Thu, 04 Apr 2024 06:01:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712235667; cv=pass; d=google.com; s=arc-20160816; b=rPDN1m08X9kNQ2ZMr6QdKQWCeYxbH0GIWg0q3BcV9LfhX3yh2ugPM9azBeoumPxdow XPmZ6N8Ja3ddCxbUciqSJaPo9W9vwrMrvP3p1QhYIfdCvobU7tm/9y00YyD5xwm/QA0T /+0Z9tO2dexlTLR5KLb/MNw5XreTk5aNYcjvL+sqqxWcrZqm8D5yL6h6MPQvD4aB5UfK EGOn4VDyupEi/BCHp1K747bYRtaAL4CiRKLAhdo02kUaD23GL+GGYPQw3YQm2exfWNgi L+zemonD+YBAtaaUi2OSmj8b8DNsKgyEQTNm03ZV0o37eM/IBxXy+km2UUpudfZQfh3c jJKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dGOy+GGkZpdLhRSQxp/gBa+D4+ZEiZKyqA5tvASLZLA=; fh=otIPdFC0Ey4cS03k0jwdRUqKQ/hNNY66BE+/2rpmFpU=; b=Rd4lShLMutW77v8Wl2WFLRKXqyPDDSdfYol/2eTAAjgjTbOAu7MA4sKehGZjiEnECi tu7WaryPg+C3HnPL+8wNCfLQtRaeKaBQwaNdjkN1lfoZ2cMP8VrAdxpSktm1hKs3zkTX 3YM3zTsZhHxQLxmLseo85Vr5hwbhimkJJdKMv/RaATKsX97T95ptT6y9ReqREAPpBYUZ 5LUvzXAZBLSiCXdW2nlTldTAXwb3wiL9164ly3PI7wMRfxtP5yLaRU9OgrkE9cc2EaGl ozxQbsORmil+gcFUGnCRT9ZZXBGqVK3YCxpXeT+bAWCkR4NN5rPftCB6fnXU952CBP7P VigA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Butq47HZ; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-131479-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131479-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q13-20020a632a0d000000b005dbec216167si14746073pgq.614.2024.04.04.06.01.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 06:01:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131479-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Butq47HZ; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-131479-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131479-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E8B7B28F97B for ; Thu, 4 Apr 2024 13:00:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 92A2A86AE9; Thu, 4 Apr 2024 13:00:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Butq47HZ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9F118528D; Thu, 4 Apr 2024 13:00:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712235651; cv=none; b=nWXz2SyLhnKRdR7z1fNx+bcl2i3U4TXWHCZHNoPoODnQ93NsZa0AGU6kFynez03H9E3iDBz5KbaH8oQ4OnQWism9utHZS6sS6G7JlgwArvkwTWs58mOQAXsHqT8/4jVWtoOFXjGe8VQMBxbs9QwxWvupWf+JKkH3V9aIzpu9Z4I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712235651; c=relaxed/simple; bh=U2Ze18IaiYym3G5T8VVewUxICdwroUYzwMPTeS27ubw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sCh+jOlF68ZE8GJf9obp0W7wLYQMfJT1DvgpsjZlDEQtMhieaR90KaUEg05Kdvt1RFQY6K5p0HxPGZ4C+76jrSOHLeBFcSP9zXWH0wtyJtslcotkNjMg8yH0wpzFYmbYpbGVy9mD2M7UZ+LpycFkyuHinlwVWUf3wlAf4ITn3gk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Butq47HZ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3FFBC433C7; Thu, 4 Apr 2024 13:00:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712235651; bh=U2Ze18IaiYym3G5T8VVewUxICdwroUYzwMPTeS27ubw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Butq47HZgP90PPp4KiQbstGLkbFYIyE5/PGSSFRZ1C7CCtxMZPaqR05OVLQgQ607c yAPV8smmjPwbElzG7ZLm1voSWiiKPc+cV7kWm1ttZdynepinTrhvqOTbkJcr45aE5n vL1GqqFHU4RWQdOTPlefn2brPMh/HN2gElLhggeE= Date: Thu, 4 Apr 2024 15:00:48 +0200 From: Greg Kroah-Hartman To: Anand Moon Cc: Alan Stern , Krzysztof Kozlowski , Alim Akhtar , Christophe JAILLET , Johan Hovold , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/6] usb: ehci-exynos: Use devm_clk_get_enabled() helpers Message-ID: <2024040442-subscript-detective-8d12@gregkh> References: <20240404071350.4242-1-linux.amoon@gmail.com> <20240404071350.4242-2-linux.amoon@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240404071350.4242-2-linux.amoon@gmail.com> On Thu, Apr 04, 2024 at 12:43:17PM +0530, Anand Moon wrote: > The devm_clk_get_enabled() helpers: > - call devm_clk_get() > - call clk_prepare_enable() and register what is needed in order to > call clk_disable_unprepare() when needed, as a managed resource. > > This simplifies the code and avoids the calls to clk_disable_unprepare(). > > While at it, use dev_err_probe consistently, and use its return value > to return the error code. > > Signed-off-by: Anand Moon > --- > V2: drop the clk_disable_unprepare in suspend/resume functions > fix the usb_put_hcd return before the devm_clk_get_enabled > --- > drivers/usb/host/ehci-exynos.c | 19 +++++-------------- > 1 file changed, 5 insertions(+), 14 deletions(-) > > diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c > index f644b131cc0b..f00bfd0b13dc 100644 > --- a/drivers/usb/host/ehci-exynos.c > +++ b/drivers/usb/host/ehci-exynos.c > @@ -159,20 +159,15 @@ static int exynos_ehci_probe(struct platform_device *pdev) > > err = exynos_ehci_get_phy(&pdev->dev, exynos_ehci); > if (err) > - goto fail_clk; > - > - exynos_ehci->clk = devm_clk_get(&pdev->dev, "usbhost"); > + goto fail_io; > > + exynos_ehci->clk = devm_clk_get_enabled(&pdev->dev, "usbhost"); > if (IS_ERR(exynos_ehci->clk)) { > - dev_err(&pdev->dev, "Failed to get usbhost clock\n"); > - err = PTR_ERR(exynos_ehci->clk); > - goto fail_clk; > + usb_put_hcd(hcd); > + return dev_err_probe(&pdev->dev, PTR_ERR(exynos_ehci->clk), > + "Failed to get usbhost clock\n"); Why is this logic changed? If you want to call dev_err_probe(), that's great, but do NOT mix it up with a commit that does something totally different. When you say something like "while at it" in a changelog text, that is a HUGE hint that it needs to be a separate commit. Because of that reason alone, I can't take these, you know better :( thanks, greg k-h