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: 13936130 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D46E1B652C for ; Sat, 11 Jan 2025 18:43:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736620991; cv=none; b=K+FGGrNwSEJvNWZCyqKciT8nZTkEcahLVGCgq4CNwE619xIlCtsO4epybnqeyu4vAdAujKCiRc9dy/fNsSqda5xH86XcXdE/keftU4sNCjWN73S84nl58Lsnfc7e+rC7sG8Vum4YIbS3qMxJFSiZ+XZr6h2/d6G7p3SOeyxGAao= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736620991; c=relaxed/simple; bh=dxtKqbdRSIen5PNncZ7Djuqqg+VHZ66erVjbW40h3Ag=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VQMdYxecRVajL+28HLpUXSWbDLixP2LgBlF4l73d1yQxyB7Y5kxz80RpwEP+/hgs6BfO6D6tMTNFTOPOGJwkq6ht4zTC1JQQxrN6xBWMxNBv9RdQI2qZBAIuAirZUM17ufPGWS7G+JSVHJhNxmvBIAY1fM8q3Jz7ml7dY4pBPNM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ib0gemhf; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ib0gemhf" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-38625aa01b3so322503f8f.3 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=vger.kernel.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=ib0gemhf4FiPJ7bIeusip8Im/H2kH38xsNHNL4JYSTbloRWKas32mw2Eng2or+IvV1 TkRn5R3/viyQq3wZNPrbCRsIqHQwJB/doSERLK1qiTNnKqDEaHbUch8Ur3SKDStpVgp6 FKtAfgMWSBgOCYKREyUeM36IiRKsmuHENLboZ7fH+nk1WoHwcS+G83DOx749kuzjcpmD O0aifEb94FJy8S8O+x+NbWNxa0DFF8gRSKFcrDEhwfBg7Ka/vbkAb1W7Hz+1esNSOlPZ ki6vgY2NQchDh+z65w4KcEqNnIjHjFJwxF9f+/1ElrbA1IefYhVneU0AwJJFDJtlgVTH AobA== 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=FO7VA0BtKhpXXdiSXRCJkGH/tyGpU8QbSrubhGQYi3fyWbs0Lx8WGhQMzrCRUhSjmj B4faK0nOxbAjfs8rMrKLtlw6jxHQY/dcgcovtpoGA0KjQiRKo7Pw8f7hU9h0wmblVtpi 9WsdvzttstluEfrOJ5BcI0SI56uaM0wDQEE29NdUUezVhYwaRuDZJ01YJOvfaRX9h/S+ 1UiLXUd1L2F78OoTxw2mhT8XkPm1yrZZiVTHrX/SAsNOUYnb0YPNEY8d/mBYx/e4o59G /Y73f8iq5R3ru3XnQ7PuaQITZaF/EkNi/tqJa+eal7g5CBnfwL9vtMyDwE4pOztQYBJA 849A== X-Gm-Message-State: AOJu0YwHafhoXLNG/YbuXvoZ5JGlWbBF3tr9ogfNeGLQASHRD3RWvZm1 oNn9pS3ahdETHzjAAWJSr2OThQ0Db1+Fs9U8E4A3gk9Sj0ut8TPc+8QNZELhJNA= X-Gm-Gg: ASbGncti/+hSODOM9m1lbzA3KV414aHiRiejMmd1IqdFCwjLglVWhYlHy8Rs3LJgbUT HJe1u1cdJpdNHm5s0udmKFtmqCShjewupzAIVkITyx23povFcm9p23rCItUXdGvpKrpUsbYnUkP YjjVdlPeHP/QowKtkezFljaaHSj2W81rtB5w0QgPW53x+agLxcEiME2nIx2N9P1qzsS2yJjjXLe /P5lu7AfUskNXmfJRLAlt4tmvQ4nXoBX3+Zhokb0kAnbJ4yBN+9CycSxUhn4++2VZ3BzEwq 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 Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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: 13936131 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 598841B6D1D for ; Sat, 11 Jan 2025 18:43:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736620994; cv=none; b=a0t1QtVBQk7EmWRTm3q5y2rVsO77ERU86ELpuavKXZTTpR8rFuenOOtTkqDZZBPJVimY+sHOKbZa36oQbhyyTx0t4JgLgDhqcplxkUSkD0TabYMCJ6xX/DeXSQCSulNsXddNo2E+FgB591/J2WGhfDHQbjRFAb9p02ubYyrDmoE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736620994; c=relaxed/simple; bh=fWYltI4xM/KDDIH8KFL0uiLtzD8nY+Kjalail67u2Hc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XUj2ARABQNnIzsGG3GO2XsWzP8v0LqKCUAfR7ekq9LPzw0iGrDoMr1vJwhU1ZZRWPfoon2zTobGUU4We63NafDceasIKF3zigWOv8ErlYVMEO1z/uyJ6DZ0wdtrwNo8u9hQKNAspBm3aVhe02uK6xZXkhdNVSOStRmvAK39g2ac= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=xHaMQ+2M; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="xHaMQ+2M" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-43616c12d72so4354285e9.2 for ; Sat, 11 Jan 2025 10:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736620990; x=1737225790; darn=vger.kernel.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=xHaMQ+2MBILcyVa14NwXCm+Sqeeyf6itQqZJ4fVoL/AI8dNLeIAhJG11G2H9Nb0F+6 sNOr7K0tb/lD//xcQtMLqzz26zPW6x5DUEsQcZ7cq73E+qnMTth/BuLBXc6A9fcJJBG3 YbRozgunebxYAVnhz6oWQLavfDXSLEdfWb4XNC/i9mSQkYbenatgmxx/ytwAKfTIQ+/c n6y62NLHupEZnFV1A7r44J5HjTSt1HzWrcqCMiCDY00SeSLTnFQxlfjcztOAIq/8XPeZ oLdCnunZXqFHCn46tR2TQhJ9skcCIctE9JXsl0n+TOVtjCwbPSxsqEt7mRD2ULLIKT3w CJxg== 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=J4iu/6ARdQGK1okjrw2d0+Bb1a3ZM/RoTGylqt2Jbq10QKz+4B15H77lGppgpNmExj XPkx+7QK2CzSGRXk0G5kj41oiCcM1XB9Ws9mG3Vy0dCKODIRlTKDUdiDwWh3FK8VwiRa JpqGIPViQ1B4vhuMEfxeqIVsS0Bp72zw8iqdBSrF4C7/hQgQ00K8DJeJ6MzBxjDRHwWv I2/IAdbIIC3qiQsNgkWFxkRf6nAeJJSz8CIp8ekM9pn+1j8kL46LZ0M6jklEp8cXvEbN 0W7KvvN/nLjJQLX52kw8mXkvyaCXp2RVIwh+lRvI6oXSXnxv2X4MjXJlmgWwNIcqFX7g luYw== X-Gm-Message-State: AOJu0YwCwaN7/qAVtcY2zo6Scls6ma9h+JYOB/OSJBsMD95xEiJhd8Wy DZSucyxt5+rMobq77S7FdEum9CfQMKoae+yjkQ5TwXsx+W/Bn5nWverdpblilFM= X-Gm-Gg: ASbGncuVPp9ZKwidqz/W/t17BRqFTYQcetb3hADt72Lvh+MCKoDLTUEkF//O+DHHMnm jBwxgONdvuP8tNEc+aS5zH+3XcsKTGSaL/cm6Yp/MQGjE6uxYHaeHl5OLvZtLor6tt1PW1ClsRN vgAUKD4hd4K/qJ71vzi5hWG+Up2+Lvfp7jZV7tjX1Uk+FHaJVcRCX7SkAgBEha+ENrvJPhfGlc+ 9uU4L0Si7m2C/4mJlBTJf4D1bpyhCJD6JQxYefmbz8A2xkdAGvkR68MMR9d9rPzNqWOeD4i 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 Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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: 13936132 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A5381B6D1D for ; Sat, 11 Jan 2025 18:43:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736620996; cv=none; b=vB+A0Fp3XQNUzvsfcYSajZv0hamuC1VOaIcfnAGDur4aibtwgQ4PFeo8P+tW+SeWQ4NWVLuiv2DgICDZsUUdnWWFrEEPeCT0qpZigDYeSDkZCgZ+8qxzsxIC/ZD7otuSaCv6wvk4sCZUkwGKZ/5wGmOZDwgzyYwGif9v1Argf3A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736620996; c=relaxed/simple; bh=5hQwmG91Ny83OGrGpyg9rnn+O+Mb6UT4EEhVO4UsBiQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Gmvi+x62hST1dnJHd4YUlAggci5wEeUGpc3VCDUmnNzPK4LB7CIWJRZj/lixncr+Egw8GYJ4Wa2nCKipQoCGMuSH9XSvuEcCteqH2ZtgpBy46zEt3gj2NnwEoO7zFUZpXiVDgu3ceArIV0hkTWVubaQtcE9ujcGP6h3XD/HB4Js= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=KQSyp/EN; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="KQSyp/EN" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-38625aa01b3so322509f8f.3 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=vger.kernel.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=KQSyp/ENzYSHO85Ze5jOTZRJJjLdVKGjFso6507h3MZ6Ajir4Ka8/vxpuLP2zwQ+J7 iil6Kk/tuk02jsGgOD2JkzfSrhvy3EBr32imO0ApSYkjgtXNbocD2znG4TRq+SMZVvbg 4WeOIqE6iaejuoVS0O7tXhjZF13NY25WCOnXghLlq8qlg4r5uG0Dz8YjA8kM14rRa60l vn3it26m6a+Jrk0GMWVdr0i9DleicDVZLKJVmCq7F1Zjm1SMZbwcdUj0mNAbWXPce8W4 7nRDwu5UsjlfMUNHnVBrr3k+bVIh8q5Q0p851kvu4q0h30TvOnkNboEErR0ur7bck7Xy Ox8Q== 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=HKP5IQjzXbrR62qCVQXSJRwTRCbD4o7uQOwYcNlGb/ZiDVLawJ55D/mosTLm0Boh/j Pv4y5e+1U/4GwK1ri5jQ3sb8aiu6SjFhSCMvacRXDHzjAjZ9jhA36FPYgZoIp83f1Ps8 n+XShht9EjTv/eqXADlCB4l3IbpVTlnq9RhKyxua/ikzzbraEbXFsJI2yQLpbeDqYYUM XwDGDuaaGawr3Fc0TNDk7kHbOobWH0aDA+c3gbi/vhAv7i2ExsnU7JlbggXpW74FbNSH ZkhSk/tvBkYDlCliaNgUXMWWpV+qYYE9lkHx8PvbqwQj5DS/o1Vl71vXp4TzVkBCP75Q rbRg== X-Gm-Message-State: AOJu0Yx/6gxqr9NYysqj1XrOAbdr1xNuAHsj+9TelgkucvUWveImXuyg lubuZLPTxUOhpLPkgUX8SkD9IW5Gf1T7Lk7zLDTgylXe4gEgDpRWyZhRSzod2xNxZwyVMPbfVFu V X-Gm-Gg: ASbGnctMxrkMkMNK89CjdtR7YzrACB16cwOTr+hm+jwyBweV3HK9ZNdZb41ozSMf+Iw rUYtig5FKA028dPcHnzG0leyjB2BJCUL23Eo+JAF/S5lfM4Bd4VzVyx8968PgLOYh/HxEEuhjrx uUVwpLV5nMw6Upq7te8dnfWR1u5MUe+PMIsHv/o9X3KfesgW+9RLvjipz2bYA2rOY8/DZY/SMBs D7G5fdlT9hqvmvG6aX+OG5zzF42WEmJvFgQEQwKBvomj0NonLGkSh4wtvDiYEtZDg7eQrGV 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 Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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: 13936133 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63C1B1B6D1D for ; Sat, 11 Jan 2025 18:43:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736620998; cv=none; b=SZIxO7z42dv39PWyXUoAGg5wliQA7DQjzfvNRZ51VM7tdG0EDaXrkKOEOyM92MOmigqZp97FNkVp0QI9gSvVcew4ELJuRTtU7Iazj0YoAczNz2Ja/BXeEvewkdXYns90Zmy50G67Sb73cLyS49+Lp16yOz8sEoHEA3gKBxsQLL4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736620998; c=relaxed/simple; bh=U1lpQENfUy62bKJcih/Uez8/c/JkobPMvDaQfWStUtU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Mo57+HZJ7ma+N6GlcpafUiveA3SnBELBcADgzT/rFXyZreHpTBBm13DmMOnDXA3xUk6GrlAqHI2Bm69p2cbzqb2LTae4Vr8uMsehFzW+8tAKReQoTVSQ3vFkwOftmondKQXKB03rG8hFh+hxtBKk7xfe3KV2GvHjOttWZ9kwxZI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=bVykxAHb; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bVykxAHb" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-436284cdbe0so4352305e9.3 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=vger.kernel.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=bVykxAHbnWeGK0V3Z+z3TU2goitHqHDVvkP9Ytzbmk6Jn9SoCIcGNy/1d1oOdEhfQ5 84jJMJ12IbPIZ4cyVVYPu8+G3R6t8XDRDiri0Ps9L2I+/nT79gkBljs/AwiFAHRzg6Q+ HbjX6tOHm6xugDuaejXatUquzZCn7ggQ0eloU1ncxb0DhxuaNRqHwOL8f3zZpZg4YVeM Th4bhDqv4bRbSwpCWGZF2ApF+JVSPoU/PBpsYKKKgK6AD5im0B5l/hgrA2tTokMODVOO StaXqWlFIuI+6FnCOR3NMXAFk6lFKxFVwZ4VirLekJyx8HU/sagBp30BsT3LqRmx3fce lrfg== 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=wWEUrab5qV2uKsMvnt267Fgjq8pTq9pYPAO10TwP2woToJgY/+VWcNJ0J1irAyb0ud NNd54HnI7zWrEOpPzFQBMixwP5C/8SoYXQOOnNQ0oyJMFUnnWrEpUOclNy69pH+rEn2P QvJJOa/lPXqfmaMrW1UA5H2bNcuwJdPXZKObPXmOusm07MaK2NF+sPoDy2+MFZApX2DW 9JH/tuNouuQQyFjQSBOhhFnBc39trwdJ6U9+O2AnuWcacWGuP7SsjitH8Ym8iARGpFCE tn0A0meEGzANMStK3q2I68U2Ot75+U8ZLvzhr5xjcrG3f6XRGDvH3mA3aeJazni0MIss 1hwg== X-Gm-Message-State: AOJu0Yz6m77In+EbvX10hOkmaX/CcveHFv85oEFfVCBXjKJxwArM+Nz0 44XJ9l+V1tZbU/zK/Ba/hsglyF+UFciw/jA+5WyVq3xlntXki3FzaXHuuqkxMTo= X-Gm-Gg: ASbGncsJHpeHwqEEcX91+tnjgs/09XxfieV3dJZ6i/0OOWdrbpSYO+5ocKdedOBYA+5 8UlrYN0xbVmKzPqSDgtSX+0PkCCegVQXN3c02LpjD8Ur3F4PBb/bjmQt+99AofLcFf31uJ+SJvh vksnKkwFi4bAKgcb68xCApBV4LV/piL7d2+AhX9O8rVN80HpRrrHQ40QZEnlDRa4l0OHsQwUfly Wmmx+9Hn/fmvnJHGRHO7YT63FHiibJL3xsc3bInaszeFX+cx3D4oefIS6aL9VzgHhV9NOxQ 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 Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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: 13936134 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 965E51B6CF9 for ; Sat, 11 Jan 2025 18:43:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736621000; cv=none; b=SU8fUNHtQ1UiEq5XR0uZpyu0FIxcb/wDVLlUGVfzXl/7cyCO0h5WIqIHesiOKOxeyayNQoScWJshCPFWjTdxxXDdVJ70phWicg+qfBGUHyjKlKXB2UGLFN9Qz6mw3PXahDNUV8ouAjJFrdwVe8/k2K25XUcELcV2W7SZhNtbNJM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736621000; c=relaxed/simple; bh=qF4PHMuL+t0qB80xl2hrwOztjmUZsyo+dEMuKAh+IB4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=h34wqPo2vz1iRAdNwZnNCI9R+agMsHim5TEVV4XSe0V1v7sH9ohV+SjZfiR9tWMWmEuikaV0hQJ1/jVfGhaWeoiVo6Sp3hVgkcO3Ttme2fHK44lsyNj3nGGwoMVOcqrsTZ03OLQ4YpHX4SNYzYG+EA46DcqBJfXC6SVYZJ4ARxc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=fsz6qNWB; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="fsz6qNWB" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-385e0d47720so236743f8f.0 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=vger.kernel.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=fsz6qNWBf1zZwje2h/h4OHikvx7/h2gD6tqIMY0ADt4vHZSSozzG+l+vnWGojlnlMh Y0aepVhPEhJrdAIyqQJf0Dj8Q03mxyluEvrrvkJpBTTm1byuIcSO/kDE855tb6CtJxA7 mVIyzVbsXSrV4oUpZIWmp+Km7DJivmtlDzr7ueqopb34JpH8hObDvWI2nLQ9OUF0oojF G8ThnINwOuFAKp+jmy4kx2O6g+nGWH3VABbX26LctNkwsWj+pyCiscsZHTYpRxK0ZKPK 7QANw7h4EbBv2JIblUdkhyfai0mo9ZYV1dFuzdT+NpSNOeZ9j5jjqZblP8cK82y2qEb0 9tig== 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=cGyMFqrDarQMcUHw12pgIxEDiPRe9Ea7lUERVisX7htDYTk/JUnKOId9bhzcxqVMr6 6MAEoZ347+sTICMfnMtrgWmZciB+5+Rhsn4tqFyBFVbFJBaBMf94FC+B0eaxba2k5DM7 v2ojvxqMcx+DsPJFvpIQ+B66WWl3kqO/y8kAIf2JsyfDsqqLvIMiLuKwTCO8DP5EFfzG IQ9nzmEbMZ7SiUu89O6Y8Wv/wKkwaanzVyXKjrhzt9wrkWZC/d8ISsCH3mmTyhCluyw1 lkWBYay3fnfjlxCDyTTzbmEMHITISKK7Gb79ncz/tRGc5SBuq37F6Ci7ERtigXuaAaUq lJpQ== X-Gm-Message-State: AOJu0YzX5FZ1nHIqipmhLrv8g9TV06BG70qiTV+48schqiMf0N6n4gtJ JBW92KaRWGgyXiwZRRt0f5JdLzkqhYgaH+Vg2gQHUXF7RfMZkO9f+Aum/HTmAAc= X-Gm-Gg: ASbGncv0VycjU34fOOgLApSAK9KwjouNmo0zcSDFY+MYEE/IDll0FNzV2CNpuYeHAEy yRg+QyZg5VwULizZQjmnmrdmoy9P2FuukfceqDBgY/Llct+WNZ3a1ZCUPS5OdLkA/yP5TvMRh94 jI7R0nIK/jWD1xzSkBELFRDgrW31FAumSBPQhcdU5mu8e3dKQcEAmLDmEebhaKg72Z4Ncr800B7 eBwMur1JRFLNs/EvWAAnJcuZiDxpeRQGh4tD8Oq8WZDhWyhaPmQjw7yMgv47F/aZr9xgSsA 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 Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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");