From patchwork Sun Aug 25 14:34:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3342 Return-Path: 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 ; Sun, 25 Aug 2024 16:34:33 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-5c077d8cf25sf2922322a12.1 for ; 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 (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 To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Arnd Bergmann , Fabio Estevam , Linus Walleij , 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 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: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Acked-by: Uwe Kleine-König --- 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);