From patchwork Sat Jan 11 18:42:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13936136 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 3A417E7719A for ; Sat, 11 Jan 2025 18:45:53 +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:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JrWgmrs35qmM7zcBJM5ziQC8fwc8DVMRLjP8FP/is9k=; b=NKjFOTJnI8VAoRUA/SjLeLkVCN rsxPpYpOqDZmKz1LQudz5NsmJQbGUDaxIQkolcLU2/Ekz6TSD4fbFVqjlxIsbhJ+1u1ch29F3CKyX IdzKkW3pQpxtDL8xUzA1wKH+mqZXqy6/qexfT+Jy4G0x+eRftbVNFJ5zTTKNxYSqn2LUFzHrXIxqZ rqrg1buBhUGCRgRKpjIwbGzb5a/hrFpUTNuK8KepvwABh1H3+oEgmDOEWDNBkw45sIAXMk18Hbjrx 1juVxRSiQO7u5QTWHATq22F1Dji7qoYFQmRZV3aQPYU9OViDxKZRSGbr6M6kcFFEFqood5ZZGnO8P GbKGZUXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tWgUP-00000001GN6-1Q0L; Sat, 11 Jan 2025 18:45:41 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tWgRy-00000001Fc6-0tDI for linux-arm-kernel@lists.infradead.org; Sat, 11 Jan 2025 18:43:11 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-385e0d47720so236733f8f.0 for ; Sat, 11 Jan 2025 10:43:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736620988; x=1737225788; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=JrWgmrs35qmM7zcBJM5ziQC8fwc8DVMRLjP8FP/is9k=; b=ISVulYMmb26/VQjIx/ChEEZw3cHWy3h3txV0DKHBEUUmkQhiroPDO9sFNHm3FM2NOl Meg/e9rqz3j6REV8EbgAPUglYY4Ien3Guz5hKHfPjuJ7LWANH8gTjiVU54kr7NUmlLOr ybVoPOebH93hzS9e+mG2AcEMKoKOmKWEny2WTKLzSIkHJiDqWv/h/Fe5ortOwGAokiI7 2p3VFR8FsvqD6QVBWUCIO9fthtCKUh7G4uY9Y9Li1ohoeFB3uUpWrgi+DQDuRENzxfVU 7fPldWyWIbiJ7LrPCwJpSNlz1nOrC/MLAyrs7v5qTsk4tpavKAvNnGWjSzKTwyxsNAls /QZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736620988; x=1737225788; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JrWgmrs35qmM7zcBJM5ziQC8fwc8DVMRLjP8FP/is9k=; b=spUUTgH8jymmlp2sRuz6FVKrluQfxtljcMA3M6VotB4845cFH31byb5lzLKg+ywe4d ukqflEWrlOqTIlC0vVXO40M8ibD3V1vxT+CUDWS4/hq9sVpektL/IqL8S4VQnYdCm/Fd pT60KMv4eLxqkjD88uuAx4JUPN1E6MWM8PRE6Qb2F0A9vFsIcXrAFLxgTf6Jy4g/b4jZ wEdoKMZgMqFLriUJVdjJ3s6Yk/9krJvYGvZLvlV+edZFKdIA+94eH7CEHOYAqmUStkmi Zvi0CgRYQzbjyCDJt+XEXjb1Gew708KsoAByVsmOKNxSRDBV6jxjEsEN+dJoc8zw5gDn +D/g== X-Forwarded-Encrypted: i=1; AJvYcCWTwTqvIsPFBnlti9J3gDPbsemqdiaAwg6SmtRX4l7fil6M1fjHbO35Zy/GbDXA/1JkQbpcRQIR/ON7onwoqlUj@lists.infradead.org X-Gm-Message-State: AOJu0YxJG04wjIC+h5G6fCx+fPzseqTsef1xpw0SM1bDJ5eMSSCOxVwH uemtv+3QzD0Hgd0Msc4PMaFQEURxVBeGjgKTCnJwD5TFIc2s44GYGGKILoML5U4= X-Gm-Gg: ASbGnct6pJ3hlrOIxFPPXVu7aWe1xR8pEsvcAzI8bGul090lejcIXp6o5EZ5t641Iyi Ww608STUiydPiN1uf22NB2PjAstAiO6byZ9QuC70NThwLvhdYKBSeMn+BElTG4ZGTkRvV9Xz2Xu /cJgfWoqfVetWrobXBx3axNOdezn64kgDPT4kB7BY3yvnNGk6iySPiofvkQQ3ZGOqUrckITzAEO I0PfUWW/L9n2TH3D/G6AvpJg+dNXEeItzSdyLJMKSHI1gMvwtn2dWwrhdD2T0oeRGojXsHz X-Google-Smtp-Source: AGHT+IFKDnROQFshibfBSRD1Lf3riCi0exaKnWhO407hgCFDnzE6W++oH5UDeHTKmJMD9omzpTVJLw== X-Received: by 2002:a05:600c:4f03:b0:436:1ada:944d with SMTP id 5b1f17b1804b1-436e26ff7famr56841985e9.4.1736620988522; Sat, 11 Jan 2025 10:43:08 -0800 (PST) Received: from [127.0.1.1] ([178.197.223.165]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436f9bc6b9bsm205885e9.22.2025.01.11.10.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jan 2025 10:43:06 -0800 (PST) From: Krzysztof Kozlowski Date: Sat, 11 Jan 2025 19:42:49 +0100 Subject: [PATCH 1/5] remoteproc: keystone: Simplify returning syscon PTR_ERR MIME-Version: 1.0 Message-Id: <20250111-b4-syscon-phandle-args-remoteproc-v1-1-73ed6fafa1e3@linaro.org> References: <20250111-b4-syscon-phandle-args-remoteproc-v1-0-73ed6fafa1e3@linaro.org> In-Reply-To: <20250111-b4-syscon-phandle-args-remoteproc-v1-0-73ed6fafa1e3@linaro.org> To: Bjorn Andersson , Mathieu Poirier , Patrice Chotard Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1302; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=dxtKqbdRSIen5PNncZ7Djuqqg+VHZ66erVjbW40h3Ag=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBngruxgmXjE2NenPQvILvqAG52ACPXhjQMaq/PA y+Mf4jh0fmJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZ4K7sQAKCRDBN2bmhouD 17TWEACEqyJNLB/LphpIvS2gKLrGdhyf+saL3KcUE2FQkE6z+o40bCffqSAEHgcaCVxCzURTM6x Bqz8k/RXxeMwQ+rHvLRbOS3cbtI2KRJSYQAmilUBHpSRMNuqPzNVTbOIXdjAmEMVYXrV8U5I+UW 40OcL61dEQsfnLkT+OywO22JSX1hWYYqmj/OavGgivZiriwr85OJrqI0chsTmGUxqWe3vQrHxhh 6kHn9ifUFxPaUsZLnmrcWOvWzuB93Hl/Z8NTmd+za/Xw9CkYs1oNWOZNteeLQoeh7M4izktjEPb wfGb6/RwhEN7XQbyrKiINfzoBPldqiVnrZ9M8pN2SAavWdRUlE8vmoIZBfgNaLnvDyp/nxT/Mju XW2WlVOocPc24DoQS6LhvWyCMww63DBPnpL3W83ECdcZahDdzinWFF/G4EdfZfQ0iwQpnGM8bYM oIXuxfV7XR1rX1sFC9L46DBybMDiig+YtreFlVN2sz+ZrvvPF2hOsQPfddA60Z6nTWDGfZMwr0F IO4uAUkQfJTq8xE16NNFwik6aEgOiRgdi+2Lp2G7tNoz5062D4z2EXKQVC7fRpH8S2qbXClz2j4 Ayu/WKa8rwbi0O/SGedETwp2Mv4EgJMRCpAxpioix2tmoyFISTSwuEba8s2OAm90o1h8h+JkaOw h9GFaheuc2AYC9A== 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-20250111_104310_254821_FED54AAC X-CRM114-Status: GOOD ( 11.66 ) 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 No need to store PTR_ERR into temporary, local 'ret' variable. Signed-off-by: Krzysztof Kozlowski --- drivers/remoteproc/keystone_remoteproc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/remoteproc/keystone_remoteproc.c b/drivers/remoteproc/keystone_remoteproc.c index 6e54093d1732314d234e85bf6cf7fb6f1d9bf994..83c8e568f7ce3ec3ca3a534d2566f6437e9d403a 100644 --- a/drivers/remoteproc/keystone_remoteproc.c +++ b/drivers/remoteproc/keystone_remoteproc.c @@ -335,7 +335,6 @@ static int keystone_rproc_of_get_dev_syscon(struct platform_device *pdev, { struct device_node *np = pdev->dev.of_node; struct device *dev = &pdev->dev; - int ret; if (!of_property_read_bool(np, "ti,syscon-dev")) { dev_err(dev, "ti,syscon-dev property is absent\n"); @@ -344,10 +343,8 @@ static int keystone_rproc_of_get_dev_syscon(struct platform_device *pdev, ksproc->dev_ctrl = syscon_regmap_lookup_by_phandle(np, "ti,syscon-dev"); - if (IS_ERR(ksproc->dev_ctrl)) { - ret = PTR_ERR(ksproc->dev_ctrl); - return ret; - } + if (IS_ERR(ksproc->dev_ctrl)) + return PTR_ERR(ksproc->dev_ctrl); if (of_property_read_u32_index(np, "ti,syscon-dev", 1, &ksproc->boot_offset)) { From patchwork Sat Jan 11 18:42:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13936137 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 D10FCE7719C for ; Sat, 11 Jan 2025 18:47:05 +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:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GSWM4xAa3F4ckNNT2rCjA6WUCAPjzPoqRakDwXZXtqg=; b=1mBPRWvo7XkEKk7Qh5a/msDE2a DfAAmeMa9Kc3hm/iWsCVayVVgSAg1XCQrkK4ma12wCWz3wuc+nDN4Dd1Pgkukw2xJPTMERTAzsU4b +mx3oA+XjxL4sORYuahdViD2sxTWa4oR0wUHnA02i/O16+NBHTHcc4oVYbxh7BjaxrxwHK/+Mdxk5 XMtZWrOlvhY4mqsH2FJUevqQwFPe08+ySzxWFrObQ21Q+gxvHAQzDgmbdKRpirPYiqaoHIZMUOiEV sKRagSYNl0RRAT0cI1mInb0/tjGyUEltx2YEzt7Y2jLPzCOOPKNZ341PIPtaXoxl9Ayzw2imKSbYJ NGfcrsPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tWgVc-00000001GUn-026s; Sat, 11 Jan 2025 18:46:56 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tWgS0-00000001FcS-17Zk for linux-arm-kernel@lists.infradead.org; Sat, 11 Jan 2025 18:43:13 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4361e82e3c3so4372915e9.0 for ; Sat, 11 Jan 2025 10:43:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736620990; x=1737225790; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=GSWM4xAa3F4ckNNT2rCjA6WUCAPjzPoqRakDwXZXtqg=; b=Ha+ga19gnmB4gqNy3eki8K6uQFZcJIw5/SJGWk/WOxekaHPHid18vlQ1xXhO/o2bG/ PwhHf4IvWIoqJ2GRhfbkLGZzuVM8Eth4yW165a4JaoXerAaTjRctsBCL6CWPj2AuCo+a tIqLwIW5tA3/rHR9FJr81I6WJ4hC+9H/M5/ZoDgIrH+T3XZoHy2sTxGL/g4bArHETWj/ Tvv5FPzdB5czQn4WPNR055NsyvwPLCaSNhtViXFToMaIJCfR8vC0ivUBkqFQUVTQwL4c I9VtifI7od48nuDW77Weog9aa4RHSiCDuIarsi+4ifCC+XB7Cc6hvYGCdg9OSq5itD1r 9Ctw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736620990; x=1737225790; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GSWM4xAa3F4ckNNT2rCjA6WUCAPjzPoqRakDwXZXtqg=; b=nc2jHIDiZviYdY/+4YlxZHTI8s1N5dC0M2Y7XPufkI6nRIzAkTp7GN/LH4+fwLMZi1 ALXetOZYslD9NSEAIjYvWHHx0AvLkAAr7t+KavMA4zrW77BbA+YX/m8UVrbladTkQBSb UTu1d9wkY0dS5zgqGVZQn1jJbFGI5A3AiQUgvMli8DKXDq4fS1tPZlPLczvoK6iMbSW4 NJZy00++dBi+7Y+DqG8aW98vy97o/KFTZim8lN1J5trDJR1LKWoM/+m80azPvU1ynDZR QBGGPuDYB6euLlOTfOfOdL/Z6a25ebHe3LE1/2Le96GLGonrWm0Uc6JNfDDmtyTMBKj7 eT8A== X-Forwarded-Encrypted: i=1; AJvYcCXUGonzahQRVjFNXzr42EpjCinNjApKhPTy3XjLXCQZgGYr15pE+51THXwI6a7zcof6B3G51TpEkV/XQk2DuqEF@lists.infradead.org X-Gm-Message-State: AOJu0Yz4wJM20/vgcv4GfFXu3eEwQwHyU4lDi3VjQvft/e+I6ZAzJ0su nJfofsjyDW0vXr7F7PWOhGF5u8O7QK2aBPFkRKghgK8vr8wf/reZMIQZ06C3L2b0OrBfQ/Lxn8q r X-Gm-Gg: ASbGncusQCK6uXLPHs3N8GPAihP8lKJ4NnbWpPDatZhfQWXoiNfE8h2PeMPWgkmvxeE 5h1wUfybtVjBC/2SG7SeplDsg5asPxBDtTSw5F+vdFtKltCJ2+c6CDcovJOpzm9xWlNismJffFA /4faIeNBHRXo9MVaZcm1qd1L9xMbnVRihFpWA83YTA6FEjV+pqmbws+CPcVHxJ0YqNiyudNiVhV NwSW5YDWxCZlhIJXUXoDnMe/3nyPdoJTGPojEbuCow0KoM1EAxYgULfgmcHsNNs7e88I3L7 X-Google-Smtp-Source: AGHT+IECs0vQ4xGmYsqqwraczYKPphscfapxLBfYSJTZ3A0WZWrloSMYovDfByM3Hw1oG9LXyt8FmA== X-Received: by 2002:a05:600c:4f14:b0:42c:aeee:e604 with SMTP id 5b1f17b1804b1-436e27170d3mr54335455e9.8.1736620990615; Sat, 11 Jan 2025 10:43:10 -0800 (PST) Received: from [127.0.1.1] ([178.197.223.165]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436f9bc6b9bsm205885e9.22.2025.01.11.10.43.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jan 2025 10:43:09 -0800 (PST) From: Krzysztof Kozlowski Date: Sat, 11 Jan 2025 19:42:50 +0100 Subject: [PATCH 2/5] remoteproc: omap: Simplify returning syscon PTR_ERR MIME-Version: 1.0 Message-Id: <20250111-b4-syscon-phandle-args-remoteproc-v1-2-73ed6fafa1e3@linaro.org> References: <20250111-b4-syscon-phandle-args-remoteproc-v1-0-73ed6fafa1e3@linaro.org> In-Reply-To: <20250111-b4-syscon-phandle-args-remoteproc-v1-0-73ed6fafa1e3@linaro.org> To: Bjorn Andersson , Mathieu Poirier , Patrice Chotard Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1310; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=fWYltI4xM/KDDIH8KFL0uiLtzD8nY+Kjalail67u2Hc=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBngruymH5IcFgYiymLuIIna6pft0HBEyMUVO7El 2ttiACWVGKJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZ4K7sgAKCRDBN2bmhouD 17gFD/4+1JVyb2aRlgR8NEL4n+4O90KtSJz4kqJMdeGGUNV1Ohj6Y6AWtKMEdSq3NfQnBom2HPS EkgOJdgGC7D2Qa6O8SUtSNRRTsQapl131iDg0fldAlnhyCi5N+N0oSvtjc9GMJrlfDhVJaBl61s PmL2+vk9b7x5TX6MHlbuG100rClHpr8jFoP020URdpbfwZ18pGVaNyKT/wxANBeSLYX2cGtF6bf gBjBeNdd0oGAdbkDEL5m/kyxtibo4AZj50NRR5Un73S/dqn+aCBde7ittIXnoJkpGkq1Q58QPaS CaD8KQk4fxXAE/r/c7mxCH3ERV5cpRdUKnVK3Lo+IZ6+w9iuOr8J4ZZwLweWkNFhAbfzg8bSYJP 8RFEYWmMD9VblWeBzD/V5lwGVSDzDTPeVqozSpgTK64mcaobtM98ae01pTkT8/FKq6cl+/SPTns OtmneVgj4clWsAhQ6UXeOdVvt04Rxow3XOijZqtGFebZJ9wfzMz4PbdV9NLf3ovkOK0VVh/lAGK ZVXL8HSLEBgZpUl/giEQ6qL7tG0VsM85oKamuZk4YO3ozmcALAVOjuTxrEPT99uaNMn6lYT3z3J ZE85re7iAH/ozV4uGtU6fAfTiSaLuUMVhNlBh+GDdIh9z/rv7pok8bR71II7/7Ym6g3u6PwaiVn j1//l9IGlqsOGxw== 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-20250111_104312_309941_14A60A8D X-CRM114-Status: GOOD ( 11.42 ) 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 No need to store PTR_ERR into temporary, local 'ret' variable. Signed-off-by: Krzysztof Kozlowski --- drivers/remoteproc/omap_remoteproc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index 3260dd512491e8920fc881b6a7c0d9b6f725e7f5..5f463937cbbff2c9ed5b22bed42454a0ae290f0f 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -1137,7 +1137,6 @@ static int omap_rproc_get_boot_data(struct platform_device *pdev, struct device_node *np = pdev->dev.of_node; struct omap_rproc *oproc = rproc->priv; const struct omap_rproc_dev_data *data; - int ret; data = of_device_get_match_data(&pdev->dev); if (!data) @@ -1153,10 +1152,8 @@ static int omap_rproc_get_boot_data(struct platform_device *pdev, oproc->boot_data->syscon = syscon_regmap_lookup_by_phandle(np, "ti,bootreg"); - if (IS_ERR(oproc->boot_data->syscon)) { - ret = PTR_ERR(oproc->boot_data->syscon); - return ret; - } + if (IS_ERR(oproc->boot_data->syscon)) + return PTR_ERR(oproc->boot_data->syscon); if (of_property_read_u32_index(np, "ti,bootreg", 1, &oproc->boot_data->boot_reg)) { From patchwork Sat Jan 11 18:42:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13936138 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 D35DCE7719A for ; Sat, 11 Jan 2025 18:48:22 +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:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/3Km+T89oY9vmo43Z5zKrwDWzM7jbfOIjaTIrh6UkOs=; b=dpyuKywry0diqNhqW5pHqImSX1 mmfx7wE9iCMJYpCxmpimlw7t28iQDWsfa8kwOn9e5p98vZGjPUnc7zNjV3py7KDDwqBFtkF1A/Uow 9AtLzdFOz2EqlrscMmfs2ZqiTR5uTxy0NKJ70pb/OvjlMX8FhAJmKJZK1YsrGjzAv9R9ToQ7jKWYH Zjz449YZjEW6Rq8EAaBmBdKkxtllap+X+2BOPMUAEkgZmxdX/JJe6hWPeB1MYPKElMRsZDTLi3x2H u2WXOcfrBmQxwGQl6+OnS5WutyM6ayYtfDfQBAMcSa32kFZFadqX0dIinUMDDhppmx/o9hJ/jdVXo zQO8CPeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tWgWo-00000001GeT-2iWF; Sat, 11 Jan 2025 18:48:10 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tWgS2-00000001Fcs-1Z7s for linux-arm-kernel@lists.infradead.org; Sat, 11 Jan 2025 18:43:15 +0000 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-385e0d47720so236740f8f.0 for ; Sat, 11 Jan 2025 10:43:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736620993; x=1737225793; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=/3Km+T89oY9vmo43Z5zKrwDWzM7jbfOIjaTIrh6UkOs=; b=O596ah4KdnP3KzVPai7ven1Hcnaa4FdL/hZABm5lP+emMVkTFddfpsuDHecBiQBajT epTjUsp/5e4UJ2UV48Ap7IPuueK0ZS/CsBHrXwZhdcMruoyHZzGAtrg6Sa8EbuqxOZ9W NymOzxZkcJgZYkFcvMLwT5OHweXUFgR1yh7SerckSvQ8g6XDIaKT4bzibArdUoFF41iE qz4OWp98lSXSFwwjDyBrCDh6hPKLkZTRfTqH8reNG8qR8b9yzVJ0S4oGfJZT3WU9TqKE U/ZUCgMAoIkp4VQDWjmS1D4tepOraZAhWAgcrwNhVdDHZrlBozmP3uyEAr6jvyz/AGCL GMgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736620993; x=1737225793; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/3Km+T89oY9vmo43Z5zKrwDWzM7jbfOIjaTIrh6UkOs=; b=I6LDdYIy/FvB19TrMjHoALD/hdyMekXOawB/QjFD/6tLoNT1C5PCKelz7i7ci/+Emo iLtQyzybadqq22Cfew1kBNCQll2oYybiStdSzyV8NGT8jfU73G6CAGcI+VGwYU2JnsQC m2LoVurJmtrDLvVMTC2Mard6YUOqGLvvf2fnsye36RWBqQdA9MRMtNtESX3jFflnQ0On Rbod9QlybsfrS2FSSdEcOPi2izVZbx6ENxKQHn++Ve9ye5JjkevF1ZcUKwWaURBRT6zg jJTfvlAManOjz40KacjRoc92hqIS64rg7413mS8X7E0VA67OixcmJ0V3FjFN9bbc7OB0 g13g== X-Forwarded-Encrypted: i=1; AJvYcCXolDYK79q0JJVWr+1SvmOWH1X1wCPC9iKqnqwnhF3h+Ugq7SVNM+MaJp9SWgob11qU2Mx5PC6muHKQZ+itYsRt@lists.infradead.org X-Gm-Message-State: AOJu0YzoszMVLJCcjtYrkc/rTi53QJ6N2Jbj1GDfr5CSXJcHfwCWAx7A SjMBqiSQF1ohlVRLVNEDil4FO1yPDWPu5QJDg7qnF8eqp+J+71AxI53ySuGsrr4= X-Gm-Gg: ASbGncv0F5bPgjC78xLwO/CjRoieGup2h8E9lkORgBrFF3RHx+7DmSV/d1QabfdopKK WqO7U9vwNl7xFvZ6zfMLv23WggI3+utUdaoVE5rRAouzabjFLPvETj6jOJhfEIXkkiqQT/ryUrM hwnCd3ON42KZ4fX95ZyaU4NotwQsxSs75g0GL430CF8/3CZIcnPzNGbDy63dFQwsF6T5kFUxnck PoviBBHAwPPB2ge+0cE7choMhFUZlopxKtPJebglJ30qOVIFvq6tZJ7ny5naiIERTqjontE X-Google-Smtp-Source: AGHT+IFOZCMJmwI0mKSBTGO+GGfe7sUCWdu9ZR22iWmk7CbqEsFGVHW41bP+rkVwowcZhYbO3Uyrfw== X-Received: by 2002:a05:600c:3c97:b0:42c:b55f:f4f with SMTP id 5b1f17b1804b1-436e2713e51mr60257065e9.6.1736620992728; Sat, 11 Jan 2025 10:43:12 -0800 (PST) Received: from [127.0.1.1] ([178.197.223.165]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436f9bc6b9bsm205885e9.22.2025.01.11.10.43.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jan 2025 10:43:12 -0800 (PST) From: Krzysztof Kozlowski Date: Sat, 11 Jan 2025 19:42:51 +0100 Subject: [PATCH 3/5] remoteproc: st: Simplify with dev_err_probe MIME-Version: 1.0 Message-Id: <20250111-b4-syscon-phandle-args-remoteproc-v1-3-73ed6fafa1e3@linaro.org> References: <20250111-b4-syscon-phandle-args-remoteproc-v1-0-73ed6fafa1e3@linaro.org> In-Reply-To: <20250111-b4-syscon-phandle-args-remoteproc-v1-0-73ed6fafa1e3@linaro.org> To: Bjorn Andersson , Mathieu Poirier , Patrice Chotard Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3905; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=5hQwmG91Ny83OGrGpyg9rnn+O+Mb6UT4EEhVO4UsBiQ=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBngruzVyM+eBg/b9r6/4HF8jM/uBdD/yIqy3mh8 ZBsd9VqFNWJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZ4K7swAKCRDBN2bmhouD 16VmD/9hiE1rSyjUYGDc/ePnUA6hW+ruXaGZLpyxcxO2CKr7SF8SIGsQ1RKzG08lItOtHksuV0m A45F8P7kF3WW1qUZaiciVfJjcL2UVXkbTg6HfQprvZyyxghUeEu6PMM78tkvgBv7m/R2nPEcJld SRIF37gBt0GhuzDnV08MavNlkikaXY12VMEONl7HBAFVtfwcMKGOMs4wm2XL/bo3/SYRECKdpm/ ef09tBL/Nv6L2bP0BptVKYgy2owH4DcdzbL/3w30bku866XdxQF/1k4Rg7j9qkweY9IMFowGmV8 uvVw7tuvSt+vd7Zi5FlmoK4NxYwzLDjkvKLBjW8Z9PdnLnhTSzRwiomr/tOHTf1VxjRbyQvNTkc LYhWVaV1YpCBoGsEsmxO5W7WWyTy86lR/mC976UM7di0tkRFkeZjp2azcC1ulaLoDEDoqpOqIem 8ubMRIg3s+fdQks0IGvIH2Mad/VxiMRp1I0mDuR3YYfeQXQokC5zmWDFUTuUyzCEtiksczSFmLw fBfuxd0eeWjBto8u+J7pBdOafbqbQb5yVB49FHc6WP1/LLoqwK8ClrmsBHnXveTAzxgLoMV8cAq VylA4W5iouI6+VEIQVhggp9q2HHdTpdaHL5FGkdrW9nhWpot9Ln2HgvqlU+P1ZFp27pcAZUvrFZ HimcEVkeFyrM1LQ== 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-20250111_104314_416188_DE016680 X-CRM114-Status: GOOD ( 11.71 ) 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 Use dev_err_probe() to make error code handling simpler and handle deferred probe. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Patrice Chotard --- drivers/remoteproc/st_remoteproc.c | 44 +++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/drivers/remoteproc/st_remoteproc.c b/drivers/remoteproc/st_remoteproc.c index 5df99bae7131a832c0c03c9bf8619812d9eb570d..d1f35e8a83ba525613ed4e54d2269b7e9f427e46 100644 --- a/drivers/remoteproc/st_remoteproc.c +++ b/drivers/remoteproc/st_remoteproc.c @@ -290,26 +290,23 @@ static int st_rproc_parse_dt(struct platform_device *pdev) if (ddata->config->sw_reset) { ddata->sw_reset = devm_reset_control_get_exclusive(dev, "sw_reset"); - if (IS_ERR(ddata->sw_reset)) { - dev_err(dev, "Failed to get S/W Reset\n"); - return PTR_ERR(ddata->sw_reset); - } + if (IS_ERR(ddata->sw_reset)) + return dev_err_probe(dev, PTR_ERR(ddata->sw_reset), + "Failed to get S/W Reset\n"); } if (ddata->config->pwr_reset) { ddata->pwr_reset = devm_reset_control_get_exclusive(dev, "pwr_reset"); - if (IS_ERR(ddata->pwr_reset)) { - dev_err(dev, "Failed to get Power Reset\n"); - return PTR_ERR(ddata->pwr_reset); - } + if (IS_ERR(ddata->pwr_reset)) + return dev_err_probe(dev, PTR_ERR(ddata->pwr_reset), + "Failed to get Power Reset\n"); } ddata->clk = devm_clk_get(dev, NULL); - if (IS_ERR(ddata->clk)) { - dev_err(dev, "Failed to get clock\n"); - return PTR_ERR(ddata->clk); - } + if (IS_ERR(ddata->clk)) + return dev_err_probe(dev, PTR_ERR(ddata->clk), + "Failed to get clock\n"); err = of_property_read_u32(np, "clock-frequency", &ddata->clk_rate); if (err) { @@ -318,10 +315,9 @@ static int st_rproc_parse_dt(struct platform_device *pdev) } ddata->boot_base = syscon_regmap_lookup_by_phandle(np, "st,syscfg"); - if (IS_ERR(ddata->boot_base)) { - dev_err(dev, "Boot base not found\n"); - return PTR_ERR(ddata->boot_base); - } + if (IS_ERR(ddata->boot_base)) + return dev_err_probe(dev, PTR_ERR(ddata->boot_base), + "Boot base not found\n"); err = of_property_read_u32_index(np, "st,syscfg", 1, &ddata->boot_offset); @@ -395,32 +391,32 @@ static int st_rproc_probe(struct platform_device *pdev) */ chan = mbox_request_channel_byname(&ddata->mbox_client_vq0, "vq0_rx"); if (IS_ERR(chan)) { - dev_err(&rproc->dev, "failed to request mbox chan 0\n"); - ret = PTR_ERR(chan); + ret = dev_err_probe(&rproc->dev, PTR_ERR(chan), + "failed to request mbox chan 0\n"); goto free_clk; } ddata->mbox_chan[ST_RPROC_VQ0 * MBOX_MAX + MBOX_RX] = chan; chan = mbox_request_channel_byname(&ddata->mbox_client_vq0, "vq0_tx"); if (IS_ERR(chan)) { - dev_err(&rproc->dev, "failed to request mbox chan 0\n"); - ret = PTR_ERR(chan); + ret = dev_err_probe(&rproc->dev, PTR_ERR(chan), + "failed to request mbox chan 0\n"); goto free_mbox; } ddata->mbox_chan[ST_RPROC_VQ0 * MBOX_MAX + MBOX_TX] = chan; chan = mbox_request_channel_byname(&ddata->mbox_client_vq1, "vq1_rx"); if (IS_ERR(chan)) { - dev_err(&rproc->dev, "failed to request mbox chan 1\n"); - ret = PTR_ERR(chan); + ret = dev_err_probe(&rproc->dev, PTR_ERR(chan), + "failed to request mbox chan 1\n"); goto free_mbox; } ddata->mbox_chan[ST_RPROC_VQ1 * MBOX_MAX + MBOX_RX] = chan; chan = mbox_request_channel_byname(&ddata->mbox_client_vq1, "vq1_tx"); if (IS_ERR(chan)) { - dev_err(&rproc->dev, "failed to request mbox chan 1\n"); - ret = PTR_ERR(chan); + ret = dev_err_probe(&rproc->dev, PTR_ERR(chan), + "failed to request mbox chan 1\n"); goto free_mbox; } ddata->mbox_chan[ST_RPROC_VQ1 * MBOX_MAX + MBOX_TX] = chan; From patchwork Sat Jan 11 18:42:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13936139 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 B8353E7719A for ; Sat, 11 Jan 2025 18:49:37 +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:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Wj0vaQkEs5xJl4pAen9qgeha8m1m7A5Rzf7Lm9ycX6o=; b=e1uUxuNHqa+NzCZA+9fuovlmUp iIgd1zI6w6y8aJrwmKHIlDWl08A+afxuZAQuOpWHIrs5SJ+CtPEzRhY5uN4F0E+nRd4RcoR6c7z1g oNb0nChTAR1fMr52H0Pfn4zlga/jtDnUMNwpd8ae6D/j/x7kYa6tImUJ2mjfzs8ye0cVtMErN3OZO 53t5vlyfYTcyEOSO01A2CvtAQMm+3k8jOq1h4s3xGqk7d1kbiS0SjRNsgzQvnHxgknXCbhrRzAdQj 86XGzqwPKQi7JBGFT+vKWUMYCEMMYOGSlTmqFsRw84i16rg+h29FJjzq3XpKCibDBpn2vHoNO2bN+ CCQdOrFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tWgY2-00000001Gms-1fWB; Sat, 11 Jan 2025 18:49:26 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tWgS4-00000001FdJ-1muC for linux-arm-kernel@lists.infradead.org; Sat, 11 Jan 2025 18:43:17 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-436246b1f9bso4361405e9.1 for ; Sat, 11 Jan 2025 10:43:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736620995; x=1737225795; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Wj0vaQkEs5xJl4pAen9qgeha8m1m7A5Rzf7Lm9ycX6o=; b=vtIn6nZlGYXGd1JNqVxM24gmrzPGZ2pRul4YG+Qlspx1Y2Cj7QHltpoA/8prOQOSWP fmGusdFUd6arJa4bZ/NiGq0owxPkUlSHvtmkAhEDtD4YgN4u3M//NAjn0sh9+dF36WF1 tEjaFKR7SAlXuof1VmV88owZr8Vyq7VkBAMyuHhH0G5AhVVwzKMpc4us5MDgzhrsrulS 5dPqRaq3aI0JTkbWsiSSj25veDC8fXL25dWHmqK8ODIUafjr/SSKqlf567lciRKYBe+2 Qh1hguLfsnZ/6cXI88LAP/Djy4ONasIIgV8PV8YKGx/PCqHSTjayirLkc/4letPJN1EX FisQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736620995; x=1737225795; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Wj0vaQkEs5xJl4pAen9qgeha8m1m7A5Rzf7Lm9ycX6o=; b=QqbUIO4D8ZJHf6rnYV3IIpvX1s1orPBDikOI2f7mhr2348HyaS0AceOw4ABP9F+qbF cz7pzwNlDLjepzGuGffz/McCYFFRjegf8VoRY19Fn+BxvswU+4stcGIU5u5dCnCB3qkN MZ3FdwxAU+XU4O/f6/OyEyDnItqqYUx0qa0bXVDMSd7Qbfnhr5BfItwlBiYub29+ZmUN L18A4nJ1qIKjikKqkuKdsNe9dyMc8b0pbsJL8ZTUMlJOtPoEsUQNzycjiH5vJ79Z6oBY 1BisHsZbZvO6sSToPyOSJSainwjAcHKyLj1jXb8gASEiZg3kqzllJ5RqRLUOJgKDkpVO 65Mw== X-Forwarded-Encrypted: i=1; AJvYcCVL5UooO3UZsfwUtLUF9YPFQ4AVA235Pzsw9FKCIPTBxpyGY24wB69dzN0pVkn2rfaiGnI0CDlmEoIXUmKzENVD@lists.infradead.org X-Gm-Message-State: AOJu0YwiBzZE+SNzEmuID+VSmMnEtRc43m64DnYlaL5hLixHUInwqr9I zImyv2UAvHA5HU4Zi47vleHLFbuLb4vjvVDOIaGT7/jTqlvHVhmyJaYJDZhA2h4= X-Gm-Gg: ASbGncuym/DhA5xlsAoFhu+EI1XQvr9K5CIiVaWV/8jZMUmUL4md6gUjIhvDybAadVB 79zMpIUPyk7psaLl/PU87wWHzkwjqIOKpA72jUHBVvOWm560nOprfs7zvUBoJR1WMRDcnvcsLIM h17AYeszdhGnD9UurJWsYo7ESqFv9jdCU29EoXu3WwPNIAx8Ybq+duBI5yrKhv7F+CqNE//8n/J Vi4JZo5K2/4NRz0pSTeGOsGQFGc3wfS4CB4yL+iLQUuUj0jrLb621U9XKAl7US91wvWUZgm X-Google-Smtp-Source: AGHT+IFkdUd7VDoNBV8ocBwBMK7rs6FdwNt8/W12AAqlsigJ8QUMOV8NnmmD5VdugurJ8kLk5KPd8w== X-Received: by 2002:a05:600c:3ca0:b0:436:17f4:9b3b with SMTP id 5b1f17b1804b1-436e270729bmr58969015e9.6.1736620994797; Sat, 11 Jan 2025 10:43:14 -0800 (PST) Received: from [127.0.1.1] ([178.197.223.165]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436f9bc6b9bsm205885e9.22.2025.01.11.10.43.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jan 2025 10:43:14 -0800 (PST) From: Krzysztof Kozlowski Date: Sat, 11 Jan 2025 19:42:52 +0100 Subject: [PATCH 4/5] remoteproc: keystone: Use syscon_regmap_lookup_by_phandle_args MIME-Version: 1.0 Message-Id: <20250111-b4-syscon-phandle-args-remoteproc-v1-4-73ed6fafa1e3@linaro.org> References: <20250111-b4-syscon-phandle-args-remoteproc-v1-0-73ed6fafa1e3@linaro.org> In-Reply-To: <20250111-b4-syscon-phandle-args-remoteproc-v1-0-73ed6fafa1e3@linaro.org> To: Bjorn Andersson , Mathieu Poirier , Patrice Chotard Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1595; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=U1lpQENfUy62bKJcih/Uez8/c/JkobPMvDaQfWStUtU=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBngru0T07FNjrF45YdoyIyJ1321KdY1szRRaMcz awXkyq3kByJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZ4K7tAAKCRDBN2bmhouD 1/y/D/9Wp1pomIMLnGfNlycKgEqkDLs1RC8JXV8VmnlFsO/F/uAK8zuzhbnzwYpcUyYhtvvtvxx DPqHgkEvgWB6c9+6paOQ62wZ5tR2FFXbZNdwSLAd+J24sEpjCU3ndi/CJI2zz1soIn4qTCGNc8/ Mp0+omFvxrzBQlFcuBhYTSjDPbuKaMszNOWme3yxA3ML9DTNQYs+mQVIxFRE1ro1Mn4dy38xnm/ yF7RPpE4VKP1SA/5T8iGXzM5PLFxXYmCbl92fg7geryPjIDMAeYuWe9HAasEA3DPuzMp+3Dtp5g InuAOkuCoYpwHdqhQ5fZfaWDazKGgpcOsLBJJQuvjadJDhf4qYbEbCXDVbjJzgvsfXGf09QwTAu VvA+QJ0CL78fuxrvpchTNwnmVidiaY8q7vkhjTL0qNIVg3VZ8ybNqoKR5s7qIQF9du+jqWx0Po0 3CKfa9DF+PJcIoi0nP6sm8Y+aC04iLDecYPLQKWQUDhXLYnAv/uQNv7XxBhWi2VGcSV0ticidg8 BfwMX0BLA+sgJ+SvlHOJ2t1zQNKSWUDWk5/8QKYH/1GPgOODY3grkMJK17SrMDVv077HwMl9uvp tKbvfdKBlfbTROPOXl9vq6zyqAKfuv/4rGL1JMDcWjD4d0tKJNH3ja92Mq3dvKGYn2MQQdUBqnC NxtVbmuq8+MwGjA== 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-20250111_104316_471406_DB7E22CC X-CRM114-Status: GOOD ( 11.55 ) 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 Use syscon_regmap_lookup_by_phandle_args() which is a wrapper over syscon_regmap_lookup_by_phandle() and getting the argument. Except simpler code this annotates within one line that given phandle has arguments, so grepping for code would be easier. There is also no real benefit in printing errors on missing syscon argument, because this is done just too late: runtime check on static/build-time data. Dtschema and Devicetree bindings offer the static/build-time check for this already. Signed-off-by: Krzysztof Kozlowski --- drivers/remoteproc/keystone_remoteproc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/remoteproc/keystone_remoteproc.c b/drivers/remoteproc/keystone_remoteproc.c index 83c8e568f7ce3ec3ca3a534d2566f6437e9d403a..7b41b4547fa803fe19d5e5e6b1a8c8c4e5760632 100644 --- a/drivers/remoteproc/keystone_remoteproc.c +++ b/drivers/remoteproc/keystone_remoteproc.c @@ -341,17 +341,11 @@ static int keystone_rproc_of_get_dev_syscon(struct platform_device *pdev, return -EINVAL; } - ksproc->dev_ctrl = - syscon_regmap_lookup_by_phandle(np, "ti,syscon-dev"); + ksproc->dev_ctrl = syscon_regmap_lookup_by_phandle_args(np, "ti,syscon-dev", + 1, &ksproc->boot_offset); if (IS_ERR(ksproc->dev_ctrl)) return PTR_ERR(ksproc->dev_ctrl); - if (of_property_read_u32_index(np, "ti,syscon-dev", 1, - &ksproc->boot_offset)) { - dev_err(dev, "couldn't read the boot register offset\n"); - return -EINVAL; - } - return 0; } From patchwork Sat Jan 11 18:42:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13936140 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 B6140E7719A for ; Sat, 11 Jan 2025 18:50:52 +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:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4ZfLFbNpnmpDV2565vRSGO4sUYMlrYKX9NM4kz4voi8=; b=T8K1yFAO8V7/t5N1gByZIwUSVl QqrIEbNmye/Rcd4kG0rB0opG5bW2f4JGDxnReDxlM3lbFaCkJLKR4n78TsIX6picaYrqIttCxCAFq q0KrY4AVALZIHaZtPCHitZTUzsAvX+1PYeWDYks6d/hGtEZ1Nc8gK99fgUHjl1A6Wdh7mBZWDZxAm r8ImUU4Pimttd0W65thgSIa5mudiOfCtL7yTlvjWMWZOoUkiFBjVg2PnV8yHghimwDv18cQOUhdUc EKJe/NOO/zv7U2mURo4g0ncUWitVM82DsFn9eyhqDdhHDJVFz8wbHdw/fUyP4CuYpRddFPVlv1Pn9 zh3d4n9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tWgZF-00000001Gtw-05iC; Sat, 11 Jan 2025 18:50:41 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tWgS6-00000001Fe0-2F76 for linux-arm-kernel@lists.infradead.org; Sat, 11 Jan 2025 18:43:19 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-38625aa01b3so322515f8f.3 for ; Sat, 11 Jan 2025 10:43:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736620997; x=1737225797; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=4ZfLFbNpnmpDV2565vRSGO4sUYMlrYKX9NM4kz4voi8=; b=BluVuAVn3hng6sWF2tUvkNO+eBiLfpVQoWqS4FggobbogxV9rY39VLQOmKvI5t+vLw UyxsZo9aNIl8ePGjxazLqffxJhpH/srbMF8vSnzzSn6g4FgxcreeOoT2fXTMWeEK6KCr P5FtcjAtfewtaM3LkwcRmCdf9EbFlDFRPjGr4XzWAYEe1ZU41AL49OLslDW5qCGdIKpG leuyg8mQA2b9/i8AGh+PEYXjF6c60Rqgiei9anTzPMr/KNlU1l7iRaqIDysW9v3Pyxvc /WxOPIZda1PMbKzLt8fp0mxultsjw/833ztKsPGe7iZdT2vkDtFpLCRTSd+0UX5I9UVd dpOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736620997; x=1737225797; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4ZfLFbNpnmpDV2565vRSGO4sUYMlrYKX9NM4kz4voi8=; b=F/AXcRLpOBwzv1AJMZFRz+NTjbemPs7rIVj0WHdycKZ0p/eYvfe4c3KO4KIjWalYcj yRcoWcVFFMTfTjKIOjE0uPS0orZZTt2vsTBf3KlEfuBumfmyFUws/Hb4atQAU/4k6t7V /jwQwn+6cUM/oP1W89CqafeyawGaiVVXpO7Pr52bbr5Mib/0GbQQmA8qUDurWyDoh3Xv 4F7ZWioMK/sAI+2iI6hP64TK2TGuOAkHnKLDrXOimSC7tO7hL7EMqihFg6XgxgG0plQa Gq9Xh3T6U4acn8YM1NMG11NTyJQPbwg7Y8Nle+if39/ogAi/gbvTHtlXhl4v81vN7Rr6 HYWA== X-Forwarded-Encrypted: i=1; AJvYcCUtvs4ynmiGJzA52OHbp8IRurZ6b6jSFfnKUHDWrEJYMr767TmZwf5PjsZZtCd19cx6lJQ5rnS6w9ssJwnh/1sZ@lists.infradead.org X-Gm-Message-State: AOJu0YyVLA8wh7vzzpAeAVxDyFMXtqOanC5Qg+A0UfPrc2jCZvqhHJu5 wybFnX2SXK4ERag4+UsmguwXG6jo1hHRPK5M6w/qrAZ9B3kFTdYaEojWVLqGT8k= X-Gm-Gg: ASbGnctTphEM/oVuvTIZXP2YvoVS7rYJsHTXRs8uG93CfQ8ioPB6cfVgnI/QvNdCkQq dhOhn+1tppnYUBvhjAFKIpr1ER1ufNBPiGIU3M4D4SywNOP+1VtxhT5mdMp0FOp3ndFRgJgfu+N ARqPFGig5Rjh4ZFuxD+qoONtq2spwkhL3mzQ3M4ygAWTWqFCVTySShK+OuuG9rwwb20CgieYb/G sLCsdaXu8HSlRjAjwExySufFFtqvL3Osi8+IBf04UsZPRWtOyO5uqm1cAmDQvvY1Szg4sYq X-Google-Smtp-Source: AGHT+IFW0/peneFHNHf0VQ2I87ynYNTzqYw++V8lH2N+J7woIMmlHMzRJMHLntn2pbYLKroEqwtCug== X-Received: by 2002:a05:600c:5027:b0:434:a30b:5433 with SMTP id 5b1f17b1804b1-436e26ff752mr59166135e9.5.1736620996872; Sat, 11 Jan 2025 10:43:16 -0800 (PST) Received: from [127.0.1.1] ([178.197.223.165]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436f9bc6b9bsm205885e9.22.2025.01.11.10.43.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jan 2025 10:43:15 -0800 (PST) From: Krzysztof Kozlowski Date: Sat, 11 Jan 2025 19:42:53 +0100 Subject: [PATCH 5/5] remoteproc: st: Use syscon_regmap_lookup_by_phandle_args MIME-Version: 1.0 Message-Id: <20250111-b4-syscon-phandle-args-remoteproc-v1-5-73ed6fafa1e3@linaro.org> References: <20250111-b4-syscon-phandle-args-remoteproc-v1-0-73ed6fafa1e3@linaro.org> In-Reply-To: <20250111-b4-syscon-phandle-args-remoteproc-v1-0-73ed6fafa1e3@linaro.org> To: Bjorn Andersson , Mathieu Poirier , Patrice Chotard Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1645; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=qF4PHMuL+t0qB80xl2hrwOztjmUZsyo+dEMuKAh+IB4=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBngru0nQc+fzofOvHIUV+/fgemqTdgb2BKYWbit e6gPsMjdtKJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZ4K7tAAKCRDBN2bmhouD 1yAJD/9qGYLOD6d1yxq+cU4dWnu4tTUYO2HfUKb3UxNFVYISpIcj7Fg/t9w6XscXb+F1dhdEuqQ Qo0sEKZLgMV+JVGLP4yG/wpPv1lz4lPtuTc50hpJS/SyOVckngINxUNKatVoRo/brjSSCjWKEPE TEYJAtE0v7oS7Y5zxCJDZWPdhukQb/Laes2GlHC2zXGRbWqpkLnyoPJsWhGxq4UQHADX1XzZYBQ SSq2OKw8Q8F9+Q1b9z6Oc25dw4LWHX4MTiPRxo73ls8Yz/9MsiSmFLO4cG8su8U3blX3VNwwKLJ mfBCEg450PfOR0hEv0PH3dFgPOy2eWDDEMHR/hv9weZtJhO657ODwYu6wEfTyWnzz5xqo+/S9QH Wed4A/iSt7Y91Qv3X/dmf+3cK38qH/sdheiCwCbF4ul84pOC2PK7slF4XITdZ9tFa+fqbVkb74Z vmwH4GPTDGzuCo7s1QwLaP+E+I/dbAaDX9TWO2K2TWlJiNkHxRTKBuXkTv0LvTw8k4kgsJtsqYg WtbDn/wo/G+ESTk5a+RBWLESQPBfQG/jK+DOvqsdFOZtnGHZjnvFdEFH6vX8jse32I8VEgsjtLy peNwU+JATuXIBWcNFBkq2ZsCEtc/PVsdY06n23bstvpwN4ZQdo996sgJ/UeBqV7JRYC4JxfXpVb YbAPZrXD5w08gFA== 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-20250111_104318_577158_F5211AB1 X-CRM114-Status: GOOD ( 11.94 ) 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 Use syscon_regmap_lookup_by_phandle_args() which is a wrapper over syscon_regmap_lookup_by_phandle() and getting the argument. Except simpler code this annotates within one line that given phandle has arguments, so grepping for code would be easier. There is also no real benefit in printing errors on missing syscon argument, because this is done just too late: runtime check on static/build-time data. Dtschema and Devicetree bindings offer the static/build-time check for this already. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Patrice Chotard --- drivers/remoteproc/st_remoteproc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/remoteproc/st_remoteproc.c b/drivers/remoteproc/st_remoteproc.c index d1f35e8a83ba525613ed4e54d2269b7e9f427e46..e6566a9839dc5ffc83d907a3076fc4b0a644138a 100644 --- a/drivers/remoteproc/st_remoteproc.c +++ b/drivers/remoteproc/st_remoteproc.c @@ -314,18 +314,12 @@ static int st_rproc_parse_dt(struct platform_device *pdev) return err; } - ddata->boot_base = syscon_regmap_lookup_by_phandle(np, "st,syscfg"); + ddata->boot_base = syscon_regmap_lookup_by_phandle_args(np, "st,syscfg", + 1, &ddata->boot_offset); if (IS_ERR(ddata->boot_base)) return dev_err_probe(dev, PTR_ERR(ddata->boot_base), "Boot base not found\n"); - err = of_property_read_u32_index(np, "st,syscfg", 1, - &ddata->boot_offset); - if (err) { - dev_err(dev, "Boot offset not found\n"); - return -EINVAL; - } - err = clk_prepare(ddata->clk); if (err) dev_err(dev, "failed to get clock\n");