From patchwork Sun Aug 25 14:34:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3344 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 664CD3F1CD for ; Sun, 25 Aug 2024 16:34:36 +0200 (CEST) Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2f5084d2a66sf5290661fa.2 for ; Sun, 25 Aug 2024 07:34:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1724596476; cv=pass; d=google.com; s=arc-20160816; b=l0APzGmaCZdXZMh7YixT2+wyUJJvlgXaAobv2wA7z/jqM+1FytKhTWv8xQmJ3ur1aS IQoD5W+C/+6CLPwUP2TiyYyNdRRqSQxEidDAMfbLdqGmBwER+AnOJn55eWLo7vW+05G+ /Dm1x6KFaRm5VG6dHV2Zy0YcFZvEloXHmVLvnJN5GjCoqyu4qtoF2ZP8tOcUlGql3DLt m//w9YSov3fT1/8pNvJWQ1GlhXzN6O0Dff/y+1hi90s25zdUjrqIauiKUxthYzcXXKuv t4T70X3zPVyXgu7FhY1JKCMz6GWPku4Ko7xYEv4EEJq5U9+fW/WydVaklI6OBeNLeEGb RvjA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=78yjK0UUalr5nI7Br3NmFybMFvvxIlWJYXpDp7MggwU=; fh=rjeQ3kWK8SRS95PPhuYXiBN4uN7hukOGBnHgxb4//d8=; b=nUNxljoBgdREh2tEXWHZfdWER5sUnSPcYdvdZc+7O3xI488NcHCcewBcJRmCUOHwd/ 1SMxQOXMWK0B855PBjRlz9eUuwG7KnhTr8cSu62FSzdwGGQ0w3HCTG738hf5J/70oSdY riRr0kqdtY7gfpD/KYO971jO5dnRSfIN7RXAh45x9Bu6gRzZcLYWomcUeelZrpkJzuFi aXsSPx2SfcpejhRtc4nwMZLqfYAfHtyael8ENluj7Eg2R4Zn39+7cTiWYi3xwgoQH5EK ruVArl5NPNcqftpRlWrwczN33ABF0uZEBQ9tXc43e4fChBl7Nvy4Se3+QzXwnVmm4Ydr mEOw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ANPbWVJt; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1724596476; x=1725201276; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=78yjK0UUalr5nI7Br3NmFybMFvvxIlWJYXpDp7MggwU=; b=VNet54CHCp8ETl7QH55uLpAmKS/8BHjTGUClKnzy7zQPzsyXAPuVI/NnafSRyDSrd/ VLioLBOcCGViAyKDb6+B+g6nhtKqcdwFVAhOyEV4n8xe+/zyC6v/vvfavaphl3mLjhpw xU0mnHAK6aFcwJzg871nLf4PjlW8uXITWwTEU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724596476; x=1725201276; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=78yjK0UUalr5nI7Br3NmFybMFvvxIlWJYXpDp7MggwU=; b=c4HJUuFYJkBD0hdTCKgh8lqMUjw3ROxeQcGV2bwoxq3iChgYNNW4gL4QiifOBLkBtl fJLf7oB5kioHVwmetG7bbJit2RPkHMip/yYcl7LRR4RgkwztxnScNv4uMFaYOZ2D0QkT cWHi3HZWWB/L2X1sBaBfAut/PWv6uIbxQgxwqDHQk43WBEhxcU8JxN0uhPWMPx6/3Jf4 Nd8Fyk9XiJJkqvFGaaFIfQe7fMhMVUTOok6bK3n1mF44IQG6Ed05R1Z8AHrFReKyjP9z nEFHwLiAx9Svpad80mb5FDZqfnKInmcwLioZtj9JOHLtaYL8UQu9AFFxg5HyYhreB44Z HJAw== X-Forwarded-Encrypted: i=2; AJvYcCVA4EOe+oMwA27Z+AT602czvk7s6KT5YSTSOKD2mWIb92jshAYOobn4Lxvz10ugTlDAfG17fqXxQ0RtgNn3@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yyuu6SFJ5sIUngvWqVgYkyGSZZDI/JQLgSopIyBiAhXLib7FS8l qnu1bNC0/XBhmtd/rP8OtlOATImyDH+LHVjHcwuevNaamu3dC1dXLyvFGsVxYB5/Dw== X-Google-Smtp-Source: AGHT+IFkPBFds+FPDUGI7/6/gliqVEUXLFRQqg6Dlqs9yDmbeOJho1fZpM1YDgggLWMX1GSvRZRfJA== X-Received: by 2002:a2e:97cd:0:b0:2ef:2cbc:9072 with SMTP id 38308e7fff4ca-2f4f496124amr44523711fa.49.1724596475691; Sun, 25 Aug 2024 07:34:35 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:2690:b0:5be:da72:5baf with SMTP id 4fb4d7f45d1cf-5bf38f9afbels1599378a12.0.-pod-prod-09-eu; Sun, 25 Aug 2024 07:34:34 -0700 (PDT) X-Received: by 2002:a17:906:cac7:b0:a86:9cff:6798 with SMTP id a640c23a62f3a-a86a52ec035mr553335766b.30.1724596474189; Sun, 25 Aug 2024 07:34:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724596474; cv=none; d=google.com; s=arc-20160816; b=VhGHyeOmupvVyPu7jYbAbzFjPlzqsNjq5YkO11ZDdMsVqn/JKVlDkuH8UDiQtFIxke hiGdniFUSpgntdYBn8zYf0zS6yM6u4PIMcJCqR4ApRmKlU3cZRriL8v2QRF75FLLuKtt Bab3eJTw/bd8jTOrzQmm4nSTM/EUJcWjGjFcGNlcrBF29UzxES3l5tNW84YJKPRl+pZl NsKaatOtnNdTHx8biRQy1qwSvdkNTXQUnAPXH+3ool7rV0yhuuT8bE4mQWPlVmhfm5XN gBD6+rB5ZfSlTDgFkT1E7k5xpgdznrixTmPGJ0D5Naf3MQepVZ46g8x15ViQDJRkIUmf 3tPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=pUP1tr1Biob0qdgqQZiV/8XgCxeEAXErXHQFm+tqx4M=; fh=rNolTRAi/pzvqpcsiL1SBguc5M4vP05RQPM5+uLgwX0=; b=Ss0st6YBSl9Qrl2U3QWBiFsrv5dfuSeqHOUZXl8jK33yuc/od5H5KI4yBaPaDgounR 55YsFg5BTKeYOpPHFKtyap8Nnywk+ooR8rvwt/p8sD0B40nh4IVQrbRWL2ovq7yWPj4d FcRuposLcY2zBpjyheZ9dVHRnRa3HsiJOjt+MNXJ0PEMmtUsJtvXXnyAb87OL4eN1c6g 4F6ukqurHPRQO/EDOMH2MEdNy8weT3qIGNX1qRok1gGYFBLQ0a5bu8cCEY3CDTXXoJBu SBoP55Ee880dW0feqdYzLq3LSScqPAGbYVw6wYpE1AMYdIXBoj5ojdAfSMYdQU+m5yKo ohTA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ANPbWVJt; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a868f4e549asor206704866b.19.2024.08.25.07.34.34 for (Google Transport Security); Sun, 25 Aug 2024 07:34:34 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:906:c143:b0:a86:8368:860a with SMTP id a640c23a62f3a-a86a53005f6mr518996166b.35.1724596473780; Sun, 25 Aug 2024 07:34:33 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-25-99-149.retail.telecomitalia.it. [79.25.99.149]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f4862b6sm550625566b.170.2024.08.25.07.34.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Aug 2024 07:34:33 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Fabio Estevam , Jacky Bai , Peng Fan , Pengutronix Kernel Team , "Rafael J. Wysocki" , Sascha Hauer , Shawn Guo , Ulf Hansson , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH v2 3/3] pmdomain: imx93-pd: drop the context variable "init_off" Date: Sun, 25 Aug 2024 16:34:02 +0200 Message-ID: <20240825143428.556439-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240825143428.556439-1-dario.binacchi@amarulasolutions.com> References: <20240825143428.556439-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ANPbWVJt; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This variable is only used within the probe() function, so let's remove it from the context and define it locally within the same function. Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/pmdomain/imx/imx93-pd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/pmdomain/imx/imx93-pd.c b/drivers/pmdomain/imx/imx93-pd.c index fb53a8e359bc..25ab592945bd 100644 --- a/drivers/pmdomain/imx/imx93-pd.c +++ b/drivers/pmdomain/imx/imx93-pd.c @@ -28,7 +28,6 @@ struct imx93_power_domain { void __iomem *addr; struct clk_bulk_data *clks; int num_clks; - bool init_off; }; #define to_imx93_pd(_genpd) container_of(_genpd, struct imx93_power_domain, genpd) @@ -99,6 +98,7 @@ static int imx93_pd_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct imx93_power_domain *domain; + bool init_off; int ret; domain = devm_kzalloc(dev, sizeof(*domain), GFP_KERNEL); @@ -118,9 +118,9 @@ static int imx93_pd_probe(struct platform_device *pdev) domain->genpd.power_on = imx93_pd_on; domain->dev = dev; - domain->init_off = readl(domain->addr + MIX_FUNC_STAT_OFF) & FUNC_STAT_ISO_STAT_MASK; + init_off = readl(domain->addr + MIX_FUNC_STAT_OFF) & FUNC_STAT_ISO_STAT_MASK; /* Just to sync the status of hardware */ - if (!domain->init_off) { + if (!init_off) { ret = clk_bulk_prepare_enable(domain->num_clks, domain->clks); if (ret) return dev_err_probe(domain->dev, ret, @@ -128,7 +128,7 @@ static int imx93_pd_probe(struct platform_device *pdev) domain->genpd.name); } - ret = pm_genpd_init(&domain->genpd, NULL, domain->init_off); + ret = pm_genpd_init(&domain->genpd, NULL, init_off); if (ret) goto err_clk_unprepare; @@ -144,7 +144,7 @@ static int imx93_pd_probe(struct platform_device *pdev) pm_genpd_remove(&domain->genpd); err_clk_unprepare: - if (!domain->init_off) + if (!init_off) clk_bulk_disable_unprepare(domain->num_clks, domain->clks); return ret;