From patchwork Fri Aug 16 07:40:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13765632 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 DD4B7C531DC for ; Fri, 16 Aug 2024 07:44:12 +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=oLYARa5Ui+tGIF4Drvfs6StvA2ztWhGcrNefYFJRi04=; b=J/zOQXbJACxeNY GVxn981xB01rt8bgI/i8XcspszVeGMrg0wqSkrunP0OqMMBHz8rk7kx92jbUny09b9EoY6t/g3hDY 06OwOyh5vScPt20Qkow4sLV2MPp+373fySsXQrc+OFKfoYFiEuAc7gOlliBJZEZIXIH9hqd9/MLG2 QtL8wdr/HInj+manoKFqRl115/Ir/Mz5/Xg4Qj/KQb/IGfm6twuLwkLtjzZVC6DGMv+TI0o07+VOq Cr6uUMa+LRl5pXtIt4wEB4FL1odaHpc+gWcNS9TxWsxYtA+n5Ax7Afwsm0J5fSJWsfb5C/O4ZhPud U0VbWXOOGy12X/0Ty6oQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sercs-0000000C8ri-1Ecq; Fri, 16 Aug 2024 07:43:58 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1serZm-0000000C7yn-3Wq9 for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2024 07:40:48 +0000 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-52f025bc147so1997298e87.3 for ; Fri, 16 Aug 2024 00:40:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723794045; x=1724398845; 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=oLYARa5Ui+tGIF4Drvfs6StvA2ztWhGcrNefYFJRi04=; b=X0uvuwoWS5LpvgMYIE3rr/AWGKIf8PAQWh0MFaAqGvW5uHKEePzGEiHNuAkwa7vAkQ 8cRWl3cYrbB6F1hMwOdgzPSE9qCE5ZnTP5iCHvVnnXzLAA7Ouxj2jijXAUfz/3LzwfH7 LWbla9QZYkBoxBzRxMVlv2DBO9GmEtWS81G2/d5ZGfpMi18TEYjyMU7qF57iC9gZBBa8 CCe+AhkyMGVq+1/HM1VVHTvRo/NQMHBMuQiH40KPh1SvSiCZdGqBT20fI1JxljNpd2DG D5pXfM0hhMERvDeBdUkwGOIf7rfmepeLjXbKLBL4Ku8rWvfkm3Hf9dJJfoLSPzr38bCx NGYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723794045; x=1724398845; 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=oLYARa5Ui+tGIF4Drvfs6StvA2ztWhGcrNefYFJRi04=; b=YG1dgbDSsgqBXO6tWA/i5jDxurk4VHO8VwNa9JxP6DcDc4FZk2luTpZAGVloj48azv aoG3/sAzCNeh4pAtNW0fWFADRtIzn20VRcS5rdjpANtw82DTg6JDTk66emBTKW+qrTtL iW5OHDXImVHXVamcfS30ahrNhja8KEj5LpWV51X6SHC21tGrC4+y7+YKv7lgab82RjBj FlyHfCRmE/5t4o1PMjDvv9a4mgOb4hEKD0yUBE9BvZtlOTSy5yeHE3Ab/M2VkybRU7wT k44AQAeIwCi4eFcmMoIUb5A0OPzooBDWb/gMowsKWScNtijQIBbdYHWAAMkEYYxy6WEy 1DnQ== X-Forwarded-Encrypted: i=1; AJvYcCU9HzEf96g5ksPwAjbbBLdd5/OBpGdbC+JJHAscaOsTRWOQ5sGlR5BfYxVpPByhGQj4M+qRnTfhDwbfyW1y8RS9HxLTaPjvqaMYMXDWPTstDNfxqbM= X-Gm-Message-State: AOJu0YwxcJ84PK1TE0VRp2YwSzZ1KrTkYMxGZgr5pSDod0wihs2ddzHS Qr5wL+cd7Xq2ujbot6RNmMA4VAW0AZgB6UFBHAutxqA3fZHjkX2ZzcLWhwk4VHs= X-Google-Smtp-Source: AGHT+IECMU95MInedHm3gbs2CHg4muyRBBX1uWExaMf/N75tHvOw4wx/iPeO0uthtOMnMi5peo1F6A== X-Received: by 2002:a05:6512:2243:b0:52e:7542:f471 with SMTP id 2adb3069b0e04-5331c6ae178mr1434653e87.29.1723794044597; Fri, 16 Aug 2024 00:40:44 -0700 (PDT) Received: from [127.0.1.1] ([178.197.215.209]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded3596esm68549625e9.22.2024.08.16.00.40.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 00:40:44 -0700 (PDT) From: Krzysztof Kozlowski Subject: [PATCH v2 0/7] thermal: scope/cleanup.h improvements Date: Fri, 16 Aug 2024 09:40:30 +0200 Message-Id: <20240816-b4-cleanup-h-of-node-put-thermal-v2-0-cee9fc490478@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAG4Cv2YC/5WNQQ6CMBAAv2L27Jq2NkA8+Q/DoZaFboIt2QLRE P5u5QceZw4zG2QSpgy30wZCK2dOsYA5n8AHFwdC7gqDUcaqRlt8WvQjubhMGDD1GFNHOC0zzoH k5UY0pmqsVd5XfQ0lMwn1/D4Wj7Zw4Dwn+RzHVf/sH/FVo8La6WujSVempvvI0Um6JBmg3ff9C 8Khm5nRAAAA To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Amit Kucheria , Thara Gopinath , Thierry Reding , Jonathan Hunter , Vasily Khoruzhick , Yangtao Li , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, Chen-Yu Tsai , Krzysztof Kozlowski X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1525; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=wuCXCMKv9neHue5RT03UZNAev0xxb0NHHLIG6HZkums=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmvwJxjlTKJcUNuxE8Zfq158zszP22govEMhUHg fY+uH8/VraJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZr8CcQAKCRDBN2bmhouD 1wF+D/9hn91FpwFdRVcHZWu6wnT364nzLzQQH5lm7ypWYurQPKsmy5wCaMYqmuXWG/kIIrbpmTR JUZGGUmY8GwfsZr2cH5hEy4MmHdoq3SjkotIkGanVjqy9xIYWQVbA+M5OqK2ccUBXMDJfXDO4zI 1t9QO2GslHt4f3RA+omwit8PVKGGsh6ggn3PfWPmpajExMzJK8S3uIKxVcao9x4orr4HJ9MpZ7z yjd9XPJScq54oB8w7EfDTwxQCNI5G/oFWYsuigh8e+3jFh9OuWwmkio2Qo6mlm+J54PcbmrtFnc qfhZRdQKqlBoSfaAKZsX6aooFB/uyLCxyek0SJBo3BPOkAnWrXsibpkuLzBsJn6iGb4bENdzkcv bE38ZWujL1WltBof3/+lFW2Izcq2PkSNgoHR/WRmDV6TD0LShM03DqBx/DG0CrkcqypS0bObiGQ BhHtuP2hOXLwV9u+S0/5xkin0svFYO4NZiwlLenQYPdq1W0U9birYpQ/S5IhvbsjjZF+dRmaSsg v64snsoeFskgdv/BtgULWh2ja5pGB5MZJ+cutoTqzmdBWoWrEmCpZfdXOmFIp9iVS7ExGULbhNS kdLR94qkdKYE99rYyVne6Smn/Wc1h/g/bJ+qbGmBFpYGwQ2B4eRTHdy45v0r0PGT6wYtLfIvKFu 76SkMH3Jr+b3r7g== 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-20240816_004046_931905_972FEF21 X-CRM114-Status: UNSURE ( 8.12 ) 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 Changes in v2: - Drop left-over of_node_put in regular exit path (Chen-Yu) - Link to v1: https://lore.kernel.org/r/20240814-b4-cleanup-h-of-node-put-thermal-v1-0-7a1381e1627e@linaro.org Few code simplifications with scope/cleanup.h. One of thermal_of.c patches depends on my earlier fixes: https://lore.kernel.org/all/20240814195823.437597-1-krzysztof.kozlowski@linaro.org/ Best regards, Krzysztof --- Krzysztof Kozlowski (7): thermal: of: Use scoped device node handling to simplify of_find_trip_id() thermal: of: Use scoped device node handling to simplify thermal_of_trips_init() thermal: of: Use scoped device node handling to simplify of_thermal_zone_find() thermal: of: Simplify thermal_of_for_each_cooling_maps() with scoped for each OF child loop thermal: qcom-spmi-adc-tm5: Simplify with scoped for each OF child loop thermal: tegra: Simplify with scoped for each OF child loop thermal: sun8i: Use scoped device node handling to simplify error paths drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 7 ++-- drivers/thermal/sun8i_thermal.c | 11 +++--- drivers/thermal/tegra/soctherm.c | 5 ++- drivers/thermal/thermal_of.c | 62 ++++++++++---------------------- 4 files changed, 28 insertions(+), 57 deletions(-) --- base-commit: aef749dad7ff4c301e91b21fadf30776c1495fa8 change-id: 20240814-b4-cleanup-h-of-node-put-thermal-2268440cc6f7 Best regards,