mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Claudiu <claudiu.beznea@tuxon.dev>
Cc: gregkh@linuxfoundation.org, p.zabel@pengutronix.de,
	yoshihiro.shimoda.uh@renesas.com,
	prabhakar.mahadev-lad.rj@bp.renesas.com,
	kuninori.morimoto.gx@renesas.com, geert+renesas@glider.be,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH 1/4] usb: host: Do not check priv->clks[clk]
Date: Thu, 6 Nov 2025 10:06:40 -0500	[thread overview]
Message-ID: <aa3eebb4-c2d9-46f5-a8e3-44f17d2ab32a@rowland.harvard.edu> (raw)
In-Reply-To: <20251106143625.3050119-2-claudiu.beznea.uj@bp.renesas.com>

On Thu, Nov 06, 2025 at 04:36:22PM +0200, Claudiu wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> 
> There is no need to check the entries in priv->clks[] array before passing
> it to clk_disable_unprepare() as the clk_disable_unprepare() already
> check if it receives a NULL or error pointer as argument. Remove this
> check. This makes the code simpler.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> ---

Acked-by: Alan Stern <stern@rowland.harvard.edu>

>  drivers/usb/host/ehci-platform.c | 3 +--
>  drivers/usb/host/ohci-platform.c | 3 +--
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
> index bcd1c9073515..57d5a7ddac5f 100644
> --- a/drivers/usb/host/ehci-platform.c
> +++ b/drivers/usb/host/ehci-platform.c
> @@ -112,8 +112,7 @@ static void ehci_platform_power_off(struct platform_device *dev)
>  	int clk;
>  
>  	for (clk = EHCI_MAX_CLKS - 1; clk >= 0; clk--)
> -		if (priv->clks[clk])
> -			clk_disable_unprepare(priv->clks[clk]);
> +		clk_disable_unprepare(priv->clks[clk]);
>  }
>  
>  static struct hc_driver __read_mostly ehci_platform_hc_driver;
> diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c
> index f47ae12cde6a..af26f1449bc2 100644
> --- a/drivers/usb/host/ohci-platform.c
> +++ b/drivers/usb/host/ohci-platform.c
> @@ -69,8 +69,7 @@ static void ohci_platform_power_off(struct platform_device *dev)
>  	int clk;
>  
>  	for (clk = OHCI_MAX_CLKS - 1; clk >= 0; clk--)
> -		if (priv->clks[clk])
> -			clk_disable_unprepare(priv->clks[clk]);
> +		clk_disable_unprepare(priv->clks[clk]);
>  }
>  
>  static struct hc_driver __read_mostly ohci_platform_hc_driver;
> -- 
> 2.43.0
> 

  parent reply	other threads:[~2025-11-06 15:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-06 14:36 [PATCH 0/4] usb: host: renesas: Handle reset signals on suspend/resume Claudiu
2025-11-06 14:36 ` [PATCH 1/4] usb: host: Do not check priv->clks[clk] Claudiu
2025-11-06 14:45   ` Geert Uytterhoeven
2025-11-06 15:06   ` Alan Stern [this message]
2025-11-06 14:36 ` [PATCH 2/4] usb: host: ehci-platform: Call reset assert/deassert on suspend/resume Claudiu
2025-11-06 14:52   ` Geert Uytterhoeven
2025-11-06 14:59     ` Claudiu Beznea
2025-11-07  8:01       ` Geert Uytterhoeven
2025-11-07 10:26         ` Claudiu Beznea
2025-11-10  9:29           ` Geert Uytterhoeven
2025-11-10 14:46             ` Alan Stern
2025-11-06 14:36 ` [PATCH 3/4] usb: host: ohci-platform: " Claudiu
2025-11-06 14:54   ` Geert Uytterhoeven
2025-11-06 14:36 ` [PATCH 4/4] usb: renesas_usbhs: Assert/de-assert reset signals " Claudiu

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=aa3eebb4-c2d9-46f5-a8e3-44f17d2ab32a@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --cc=claudiu.beznea.uj@bp.renesas.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=yoshihiro.shimoda.uh@renesas.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®