| Message ID | 20240825143428.556439-1-dario.binacchi@amarulasolutions.com |
|---|---|
| State | New |
| Headers |
Return-Path:
<linux-amarula+bncBCQ4XFG47UFRB6MBVW3AMGQEOS5TJDA@amarulasolutions.com>
X-Original-To: linux-amarula@patchwork.amarulasolutions.com
Delivered-To: linux-amarula@patchwork.amarulasolutions.com
Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com
[209.85.208.71])
by ganimede.amarulasolutions.com (Postfix) with ESMTPS id EF7873F1CD
for <linux-amarula@patchwork.amarulasolutions.com>;
Sun, 25 Aug 2024 16:34:33 +0200 (CEST)
Received: by mail-ed1-f71.google.com with SMTP id
4fb4d7f45d1cf-5c077d8cf25sf2922322a12.1
for <linux-amarula@patchwork.amarulasolutions.com>;
Sun, 25 Aug 2024 07:34:33 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1724596473; cv=pass;
d=google.com; s=arc-20160816;
b=wPkEbzP8aba1ZDbAJiIFE89QI+tJyEiRkIGJFsDkPVH2M3ukuigUYfU9xV+t1umDdB
VcdsGhW0XOAY7n4QZeZdpLbXHv8IELFBRiTsNbQaFkQMc8k5wgfHeYKk3Ftz0pCtbuKI
phPGCsXxOJGJy0JzD9jwTndLLBa9s3tmB7VyHNUVGs3IZSqGC2TXjoKmUpNdlHCV1qIa
hVSvCsGJyTzzuI3L+NUV7kyInRKVhha+7A/2TboIghfmQPkfbxL/0K4bODc0aT7iF9iO
YJUD72fBYAhMU3z2qqI2bGDfo3XYGKIAobC4eri5tQZv4ZSMCI88nxpCl0W4ujwt9KZu
JV7g==
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:message-id:date:subject:cc:to
:from:dkim-signature;
bh=K33jWLDJESJfclfj74p+hB48yzKV8sWz2Uch7ugz2pI=;
fh=FeErJa23Nu27LsUmLr745J8fWGI51uO/SItHUGNTbxs=;
b=xo1gCcWP+H/nP9rE4n5xXfupMrR4FJX/LbyDgFNegPUF7gol6BwHhN4yl6s7bsRXHF
82gbEbrgkCr9wI1YbTfgg+pMxcdL/jXMcZjzoQVz0v5bXS/HV3nNNpwOkC5H/rV912Ua
lyfHomBx0wMtjSMDnl+cSzrxvsp6ETxkAtN0+sTKP5UshWJVqKEh7ay/4S2hrhUnErZ2
istQe8uFdrK99N40NSpGsg5qvOe1T15sWw6uc9DiG63jNXfvGDrKqt9Q9OvPQQzN/YpW
eu0Ch9fsKDj9oAO43phgaEXaMUJp/iutTxnUtbU6fQxmY7jKrlF21vTbuxggsj5R7Phg
2OwQ==;
darn=patchwork.amarulasolutions.com
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=jKc2jUFx;
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=1724596473; x=1725201273;
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:message-id:date:subject:cc:to:from
:from:to:cc:subject:date:message-id:reply-to;
bh=K33jWLDJESJfclfj74p+hB48yzKV8sWz2Uch7ugz2pI=;
b=jNXZ5PzxfAgchjUWEi7OZM96nR0rlzltuavxqKe2qV4gDS14yLlNT3s+03IcK49q7v
z6oVj3jne3z7pYLrQInBfrXRhuNFQ6q1WHlwPWbFOFVTyoigEs/FvkvmMq1u2ZzAhUdI
mnRaUeKS1N/g4ROTcR2mO6APfgVYWaizWIg40=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1724596473; x=1725201273;
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
:message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=K33jWLDJESJfclfj74p+hB48yzKV8sWz2Uch7ugz2pI=;
b=HJxUMmSL9W5k4HHeywLAdVTD6WdHG30JbCcuSilWyJoDfmJLDF/Gtkx7DvJnFcZc9i
Ai7OtKiFz7ULiXXRmdkrFbMXRrsNMs8QuiU+ug84qZsuIPIQhi5MEXQx+/0POhjR8Gll
VYuonqeOrkpKiDD9p2kYR4fwaJYXKRIehn6tSiyboY1gqKAMp8bylLtES839sZTyPdv2
zZa/2Fw82Yc+JJxnHPXjmHgd8aLrCDpV3XCA7lnn0vdPTavpz4oC/YYgArQMGFGsTLT7
Jpy/9W7fxTMzoGQGa9dQNSokuvpYZ1ZPdiAPz/hkb0dP4TAtFsTcWRLxO17IELoNrHDa
LStw==
X-Forwarded-Encrypted: i=2;
AJvYcCXg852veYdVoVP86NBCXu3TwHQJwy+O5cKgGV4D+BjJPOP2YW9DPrQxJCa3Dde+ISintmE6ZBwLX1dfaQjG@patchwork.amarulasolutions.com
X-Gm-Message-State: AOJu0YyvnVUIONyCxbGcKknUP+fs7qeWidzGwShkuTEwY876C2gMc/99
8jDvJi2c3SqlzejiP16iOVA2QNnwDEUrtQ5KLHNZdtMuvnpuM0ztTAcJcQa8GcLcGw==
X-Google-Smtp-Source:
AGHT+IGTdqjVGLEYxTDAQ8iv7wGY2zC0asCtXkd8tFEzMnf/5yciOmTI0tOg+rTwocUDh6WYY7HIdw==
X-Received: by 2002:a05:6402:26d4:b0:5be:eb90:183c with SMTP id
4fb4d7f45d1cf-5c08915f4edmr6961042a12.6.1724596473388;
Sun, 25 Aug 2024 07:34:33 -0700 (PDT)
X-BeenThere: linux-amarula@amarulasolutions.com
Received: by 2002:a05:6402:40c6:b0:5b2:d0b8:74d6 with SMTP id
4fb4d7f45d1cf-5bf62d017a1ls116489a12.1.-pod-prod-08-eu; Sun, 25 Aug 2024
07:34:32 -0700 (PDT)
X-Received: by 2002:a17:907:7f12:b0:a86:8524:2558 with SMTP id
a640c23a62f3a-a86a518a3a6mr468977466b.12.1724596471745;
Sun, 25 Aug 2024 07:34:31 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1724596471; cv=none;
d=google.com; s=arc-20160816;
b=Pls6tCXGss85IaYwuy1SezLz9ZdIKgCKfkw+Ivdkfe1p2W+ARgmXadf6byCSyCEUVf
6dMKZ37N8nBs+pNJkEFIlWMyXp7a1mZf/KvFZPWa/DnJ15EDceDSP2oML5IP0oAl7Ir6
td7CiWCxTMS9gE2W5ulZLxnfc7b3nI/Jb9UxXomt9y7BHYqF32DlVxmlnhbvJ43W4Hgg
DsMGzQqN6vvkhFCnKtOHwxnQf2xyWimCiOADirKl1bhb4k7B6gR3l56bZFpxJSTMf0lg
aaI1MGB73BLGV/G+rbh8HH9kMUwozeAr4DnA3wnPdwLx79Q49JWIABzrp4tPhrgFgrWQ
+0TA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:dkim-signature;
bh=KJCtcmIB3UdIrkYLcVzOIpEPiO2wmd+dCBPvqHnV2K4=;
fh=RMQhmkTu7bgaEiLnzX38Rt+F0277SIPRkD+C67pz04Q=;
b=gQOT3qsjDPYSV501wrzXag4SKqla6RJ3GX2dqgUTjMX9V9Q4NhRxLfpOPdo7UquFyw
2aOYWCrcH7kBBUfY7QwBQ75zrHWvUAVNw8FVEiDHL6SYvp4/hQO9E92WJN8pxkb580oh
0w+lEqrW2A3I1H2ITkI2aQufGNeYfIv8fe4hu0JWmP70oni8uB/8u3TVd4bG4fCoJRSf
idGd4vu8JiG9KFJXlgucj399JOCrlxdZ5nPOxWxuM5wK12i0d/0Xj9v/0W4brWrQapL+
CfauZdwuc/DfJb1C1t5ItSlPTfGE6JvI8bu2Wf0gDyzYu4IAYYRdKIgS5955kX01jzMN
OweA==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=jKc2jUFx;
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-a868f32461bsor208047166b.11.2024.08.25.07.34.31
for <linux-amarula@amarulasolutions.com>
(Google Transport Security);
Sun, 25 Aug 2024 07:34:31 -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:907:7f12:b0:a86:8524:2558 with SMTP id
a640c23a62f3a-a86a518a3a6mr468976166b.12.1724596471075;
Sun, 25 Aug 2024 07:34:31 -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.29
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sun, 25 Aug 2024 07:34:30 -0700 (PDT)
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: linux-kernel@vger.kernel.org
Cc: linux-amarula@amarulasolutions.com,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Arnd Bergmann <arnd@arndb.de>, Fabio Estevam <festevam@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>, Peng Fan <peng.fan@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Sascha Hauer <s.hauer@pengutronix.de>, Shawn Guo <shawnguo@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
=?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-pm@vger.kernel.org
Subject: [PATCH v2 1/3] pmdomain: imx93-pd: replace dev_err() with
dev_err_probe()
Date: Sun, 25 Aug 2024 16:34:00 +0200
Message-ID: <20240825143428.556439-1-dario.binacchi@amarulasolutions.com>
X-Mailer: git-send-email 2.43.0
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=jKc2jUFx;
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: <linux-amarula.amarulasolutions.com>
X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com
X-Google-Group-Id: 476853432473
List-Post:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>,
<mailto:linux-amarula@amarulasolutions.com>
List-Help:
<https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>,
<mailto:linux-amarula+help@amarulasolutions.com>
List-Archive:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/>
List-Unsubscribe:
<mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>,
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe>
|
| Series |
[v2,1/3] pmdomain: imx93-pd: replace dev_err() with dev_err_probe()
|
|
Commit Message
Dario Binacchi
Aug. 25, 2024, 2:34 p.m. UTC
This way, the code becomes more compact, and dev_err_probe() is used in
every error path of the probe() function.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
Changes in v2:
- Drop the extra { } to be even more compact.
drivers/pmdomain/imx/imx93-pd.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
Comments
Hello, On Sun, Aug 25, 2024 at 04:34:00PM +0200, Dario Binacchi wrote: > This way, the code becomes more compact, and dev_err_probe() is used in > every error path of the probe() function. > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Another improvement worth mentioning is that the new output mentions the error code returned by clk_bulk_prepare_enable(). If you respin this series you might want to consider adding that to the commit log. Even without that added: Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Best regards Uwe To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
On Sun, 25 Aug 2024 at 16:34, Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote: > > This way, the code becomes more compact, and dev_err_probe() is used in > every error path of the probe() function. > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Applied for next, thanks! Kind regards Uffe > > --- > > Changes in v2: > - Drop the extra { } to be even more compact. > > drivers/pmdomain/imx/imx93-pd.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/pmdomain/imx/imx93-pd.c b/drivers/pmdomain/imx/imx93-pd.c > index d750a7dc58d2..44daecbe5cc3 100644 > --- a/drivers/pmdomain/imx/imx93-pd.c > +++ b/drivers/pmdomain/imx/imx93-pd.c > @@ -125,11 +125,10 @@ static int imx93_pd_probe(struct platform_device *pdev) > /* Just to sync the status of hardware */ > if (!domain->init_off) { > ret = clk_bulk_prepare_enable(domain->num_clks, domain->clks); > - if (ret) { > - dev_err(domain->dev, "failed to enable clocks for domain: %s\n", > - domain->genpd.name); > - return ret; > - } > + if (ret) > + return dev_err_probe(domain->dev, ret, > + "failed to enable clocks for domain: %s\n", > + domain->genpd.name); > } > > ret = pm_genpd_init(&domain->genpd, NULL, domain->init_off); > -- > 2.43.0 > To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
diff --git a/drivers/pmdomain/imx/imx93-pd.c b/drivers/pmdomain/imx/imx93-pd.c index d750a7dc58d2..44daecbe5cc3 100644 --- a/drivers/pmdomain/imx/imx93-pd.c +++ b/drivers/pmdomain/imx/imx93-pd.c @@ -125,11 +125,10 @@ static int imx93_pd_probe(struct platform_device *pdev) /* Just to sync the status of hardware */ if (!domain->init_off) { ret = clk_bulk_prepare_enable(domain->num_clks, domain->clks); - if (ret) { - dev_err(domain->dev, "failed to enable clocks for domain: %s\n", - domain->genpd.name); - return ret; - } + if (ret) + return dev_err_probe(domain->dev, ret, + "failed to enable clocks for domain: %s\n", + domain->genpd.name); } ret = pm_genpd_init(&domain->genpd, NULL, domain->init_off);