From patchwork Fri Aug 23 12:51:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13775129 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3D34BC52D7C for ; Fri, 23 Aug 2024 12:52:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=v6VRAUboa3WzQTgQJ0jIxMCacKDHDbO46atHYsrK+XI=; b=CBofE3+o4VWCsn GTwqQ2YIm7lvl8qd20XF8mIMCRk19rjvVapnpQQBu2SKoCs3qF63ji1JjqwVEctjePdO67ym4XRLZ sO9aFQkjrnb5d/hOgOAJYJE+Opuw/s6yhDJsvRBKjjfgyPGjOrGOaTZOqwoE438W93h372gElvNza 44NgdngcF+iSujUtzt7JeUFv5M0V8/WmDaC3ScFLqgfxH1qdNeTk2TP116nWKkV53eAGXnzoLJUzi q4k+LvD57ODtR0faajj48I5E4OKpHn6fOjPX0OYFuAJJnWXt5e5V+/msj+JSNIJgCNmojGhIumSBC JUijoIJXZWJ6m3K2j/iA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shTm5-0000000GlLL-3gvY; Fri, 23 Aug 2024 12:52:18 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1shTlJ-0000000Gl7a-2Noe for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2024 12:51:30 +0000 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5beccb39961so292879a12.3 for ; Fri, 23 Aug 2024 05:51:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724417488; x=1725022288; darn=lists.infradead.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=v6VRAUboa3WzQTgQJ0jIxMCacKDHDbO46atHYsrK+XI=; b=dqEuRtlDmOXcUPFFgDV7AmcPv5hsDg82NEaipv1MbYorYbWDGwWMDC0R0S/S3J1D9a m9tZlIi505rgpr9t7eDPLrylPcHWr22eL/Koli4n/rqElilkC4yi1JiSoTO4sbIhm0vf CLx03xR5+yNjTOiInKItMsqlRhT3h+kWw1pYTtqq65m9gGOkLYSuYgMCDYyyrEsiAYEQ NsBWx/WkEwk/ibu4lHPVOtEInU3IfRHzRjapsi/zg+KUrtM4CTs28VljzBS59wCrYKeN 84BiNqBKnbseaa0GR0+UXWxzKmwDtTCrckoyXZLlM/YnpByKZ0AorCSDcaHLbXkhSJwd cNrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724417488; x=1725022288; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=v6VRAUboa3WzQTgQJ0jIxMCacKDHDbO46atHYsrK+XI=; b=RvvXLqmLXOXd7LLvhvXfE7o4Ljz0XUopGxSLFmSrBiW4STuukr010SiG/OVJ972la7 zj5xAeUlfLY0pNo4lMYYuL4683j1j7KoOxyNc/DKQ7VdyzfDkKB6XEY5fuDlzoSb2m79 G+84d7YMAmQUNOu4zjyzNvdLBc2sBbi9NGSQmzIp9/277nxn0NDtIU/VNT/zHNWoXuBU iRITfiiyk26GVRSqO8JyNgfl8SohMX9I4rZ/saXnmfQdebKXTFozQFLerKceN5reieCP O5Gd1MHH+fYC/dB1odFgJOi67n/PER/ebvfrO7kiQ+4Ctv/CYJBbky/jNDjF9aCJIE+2 2Vwg== X-Forwarded-Encrypted: i=1; AJvYcCVLKLlF5eI3SFZDO6+eD1DT0Al1vjRLI98TsxOX1zfM65AKXK1vrLByui74O/fiIsvQtE2mdN/8ijBz5I5gCSaR@lists.infradead.org X-Gm-Message-State: AOJu0YwTkFWqn60el+UXII14l4GXfP+a4ePD2RcxKrf+uKhEHTZmYZZz z0naRh5Vy1H0t4dEFcUxUVKsUjOGGAVFx4IY/Ge8sz48KuPS2opICp1GtKJlxr8= X-Google-Smtp-Source: AGHT+IFIw4ZV5rZ6uPAb4nJL/OhmF0EN2Y+olYkcjQZWRyRIZCTqIZuXXX1ufsuaXoLSxxzdDu3Uwg== X-Received: by 2002:a17:907:9724:b0:a7a:9f0f:ab1b with SMTP id a640c23a62f3a-a86a54bb7e9mr71228766b.7.1724417487610; Fri, 23 Aug 2024 05:51:27 -0700 (PDT) Received: from [127.0.1.1] ([178.197.222.82]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f4f384bsm255931666b.192.2024.08.23.05.51.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 05:51:27 -0700 (PDT) From: Krzysztof Kozlowski Subject: [PATCH 00/10] pmdomain: Simplify with cleanup.h Date: Fri, 23 Aug 2024 14:51:04 +0200 Message-Id: <20240823-cleanup-h-guard-pm-domain-v1-0-8320722eaf39@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIALiFyGYC/x3MTQqAIBBA4avErBsof6C6SrSwHGugTJQiCO+et PwW772QKDIlGKoXIt2c+PQFbV3Bshm/ErItBtEI1XRC4rKT8VfADdfLRIvhQHsehj1KTbPqWye 166H0IZLj53+PU84f0fUIrmsAAAA= To: Ulf Hansson , Heiko Stuebner , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Bjorn Andersson , Konrad Dybcio , Geert Uytterhoeven , Magnus Damm Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1576; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=doKufXAKMRNCsn5SPLoA4KKhEyeldEXGGKtTRg28kUg=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmyIXBrIW/SnJDYANEVfUZJeHlBLPHoJYAFcIls LKf1yo7+J2JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZsiFwQAKCRDBN2bmhouD 10UID/9Be979xbWnI1yNlRdhU3gmdGm2uSL6tdqrVpXd81h6X7rzBxahTfI/Hzqbt97F/oueKjk j2CZtKc4mia7EB0naYB6Y2kYe/UYMX7hzF5nBqcZm3y8GaKUiS5Hnkf6osuRobTRmTavNDPc55M tYm6P+KvXABS/esDPWw5kNpcjN2MuvAY7oZXwM8/pJ4VFAzVuH8agIayXftS3DQHLjfiLkSKlVo HJs0moMNU2y8bXR1TQyyLdYvVFSBD4Nf9qtEzxkZmsJkqwRx5z2JZd6dS+Pm8JzFVG51YgNHvfK dRT7vceacHyYZm3q/1e+eHlU0u78Ap9USdAlPpoqIlXOq1qkZ0v4vGyfYM2TIMp2i9Mc8qfUAyN sjrpEmfY3Torcb4TTe0BI4EZAGKS9MOAKUNjZpyM9bZpM/hJAwFMaa7aTzHjt/qgQn4Rt9mtWTF U7YDazP9uDvq7Xy7sbYqPtLVBXnth2hn0+XPGjcgaq3UU8gPz2rfpxEQX0t9UiKyrtsHAbdtH/y n5ggehcfh76LOc2Qr/lQErudzXIqhDm4SibFNAsH24bNzONwGdSJHQ0xx6WxWr7MpHEqG0XxOUd AgbTG2xDIIdB7MXeKSlddcEt6AG/9fcfCaJ9ejr7c4rYlUL+9RdquPPiuJUcqy+/SEGpr7bbC93 DHJTA1zS+8Bow6g== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240823_055129_644559_7DDAF4A6 X-CRM114-Status: UNSURE ( 8.43 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Simplify the code with scoped loops, guards and __free(). Best regards, Krzysztof --- Krzysztof Kozlowski (10): pmdomain: rockchip: Simplify with scoped for each OF child loop pmdomain: rockchip: Simplify locking with guard() pmdomain: imx: gpc: Simplify with scoped for each OF child loop pmdomain: imx: gpcv2: Simplify with scoped for each OF child loop pmdomain: qcom: cpr: Simplify with dev_err_probe() pmdomain: qcom: cpr: Simplify locking with guard() pmdomain: qcom: rpmhpd: Simplify locking with guard() pmdomain: qcom: rpmpd: Simplify locking with guard() pmdomain: renesas: rcar-gen4-sysc: Use scoped device node handling to simplify error paths pmdomain: renesas: rcar-sysc: Use scoped device node handling to simplify error paths drivers/pmdomain/imx/gpc.c | 14 +++----- drivers/pmdomain/imx/gpcv2.c | 8 ++--- drivers/pmdomain/qcom/cpr.c | 58 ++++++++++++------------------- drivers/pmdomain/qcom/rpmhpd.c | 11 +++--- drivers/pmdomain/qcom/rpmpd.c | 20 ++++------- drivers/pmdomain/renesas/rcar-gen4-sysc.c | 26 ++++++-------- drivers/pmdomain/renesas/rcar-sysc.c | 28 ++++++--------- drivers/pmdomain/rockchip/pm-domains.c | 25 ++++--------- 8 files changed, 68 insertions(+), 122 deletions(-) --- base-commit: e188fd67a69319f3d105d9b90e424b8d1ff9580c change-id: 20240823-cleanup-h-guard-pm-domain-35eb491f35f9 Best regards,