Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp46653lqp; Thu, 4 Apr 2024 06:52:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUhtGZCOTOENajXYqSs7D/oyQc5qEGmHbU5uRq8buXTRbk7bcALZskwuDgi7JtAammIZNPA+79TaFPUXK+TnHmMw0OPYonrL9/jQkarCQ== X-Google-Smtp-Source: AGHT+IFntxvBVStTIhGpiDxCppVJAEU2/gd+2HLBFQ6mqUSqyu7qj90rPh38q6X9dWUvHjqiaqTs X-Received: by 2002:a05:620a:3b8d:b0:78a:32db:9df4 with SMTP id ye13-20020a05620a3b8d00b0078a32db9df4mr3769395qkn.9.1712238756592; Thu, 04 Apr 2024 06:52:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712238756; cv=pass; d=google.com; s=arc-20160816; b=XW17E4cN//C8q1/GApZOFTNEfGuafYh0bM1bkfEvQE+snzws4Wt7+MlcB6A9kycejz wGQZZ7KJEHBEfOAQIHFTgOmNIrhI9Zm0SiLMzvcjuAgSplBbEkfO65/JU0P37fDjaPE5 xJKuxI+juFkxko78PJjkx7Sq9D9J9DtiZfxtU+q+GNso9+GqNgt6zbcrL7RisymBEug6 trsMU9p3t6+OMyA0jbo1YQMeqj0TBjZ5tsY8vvIrFDsypSqrwG+7UkV4YfVbyYJMPNrJ 2OG7HwVSp08EAVUORqbqsMKf2AeeOaBIJLHuldZC9qDsaqR+JW8i4DhKBxnZrVaMtBnb XInw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=Jn4qrU+tBprHqhbcKEnAjUZjtZ7L2LhdcfMRoTh6EAo=; fh=fI3R/U8wuBerWSJTFLdzXHl+sm7UkI+71KPWf3nLZg8=; b=QYmAuTkLm7B+tWzmJDhp8FZMvGV+j0WOVwf2gzGfyREYFFl7e9e/H3h7Rqz/eASDbA 3754xax3GvE45+wtm5pj/sbo3944BHB9atKmWQraakixc1/1nUAJjO9vaYhIWBvNHDOW qZjK4mbP2UJvLC3jFey25OiMC93t83pt++4LW7q/TC1TUL6k7n4Ra6VbW8YHqLe823tM TFvF3hCijWQMCaMq2SNlINo8wKDglYmlSh8Q9gP77uiyR3n0WPUhXx1vH4D+Vw/gOh2Z TuIbGvYm7L0mxh0KLxNfQYcgI1EUi3SYje+gdigZWGdUsAIlLZfGufBAwClUqx9GMYUw bm4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DvJfP5QZ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-131538-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131538-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j25-20020ae9c219000000b0078bcf9a6ce9si13073763qkg.410.2024.04.04.06.52.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 06:52:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131538-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DvJfP5QZ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-131538-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131538-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5348D1C2122A for ; Thu, 4 Apr 2024 13:52:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B85621292D2; Thu, 4 Apr 2024 13:52:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DvJfP5QZ" Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A73C1272A3; Thu, 4 Apr 2024 13:52:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712238747; cv=none; b=gP49IoTKajXGWrHYvP/C9pz3S9QPGbZQltkqZd+87tMATlBUGz4Yuilxp8FWx1CYyRNjKGTodTpbGs49MgZYBM1kkJwkJmeijZdeGW9Rk/ED7JNmJmZXNMYtiT9Q79MsTwknK2uq0JYR/vtHhr/MXLQiUD9+1W2DCxxAsLrxFgQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712238747; c=relaxed/simple; bh=SyaoC9dGTnAAIwvKQL5lKilmQfKt1cUMZ3Uwe9zaSWA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=b/WWR2xCuJkQHH+ZOFKS3zcRwhT5RNtu5PJ1wHG0l/ZAHyeIPV9JyTwvrTpr4tiauuMUnmzrPJAGzzjjwEERVFZypj/nkqFu8sQv1pHiGaPujqaXqJLlu+bbSBrFMScWPdL+F5GCAsn6cXdtEFcXYDDcB6pebKiCrWN5Ytva0CY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DvJfP5QZ; arc=none smtp.client-ip=209.85.161.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f48.google.com with SMTP id 006d021491bc7-5a9d93ed063so345255eaf.0; Thu, 04 Apr 2024 06:52:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712238745; x=1712843545; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Jn4qrU+tBprHqhbcKEnAjUZjtZ7L2LhdcfMRoTh6EAo=; b=DvJfP5QZkUfHdb1tUHjTJ2ZgUhjyXE7vf2znYG6ZX1753H1ET7nQ/SpYvZJJDM0xQn 8hfrn2VKFUZwezaUQieL8pcf/Te0FJJYkUSvmsHlUtOW1eCBu6UQdaV7Mjo67kZud3Nx HGxuWJyHin1t52cLJbfxWRgERiQjhj2Mj80IpBJlyn+p0Ek0p3NBMT71yDY73HYVXvGY Aqi9XvXBms8NytmwDjelCSS4nJgAv0YkE+0AnLeNgp+ZlhvfR0oqmHU1wS2IGkAhbf2r jA6dxyZfN1HwNx3wDwSC/BInI+OqHkAMzpWAbOREJZafUYtvH5STFreFY1Du5Wo1AqW+ ZSBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712238745; x=1712843545; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Jn4qrU+tBprHqhbcKEnAjUZjtZ7L2LhdcfMRoTh6EAo=; b=m2lLdmb917YBLoLe+fDINTLpmSgj1YCfR7j9pBgzuxL9WuCZU2ww6rzf+OtyPBNtO1 hLcTkwtG7qTKd/eDdEXR9eLaMI0Uoe5O8SWTCfxBtbwgoGHxS4gbtw0Td/txX2nOpmF+ Ef4shL8hidyl81xL66wBHx+e72jHnqu3Gt3y0+F++E/9VrokaQeNVtWFMOXlC/q7W4l/ Ds2Af1tzaCEPN67v3oiwai67IHY3R2dYu/mOF5EYZfVGjlzI5mhmpQ34f4vjQyKrIQMz Q1Nhq7NHA4ylLbdyi9ron8MTFlnLgMMt01vzQkIIe8ENCmS9AijcSpN3nkKwr3rRBxc0 rxRw== X-Forwarded-Encrypted: i=1; AJvYcCXm87J2kWeuyEdVg6y5gObqzZjRV/ZLjQfF9doL2kdDBNn+Wf4AfjV46ZIVNlS/WIsn8LYjpI80VjTv7d/J0Q+9YF6jSHI6Bn9YMRyITCjOgzCS7gkmk3b+VZhMvj3HA5ffRqJjHWbT7CSr3aIIpwQntF4N9Y+e6/j1yORgfyqvrnzB0h5TIOLEWbU= X-Gm-Message-State: AOJu0YxQbf7TbuhV7WWUcUXWdPr0/wMW1zNJi6rDzvfwb1bNzUbNpO0n +k9bmfaYR/UZ5bOgmqlh2+AOBQSBC0ee1O5s2U2PnHt66r5HYYtZRivuNWRJT9MMt1SWIRw8d7i c7DTijCgFXrVHF2J91WlWLyXXmXk= X-Received: by 2002:a05:6820:2614:b0:5a4:5526:1740 with SMTP id cy20-20020a056820261400b005a455261740mr1164843oob.2.1712238744855; Thu, 04 Apr 2024 06:52:24 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240404071350.4242-1-linux.amoon@gmail.com> <20240404071350.4242-2-linux.amoon@gmail.com> <2024040442-subscript-detective-8d12@gregkh> In-Reply-To: <2024040442-subscript-detective-8d12@gregkh> From: Anand Moon Date: Thu, 4 Apr 2024 19:22:08 +0530 Message-ID: Subject: Re: [PATCH v2 1/6] usb: ehci-exynos: Use devm_clk_get_enabled() helpers To: Greg Kroah-Hartman 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 Content-Type: text/plain; charset="UTF-8" Hi Greg, On Thu, 4 Apr 2024 at 18:30, Greg Kroah-Hartman wrote: > > 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, > Ok, I will improve the commit message relevant to the code changes. > greg k-h Thanks -Anand