From patchwork Sun Aug 25 12:36:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3341 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 7E9EF3F1CD for ; Sun, 25 Aug 2024 14:36:37 +0200 (CEST) Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-5343d2af7easf1667054e87.0 for ; Sun, 25 Aug 2024 05:36:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1724589397; cv=pass; d=google.com; s=arc-20240605; b=T8SjtSgWApxDBGOafvYyK/Xnn4JCVLSNQtPj6RrqUOidMrvaTKflOu3H2S/5HJTqKl ROeG2CdlqpbddHDZ0TIm24ZRkVjn0+AiPkiwhkgeDAX/rO6aac2m+EN3g8jkRaSnceIN Mnfdo60IEHlIFyA3+iDW2ZsDqQodJBQ3DjIL9DsLI2czmEc0p051nw50O7gm82NZjS9t ZbKJlRRHYplQlv1rGnLgoZ9irZ8fyM0hQ5G+TKlCaN0qT3kYSZ1HOB+Q802IBs2onBJ8 E55kB2hlN2qIZiMw4bcXb4YJ1cilvrItg4mlrxu+R6ocG/ZZjTwAJBwtxByKDbMOVzWo OJwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=b7p80n42o2hoh8filXZsli1sz2BUucMS0XBTX+hVUzg=; fh=f16rHYNYB29FtyhylchbB89Gc/ZWZzt/5+wyYouKmGY=; b=Qu5G3A32SGlCoUVW/s1D/B3CWQouL2GHCQ05sg7gc5rQJoDFOqi9lp8bwCoa9skcff //QqhBHxfI+K4DhhHgLSPeODNiz7gI/rSSKwbr1ZU0KMFxaBgZ/s0rqZU+JjW++4p4xN GjFX7qwMFFGfEWKkoVN5xsqPyJP1YiT0A5l+JiiLB6NyYI05d0/0XBCxkGpcjTOiX38Y hT33bw9f6460bsHuZerOJCkyFoVBU63czNP6oNwquLNP5K5tYu3+WWB3y/P91aaRXNhH XWDHo+Nx7efLrvWBYwWFBo+kygadqrRSS1mAt/KfQ01P8evXDziagrJZMHreZZ/I/lpi MzHA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HjtS1rP9; 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=1724589397; x=1725194197; 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=b7p80n42o2hoh8filXZsli1sz2BUucMS0XBTX+hVUzg=; b=M+Rg+90tV6XodLTPcN2TsxtqjnSCPitTu1jSElkBoYemcpYnSOWSjmm/Z2NjU/k6ZF G3eSfMu65FSlwvEbTdNvcKHgxmFpXkjicSYyuK6SkamTf3fqvW5oqPiIwxMjqE+i8J0/ K3S09ppZED7ARXv3V/Z1ztYBInkzQBKFrzST8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724589397; x=1725194197; 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=b7p80n42o2hoh8filXZsli1sz2BUucMS0XBTX+hVUzg=; b=cwUMaNYfjuyugQUGR6EoqtAsTdEuXu4za+qZrdwFlQ5ekTo84XeGDEqCH5dp35rGvt Epn5O552Oovw8zaF6aTZb8oxdUt1NCE8RheTWSIuqPp3cBg4FhEs3pfXKEDtclkuCUXd YkmshXUxLmnRIm4+RRUqMMf1qXQ5+SneqMyPX0c9ZqWxvsD61YqeFt2AJU35OGJJSe7K 2sU5ynE7AQ3OsN0sFRUkdtcdHIsfqIIjqaLo/G/8sjeW+1/j0kmE4IBj/XAJlZ+YWi9H zppxDTwjj7+oRrCTwvL1yYN4DAdBsei4ieMmdGRMkIcQA4TWRB+Y258cF3vuZFft2Zte KvXA== X-Forwarded-Encrypted: i=2; AJvYcCVqojq//sVlkEYtq/4m02n/TXg9ovBNkKxBbZqjWLvzlNJc+vZ9hypGOJ0x15vyE8N1HgfZ+A+W7NZ8t60b@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxsfVZbHh0HW8V1slUSTyXtvutzLlj0R1CD8Tz00YPTPUomkJvc 4H5B+RwqR3j4WJaZRw0ZuAPNnbfIwGMn2ObD+q0mMgIP5u/xVzpLRr+2jla6zUgO1w== X-Google-Smtp-Source: AGHT+IEiQ1GsSqEHkzFBBrso4wA39+OK/emC1U45bCWQyI3qOxg/J2fkWV1vf5vE9Yh2jj+UieGtww== X-Received: by 2002:a05:6512:128a:b0:52f:c27b:d572 with SMTP id 2adb3069b0e04-534387c4b18mr4873016e87.59.1724589396754; Sun, 25 Aug 2024 05:36:36 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6512:3c9b:b0:533:4aba:4159 with SMTP id 2adb3069b0e04-5334e116021ls522357e87.1.-pod-prod-01-eu; Sun, 25 Aug 2024 05:36:35 -0700 (PDT) X-Received: by 2002:a05:651c:210b:b0:2ef:2cdb:5053 with SMTP id 38308e7fff4ca-2f4f49372f1mr62184351fa.37.1724589394985; Sun, 25 Aug 2024 05:36:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724589394; cv=none; d=google.com; s=arc-20160816; b=xEk7BctWUdzyQNqER22xjC7vkOcmUTOTKOiyAweMWr9kDXdzJ32gt8F0twx7AQxW7W XeVZd8CQtUQUqqIDQYg7w1XKmPeHmQYfwlPTe+eEj43Za9A9gDQHPX/8P5KdBY/jgvxY jnSop2fg3PSxKS3tIwvbJF1InP+A3AOaeFt/5X2rUrktbpQC8iLp/qnNc73FoYBThS2/ gYvHgpFEGlcNrbxhDnE0rU/Qj5UvtrAcUyylyHaPjwua343izKrJoPz+aohQ+zrY+/UA 6VQ/KpzarLKJbb8Au11hQLSJyvowLSDtM7h0adx8DdY9jZkVVGuWVDDSkRzO2il4dxVh F48A== 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=ShHuxvzlojPRFvc9Ew3ELQFtw3sKey+UcfnKn9H3f6E=; fh=Ydv0qIN3HmdQzemWL0xC8+zT9+De25Whqtbd/hIPbHY=; b=ZlU5ch4aIg2DC0rVqImRtk0XKlHsOXKcoLlfcSvhgywDBRzOUawFeVDvbWo8co5zFG 2KzProcKcVXjy86iRuoQB/XtSBAqPNq0jQ8FBlEupbRPIuh3fUboqIe8OP2syjGXb5SQ FGwxtZwao2JqFzJjZRTqOROt60B5K7Zc4BJpARN3foV+HpvDzjuovYn/ucU7XIjjMHHw LFjzv41CwsQUdWh7hn51sDh1Qjcyv4V4diuJdIk/6JmP3NMWvJosS6Y5OKpZn6gLJkPj EarJf+25axnXyFXBeo1pLMj30T2GQirgxxYjDNV0kelzeINx6yUWf5IRkuMPK3cQ4l7p l6eQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HjtS1rP9; 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 4fb4d7f45d1cf-5c04a3cb041sor1299132a12.5.2024.08.25.05.36.34 for (Google Transport Security); Sun, 25 Aug 2024 05:36: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:a05:6402:d06:b0:5bf:2577:32b8 with SMTP id 4fb4d7f45d1cf-5c089163827mr4756973a12.9.1724589394509; Sun, 25 Aug 2024 05:36:34 -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 4fb4d7f45d1cf-5c04a3e89ebsm4350404a12.43.2024.08.25.05.36.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Aug 2024 05:36:34 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Arnd Bergmann , Fabio Estevam , Geert Uytterhoeven , Jacky Bai , Peng Fan , Pengutronix Kernel Team , 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 3/3] pmdomain: imx93-pd: drop the context variable "init_off" Date: Sun, 25 Aug 2024 14:36:16 +0200 Message-ID: <20240825123626.3877812-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240825123626.3877812-1-dario.binacchi@amarulasolutions.com> References: <20240825123626.3877812-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=HjtS1rP9; 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 --- 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 24e5bfb336ca..cc848f63219f 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, @@ -129,7 +129,7 @@ static int imx93_pd_probe(struct platform_device *pdev) } } - 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; @@ -145,7 +145,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;