From patchwork Sun Jan 12 13:32:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13936375 Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (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 42A741B6D0D for ; Sun, 12 Jan 2025 13:33:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736688784; cv=none; b=rsctptfKlz//obFBAlHSLkn4uYbqBlN1baiaQpizd0uTM/+TiXynOg0EW64dLgKv9xlAJ/CVsbDCPFA0wKqa4jrkPhjfkllAhgCiiyi3gOQYLWwyupBYVXXPWF2o/0W35aaBALbfxXJYy9H3Tau12mxppmdYbiAymVY8kblk+Gk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736688784; c=relaxed/simple; bh=/XBAGwsAFpwFBBQSU961+beyZLkCUNZ5sGTLi9rt57I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=u/itdNXMuxRMURY5cw7Gqr48+XShZfpNx2SwcRP/EjVXuV34HWu0qn+Yy55Wr3AH20cphUCUBjHFhsHkq0x/UX2SqlC24IAsdHufybLjj6ZVRkxYxq9ojvRLcrJueX09O4YDZZZJDnYE9TwoZXQX2x9CniambeFm6FEWAti3COk= 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=f6jwv//K; arc=none smtp.client-ip=209.85.208.46 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="f6jwv//K" Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-5d3c0bd1cc4so553415a12.0 for ; Sun, 12 Jan 2025 05:33:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736688780; x=1737293580; darn=lists.linux.dev; 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=mRUu7xwt0GOb8hs+BKrBffaLbY4C8ptCLopKQNeTlgY=; b=f6jwv//Kj6lpMJtwm/ZAQo5mgjfO4aX0/8WcUg9I+4TdxIq39vioV/AEzC9RrOfuAS 2mBljz+xOkQnlASBnEwV9YfwTopmzbPWVYDNSVFKJqjYSY/pM3l/9YWCBbfVraH+1MlC x3kl30Zxe31gr/uPxuJI/ZSjR8448x6K1h6S+ZGdcr8mEn7Ukjp482J1bEEXsO+evveo rFP+hoRiR4oTQGPW1wokcJQkPMEuAaxMKqxeGblo6QVHTG9N27FyZuXGDiGNJDTjcxQB LIRk6Id5T6x+7btPN79ywwo+/fW96JMYDjVRIN43a0jCcBLve2xpdZqASbNMLRLZ2elh ufxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736688780; x=1737293580; 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=mRUu7xwt0GOb8hs+BKrBffaLbY4C8ptCLopKQNeTlgY=; b=WDtb9hkjn9SQfh2dxId25ggKeW5AQmTpadSPCef4ZM2frdFX8X2FWd8GzylQaBX3A4 wYCLzMKTsEBs5zzd7Z9xbBg5egCUSDyfnmFr6y5XGlf+OZotN2TeWxz6LynePjCuz77z EhF2IB6mndRY11LcdMBoX6O/5uQvPFrwp0Vv6NIfpCpmmb9LWeIx9FKUNyTmfpfFSn1h hPMP9FuhSIYZdbccvojLIeGht2NmBE/nteflFzSifxr7p1vCMDV+X7Qw+frH83bYvEon wcLGi5mME73nlhDtT/PAXOyRUq7anEJVQyGteJGGyGuzv956kUAItvD9y8gEomxU2oM/ 31kg== X-Forwarded-Encrypted: i=1; AJvYcCXlGWI4sgVKSYIlCIa0KoW3670zz4yHw2x4w4oBqYvqNdqS4vgmymxZztQLHtBtLEMgWdw=@lists.linux.dev X-Gm-Message-State: AOJu0YyI/VDr2dIDlR9z2yxvkQqnJskiOoyBEJKEBzOERmb3inpdX2iO QgbUvDg3tAQUw2eAh3LWzdFrBsSClIgvlc6ZjO3cLBfuKu2qSP+pFaMlT7o0rEZjhoM/hGvXHWB 3 X-Gm-Gg: ASbGnct139I1BMSyzfsw1jwiQAVHUstfWwraUDMo2MmYZYoFBtAy8B8riqvW4qoC2tC 00QGjke1vxwJ1Brb8Lnheai2hFCUTcVNVWrNgukfEzA/SlpVlz3ShyD3kHw6z1PS+McvnIjPVDh t3u/XOMrhUEOfn+YgJlJjOQhjLv9tpBWo9E0VhGYlhTg4NMQNt5471/0EsLUSrTCR3PURt5NFof qNZVkCAwpE1ZZWvmtiueGhPl2/ptgqIVs/yMbXy/epjkkA/KBI07J+akVrA4z0IzmskAeST X-Google-Smtp-Source: AGHT+IHe7/2lTE7/Nj6QfvaBW+C/pcgDJDaV2DeHYFVEZqu1pr4HggBi1zI3dnd6icGke5g9aysmUg== X-Received: by 2002:a05:6402:42ca:b0:5d0:eb6b:1a31 with SMTP id 4fb4d7f45d1cf-5d972e1eb67mr5915789a12.5.1736688780172; Sun, 12 Jan 2025 05:33:00 -0800 (PST) Received: from [127.0.1.1] ([178.197.223.165]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d9903c4477sm3584609a12.51.2025.01.12.05.32.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jan 2025 05:32:59 -0800 (PST) From: Krzysztof Kozlowski Date: Sun, 12 Jan 2025 14:32:43 +0100 Subject: [PATCH net-next 1/5] net: ti: icssg-prueth: Do not print physical memory addresses Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250112-syscon-phandle-args-net-v1-1-3423889935f7@linaro.org> References: <20250112-syscon-phandle-args-net-v1-0-3423889935f7@linaro.org> In-Reply-To: <20250112-syscon-phandle-args-net-v1-0-3423889935f7@linaro.org> To: MD Danish Anwar , Roger Quadros , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, imx@lists.linux.dev, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1232; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=/XBAGwsAFpwFBBQSU961+beyZLkCUNZ5sGTLi9rt57I=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBng8SBqm1C6n54I2y3MlkXEqlfvD/rdrdWXja7l F8+5Is0j1KJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZ4PEgQAKCRDBN2bmhouD 17VVD/4qthD2/zGGxdy7/UvqcrbSUvelem2TFjP4otSbOQQWt2FoBYJM9pNa/ia4nDRzVPRxvWp AB684QLqy1jsKUV6CGPT3D+zER5yVvYN4twzngQrr02IRwqmYMGieUhT4C5lGveMXOBMmGa2mfU udJ4cuPGtlhH3fISl4u+3noNIZKMzIg3tNCkfvRsZDOAxAPyLpaePpjLMBYlgfahKqDSJJ3Ymly +xpGJ/hwDta2luGxIuxazAdQWU4lIeXdwHWgMBrdSensqJLq59XmNTDvSvGOYe6RhYYZEOGkBh+ dowV/JQhEousq+sLQk8Vg6rJ20bAffXxCqMtmMMKK0iPtwmP7eeWQipA3SOUCyoWyqstPFDnJef WwaKd5jhJ6isWq6wImBLMXOke7etQoi8jD70/MBSBHYv5utAytgbAPEPSfrKdDyrDKanOHAS3Uw 3qfAbOu3ld+3DGyNuxGR9gKUfogV69mX1twFMUXFg01h/7HOcmqFUu4qyW79JH9Fm5zJO/kIneA HbwYf3HvIrn7L1rWNCiZIli0eXsOgM6StdpoUZ9ty2Vp8tBg21cFVNlkY77/RG/d4ZAsx89Kw1p bp3xe0sin6kUFa1weHxNQaVneoV7PfrWRYHktdBkv66MzEVc9Yneu5Hxr8HS3MmFxNSjVv5cFp0 Mqd3su6GpsWZLIQ== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Debugging messages should not reveal anything about memory addresses. This also solves arm compile test warnings: drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c:1034:49: error: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Werror,-Wformat] Signed-off-by: Krzysztof Kozlowski Reviewed-by: MD Danish Anwar --- drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c b/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c index 3dc86397c367d2b195badcf1fcb5f1ef39ffabd6..64a19ff39562fa4a6ba6f7e9de903f689a3d5715 100644 --- a/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c +++ b/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c @@ -1031,8 +1031,6 @@ static int prueth_probe(struct platform_device *pdev) (unsigned long)prueth->msmcram.va); prueth->msmcram.size = msmc_ram_size; memset_io(prueth->msmcram.va, 0, msmc_ram_size); - dev_dbg(dev, "sram: pa %llx va %p size %zx\n", prueth->msmcram.pa, - prueth->msmcram.va, prueth->msmcram.size); prueth->iep0 = icss_iep_get_idx(np, 0); if (IS_ERR(prueth->iep0)) { From patchwork Sun Jan 12 13:32:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13936376 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (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 0F8C51B983E for ; Sun, 12 Jan 2025 13:33:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736688786; cv=none; b=RMoXj9DDCO0z2QLddOzt/2PvD42B3qyTnZ462VNt5FcLtkkZUHOtaNCIwvBVwEan5U8KKJDOugE/Xx9fI8BTVpT8pzExVjgKq+74nOCl4mRG4RtakCHeCm+axfFE/PfkbBhi/aGuREoqKfoheKdhEEcmEAPbB5b3J2jOINUp+jw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736688786; c=relaxed/simple; bh=9S7gVVHLbOOdhmOrgxdeq6yW9GeOcGb38tpUZkh03pU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZdPtF/qjcPqoZA5PozGwMp6szDZKpoCUHSdBuQk73GwxlmmvRZm2uyqocTTyAuwTW2s8StsWYvIqgfQeMihucE/PjUClNLylJ+P7WSm/1nrJrc0cTebb7AINP05072n9S0trXd9S3Z54lJBRhinoMhnrPP9tC6cPMmLXeqz6oYo= 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=PC/LMGfl; arc=none smtp.client-ip=209.85.208.44 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="PC/LMGfl" Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5d0bf4ec53fso632042a12.0 for ; Sun, 12 Jan 2025 05:33:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736688782; x=1737293582; darn=lists.linux.dev; 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=BOVqy08C6GsLjB0sMrq2+YSaSxUnwU9JmLZUrKlTUz0=; b=PC/LMGflp+pClPe27NRhlVman8cFG9nhh0gXMTpKf5Fh4Hu3M3saNYPkA1WjoqXgmy ulxW5vxU/UAEFhzrkigPKoHpy26WhwZhBcknVLiUXonnkdm2u6ak5LhVXvCvCSzCfAi4 cxGbH00tCBvcKFN4i1MC24SUXMXvxS/Wu1U9h3/qdHKrYjAxlQLP1v0sxrFnV4R8kOUJ vsofKBH+zBFld12QEcrkSft2oNt5GWSxX5m6Z/n7xYew8izykGTyvjfPFs6sEtlNsZmd 5H00FEu/CCygSS4QxtvX0841xE/OKssLNuZUu89y9vXt1Wysz/6qqbIv5OnCVcTqMrS2 PA8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736688782; x=1737293582; 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=BOVqy08C6GsLjB0sMrq2+YSaSxUnwU9JmLZUrKlTUz0=; b=ZJom2bne7hGNrPa3zYsUM3cSOc1XxIJe1IDWje3BV2mClqupP+0hjRHN3q5Atro0gT /ICAHxZJbVHy2Ho8GNCzyp5DlD8fwajQNZ6HFEyatG+yfP92Dxq6AWM9gpddqLloDBbL +If1ej42AQaL5YMMqHpDg+fGfxa/7AMxZWp7dZgwV+Gt6L15Urd9yOrq9+XiYvkmr7NP 8qeucFR2nv3MasxoSFQYeZXKIy87/xPja1XInYfSAKLwAcRLG/gKTtnr0pEz0tbhke7M q+j9dMvtVUV2C432ysKx+3fqXdXRjQSs3SfNV80Tvj6lWpP1O1RIkU/9GW/j+QWT2Bup 9DAg== X-Forwarded-Encrypted: i=1; AJvYcCWMykDsusYCXOga75vhnZBP1HzgQnrDdcIWbgNTknjq0hKjJCh3Ugfo3SSSCD69fqcTPqE=@lists.linux.dev X-Gm-Message-State: AOJu0Yzt8JzdwDvjX67knJ7e3gGWNIc40vL+Tk9u9/qO3FiScS7wpJ58 78tjNNjF5/9NlTJ+JCFUDerQ2TNAvksJZhGhDkqi9b2ionCwCyPUQb2eX5pa2QZDOIeVKCu8YjX t X-Gm-Gg: ASbGncsPoIEZrC4t/OYigAMVN8Dgp18U5Ry/hPgylO5RWKDwQYvgK9s5jZGzcmX6Ofc LUytOhg82mVgXNb/6ywITf670jg9eROxojjnfHCAXBa4nvbl9w700axsS0ZwDRr4A5jjwp7myp3 DcZLJhisxkR3PNlLB/QIIQqXi9jWGW79Qc3XOA/NQLjH1D2DLgDDizLE0JkwGKCwZ0nXMvK07Ep aw9/7E7XxaDv6QrBaJWEElJp/iD7dLU9enOJ7z4jQzNllzc6maWlBhKnq0xNX2NRDV4jv8C X-Google-Smtp-Source: AGHT+IHAPDDqI1itoMeCFKalJTN43D2b88pk2KL4TDUxwjUyr+2n3z7I5NTnbvxsw1RUzD8twrEPcg== X-Received: by 2002:a05:6402:5206:b0:5d3:d747:6496 with SMTP id 4fb4d7f45d1cf-5d972e801dfmr6260298a12.10.1736688781780; Sun, 12 Jan 2025 05:33:01 -0800 (PST) Received: from [127.0.1.1] ([178.197.223.165]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d9903c4477sm3584609a12.51.2025.01.12.05.33.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jan 2025 05:33:01 -0800 (PST) From: Krzysztof Kozlowski Date: Sun, 12 Jan 2025 14:32:44 +0100 Subject: [PATCH net-next 2/5] net: ti: icssg-prueth: Use syscon_regmap_lookup_by_phandle_args Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250112-syscon-phandle-args-net-v1-2-3423889935f7@linaro.org> References: <20250112-syscon-phandle-args-net-v1-0-3423889935f7@linaro.org> In-Reply-To: <20250112-syscon-phandle-args-net-v1-0-3423889935f7@linaro.org> To: MD Danish Anwar , Roger Quadros , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, imx@lists.linux.dev, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1430; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=9S7gVVHLbOOdhmOrgxdeq6yW9GeOcGb38tpUZkh03pU=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBng8SCCW0MlfjlA9K1TjLeHUu3QGRRtM/WgAZoC WMtHJkHeVGJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZ4PEggAKCRDBN2bmhouD 10+YD/9A02R/3MQQubS4ahQZTK/vIgEnDoLeLOZ2z6ur0SaSsl8P8g2c7riLLdYF92lSsgr7uRd jmeT9wLRxCkXUvDb6BlQcaqDWHzdA8yCfatXJo3i/2gmM28IQU0DZHciCQ9Er059Bd1mWk1TZDp LNC55whGCCGmpzxIn2wGaL7HylIHDR0oWZ2JQ+IBGe4+Iw2oTVS4tPErPl7ysAZCJbqOl8oHjI4 ijfACgxQuzSwv72lLqmbXddZZ5BsAbYIfA0ql2sUIVsXx7/dcdo+J+1922mAUQcDtuQ3L8YdsK1 nrT2AECb9AT2yQFJUWCFgml36SGT/AAGcCDFhEGrSm5sqmRhO+pbePafGg1SzeB/ykFZP8pbtmI kYyHMLG58LuLSM9wBwV7e230On5UeKDGtoQB2lhdPZqpTAypo/lNglE9T0jBII67mTOsel8rhNY 8eWLdF/Ir8VjBmMK66BDKbEGh5NscM7qzw602iC1Zf4w/xVnMqR/P6ukm9kumXSAueVzXvGHj4P /9tyS3lSciwxAHxVcbKlC5/9XPgtg7i/7Ij3eN0jCdXqwbClXlaRNEYPaQ6bGPpOj4Ozpq7FzLc BDYupKiqx9fiH26x/CdTVFDC0seiQ9ZBJW9cttHi/2Pr2k57jYb1KWuMCQeroyLpY+MEyUYCjfb o98tiqTnTayP/uQ== 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() combined with getting the syscon argument. Except simpler code this annotates within one line that given phandle has arguments, so grepping for code would be easier. Signed-off-by: Krzysztof Kozlowski --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index 5465bf872734a3fb9e7e481d556eaec3cce30e0e..68f1136e3db725eba239b10f337786ac735030ca 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -2559,20 +2559,15 @@ static int am65_cpsw_am654_get_efuse_macid(struct device_node *of_node, { u32 mac_lo, mac_hi, offset; struct regmap *syscon; - int ret; - syscon = syscon_regmap_lookup_by_phandle(of_node, "ti,syscon-efuse"); + syscon = syscon_regmap_lookup_by_phandle_args(of_node, "ti,syscon-efuse", + 1, &offset); if (IS_ERR(syscon)) { if (PTR_ERR(syscon) == -ENODEV) return 0; return PTR_ERR(syscon); } - ret = of_property_read_u32_index(of_node, "ti,syscon-efuse", 1, - &offset); - if (ret) - return ret; - regmap_read(syscon, offset, &mac_lo); regmap_read(syscon, offset + 4, &mac_hi); From patchwork Sun Jan 12 13:32:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13936377 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.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 156641BCA1C for ; Sun, 12 Jan 2025 13:33:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736688789; cv=none; b=FFEId/4dKYLv+W5QfxwVCWFJrK2t+C0jfOP2FZiPCBBBw9+iTsbELbSIgFcMqZzF2DkVleCG+u7R6xzpgl9GgUMa0d4i684KZ7whwi9Pz+WBF0dgtoBRYDhiP3d6z959P5wwArOJG2slys4rRgdJM+lfase/teXVsfGiVlGSWkQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736688789; c=relaxed/simple; bh=BLKjHvMGwRWG32GZtZYj7md0qQ8nB6LVGjC0kEjtJ8E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oLcy99Kx6r5i+YBxSOn+Sa8uFFl3aIGH/icrR44MCEJRA3rv0GwQS1ZQWi5oxOBmUMhC0iG335CWnKetjXIrNps7wwjmiwiOwOR+GWckgr1N6A3djzqsHKf27NW4cDRSRKWDjcmWtLxHBK8Kn4qhXe8unB9aHYUbphPCxZi4YTo= 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=TC/ppfud; arc=none smtp.client-ip=209.85.208.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="TC/ppfud" Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-5d44550adb7so597026a12.2 for ; Sun, 12 Jan 2025 05:33:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736688786; x=1737293586; darn=lists.linux.dev; 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=ld8ZPAnxgwhvLaqsgPKYU5t+3ZDPQJl13t2skco9HCk=; b=TC/ppfudry0XyeRC1jAufx2UJ1OTJJUOQG8pR2KUycL4uP6O5LwO2SlCBePn32k1al oSD28o8SMQ+PT+KB9BMplSQANQH3JGcGHUzqs2EqE8JP13idFFYc7ABfun0Lo8LtuXp0 M30g5MkCJk0BPTGlglKnXgalG7le3YqdeDdH+6JSIRq0/PRgfBqB0HESogS3gNWSpRrX yPKiOukeCRROJ4pSkyGK+ve50/Eu228Hb4PP+K7RWJkWxQBOmW4T8njoAyYw10m+sq8H 0Yn7Wlz7k1gTuJkubsV6TDHGuF2v9qVU9gXZs0Cxjekm23KcjCQTJePRBRqragRMutMn kgIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736688786; x=1737293586; 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=ld8ZPAnxgwhvLaqsgPKYU5t+3ZDPQJl13t2skco9HCk=; b=cnSEx7euqf4YPm/OEEtZ/nXdyX6Sc5dEfcs/4ErjJ77KchQscOnXOeYayGHgdRwJuT PxzUc9R6EhEknz8VCqaoJenpaifR2zsV38IUpM3V2szbBg9HBNcDqS8hKJPApCkZF4yV tYUzhneVnAstSCvVvd63BGVx9GGLrIlBjHX+Te71T2crwMfPYwSLjoWYuC3hbnxMTcrC 3ZhtiIfNcJkg1WPGwVUSeeM8FityzrxEgFkM+9PQ1IVU65noLyXl514Z98cuKWPF2CTT EQluExrc9RqKlhsfrRvUvtca03dzQ17TvhKxbDZlowBKWV3tYfa2FsYTPc194jEyvxln AdGQ== X-Forwarded-Encrypted: i=1; AJvYcCVCxPCtflAPhfUR7/ZpIqytlyEsrneJJvnetNrCxtjpmQEWvsGDs8N2EGH4KU2J+cm/Z+E=@lists.linux.dev X-Gm-Message-State: AOJu0YzSVgMD4X4bJLcbrg3bVg+0kYfh2ykmYSbQkImounWOFASN8GHa Mq42j+lF6GQN05g3NwZprR1fx37B1ijyjUt2RiFsf0DnRv7sJscfCC2feYoNMllZ0KRPP3t/j3B f X-Gm-Gg: ASbGncu+CPcAaY3IH2kwYq5ORrU1IfsWMihD2vUk0rK+kA59uPHvKRj+F5DJo+s0tsJ IBbLzy4hGlll0BeO+Rfo+LhPQ0z1GGMbuqCWmJw8ECoTIp/j17gKbUVVqhv1HnOPyOdKvMTV0Jh PC1Xl0llxMCvjM0XCMW/KedQ7sLv6KXIt1WzWBBY0tprKJm4Z6KFyZuvgQkPR65KGtXf8mZXqYa VCapNBEuUQyW61T0XB7Y677A1dKWFUCQEwrujdpUoQxo+jgblVCUkLNcEioGd4JqIUhl3uB X-Google-Smtp-Source: AGHT+IFHwHH4KKIrysGLvqwXWCgJxLn+t19M/gFmLmYbS8NY9BWAcFiBlWXc9XqfFSlrFDFKeUN0GA== X-Received: by 2002:a05:6402:13c1:b0:5d0:bf79:e925 with SMTP id 4fb4d7f45d1cf-5d972e65777mr5439603a12.6.1736688785817; Sun, 12 Jan 2025 05:33:05 -0800 (PST) Received: from [127.0.1.1] ([178.197.223.165]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d9903c4477sm3584609a12.51.2025.01.12.05.33.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jan 2025 05:33:04 -0800 (PST) From: Krzysztof Kozlowski Date: Sun, 12 Jan 2025 14:32:45 +0100 Subject: [PATCH net-next 3/5] net: stmmac: imx: Use syscon_regmap_lookup_by_phandle_args Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250112-syscon-phandle-args-net-v1-3-3423889935f7@linaro.org> References: <20250112-syscon-phandle-args-net-v1-0-3423889935f7@linaro.org> In-Reply-To: <20250112-syscon-phandle-args-net-v1-0-3423889935f7@linaro.org> To: MD Danish Anwar , Roger Quadros , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, imx@lists.linux.dev, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1702; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=BLKjHvMGwRWG32GZtZYj7md0qQ8nB6LVGjC0kEjtJ8E=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBng8SDFkc9BxhB/j87J5OokfF6ZsmgjWIg1zax0 EyCdFlFVjaJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZ4PEgwAKCRDBN2bmhouD 1x8AD/9Aau/f9uUdyr+OxKVQyIA5u+wnl31VUsMUYoZKktqRD/7R89XQcAZ4Ihv5P8LoYFUuGSk Ietj68aVH4LJP5HlzhkuI0R7ergp7NNod0odUeR15RVmyU5WQ9YSj5PvBGpfHdFPuefkEFt1kfw 6FNRml6vfFv9oNkE/EcY+g5RtQoSyyAzH5P42KSjH5G56gOJaaeUOQzRP45DP89NXKhbwdOz+cV IoU4HZYVAU6EnU0frwulSeum1/Wg4j+Je/kk8DjnQqGSTYQJisj6bKHLettlVZ900rN9Kbfcqow a+1Xr5Ja4Lh/z7Av0ogch3QekPRI6lnIPkOX1TpY3BXstIKjyO1KQqVuNTO3qUzj7qlei8hNN0e kzDgRqCIU6AqAvU+T43YltB33DLbadSqmwoIYu6ezF7TxsYDGuMmqp9DMpPf0sZrlxHKBI4kkYi rX+2JHrdxNjwS8F9F1y2KD6jCrNdECHTMq8e9FY3rhyHN6HQE8kVCV+/JvnwQvxdDbtT8dnjQzX /7r7MIXSBoXplzcK1f0vBwLGGxL5mjR3/WmzgH5zpEQth7DJvvIj+FU1F2ZZlZ45Tr6t9pStmgb P02MIOsocH27LT2DgRYEF7Qv0xxUSKyva8FtwrioyZg7dKpYTmtz3UkJn7bGdPUxEGY1A5W2OKc ophfP6EMaGl2RVA== 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() combined with getting the syscon 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/net/ethernet/stmicro/stmmac/dwmac-imx.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c index 4ac7a78f4b14b95169787538b56dad7f7fe162d3..20d3a202bb8d16743ba4f31fa8ebf19a246e8236 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c @@ -302,15 +302,11 @@ imx_dwmac_parse_dt(struct imx_priv_data *dwmac, struct device *dev) * is required by i.MX8MP, i.MX93. * is optinoal for i.MX8DXL. */ - dwmac->intf_regmap = syscon_regmap_lookup_by_phandle(np, "intf_mode"); + dwmac->intf_regmap = + syscon_regmap_lookup_by_phandle_args(np, "intf_mode", 1, + &dwmac->intf_reg_off); if (IS_ERR(dwmac->intf_regmap)) return PTR_ERR(dwmac->intf_regmap); - - err = of_property_read_u32_index(np, "intf_mode", 1, &dwmac->intf_reg_off); - if (err) { - dev_err(dev, "Can't get intf mode reg offset (%d)\n", err); - return err; - } } return err; From patchwork Sun Jan 12 13:32:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13936378 Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (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 BFCF71BCA0C for ; Sun, 12 Jan 2025 13:33:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736688792; cv=none; b=NVQfyA0Mtm8hdkEjUrX7C2AjoCyFf8tRKqNsQ4QbhuNTWR6zk10Sd8GOByqWTY0qxNjzTw72wbq6rb6g8f8fc63fcGPw4QlO8DSNQnXK5Y7eesXEN/9czgKCfX2E0pZ53JmlTWSc6yOu3tbYM0fSBLaT3nVz4A1jb0xS18SH9uM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736688792; c=relaxed/simple; bh=NXMkmgaOV2RUkC4HwkfQVhlGXXVP2A5zrSYO2RnmBmE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JOj2k+Hvgbh8oak4U4ldnJ+P+wrlDq7FQ5q/osycHGcU1gUHhR7jUxOhyyQmiInQwG28oy5bNJVvnHfnkTd2C9cYyu8S2lMP2DeiFZflVHhKl505t6XGvh2KiR9r71KqUPHF3MnNxIVaPI9ndLfYg9ATlIn5Mrq7lBnIR8Zynew= 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=ujQV5sad; arc=none smtp.client-ip=209.85.208.42 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="ujQV5sad" Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5d3e5c225aaso702007a12.3 for ; Sun, 12 Jan 2025 05:33:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736688788; x=1737293588; darn=lists.linux.dev; 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=qkxcGNEB2JVbUM+gOy8SUbx7zqelxFkMblu3o9jMzUg=; b=ujQV5sadED6Zuky1AsuWMYOnoPFSRucwBSfkRXmmeHmwcGO15fLc7nRDVRtK8FNm5o VApF/LNt0sF4f+suoqeEa/EQJS9HUh6s9rkfUbgh9tNqQrGSTIQP2EWiBH8VpA2ujUiX pYh3bf1/AqoZlz+U2+d7HYfp5TY67GwdXvSanYkBfsshjQJypnUzpYr0BUHfJ7wDeYW7 xzpoAADbbaXmyYZ+kH9gwbh8Ong1y9oVYWRQG5e3jUt8JARyNw3L1FP5+ebOJGCxkhZk kzbjHEg+lMJnkcWcIEdSRVfIu1okp95+3D84M7h9Us+TsSWiMsHht34pXU/wmcwIeC++ zoyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736688788; x=1737293588; 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=qkxcGNEB2JVbUM+gOy8SUbx7zqelxFkMblu3o9jMzUg=; b=gJiZTnSltBINP8l0QxRqq4NpwtgQNBRSo10YK1lQ9BuyiBrmiaEI5uOIqGWv4w61pN IQWsZN6BDK7w+25KspqyHUeLHiHHJABvc9oJHlr15bUQvaJJboM/BWIHDJDCHOj2iUcx wO5AlbYbqWZjpQEzMr85PvWSB7IWwl4VLIcpWO2bIp6eS/OXS5/0s57dZ8t35A0yJnnb 6v2woThhAWbg2Vt3+R3x09xmKd//ruxvvtOLwFeoVdXIeGKPrqH1JauovTggVYc4HaUQ Joj9hspps02GrMaWuVdSeYASXSPErTPuKQoKrh8QxXdB15Y+REKCRqu6REvuDVUMG1fJ Kx4Q== X-Forwarded-Encrypted: i=1; AJvYcCWFoYvkvnoO0KcsLbI5Dvm4ZGskavBkDQ8l6i6KcTOp3cNAZ7btymSjKBaGMVoECpcDNs4=@lists.linux.dev X-Gm-Message-State: AOJu0YzqLGstTl4Cb3jsYLb9LYy8m7JgeGP4ljqkDLxWbHFjt/jVPyAO Nd58KMdqed74K9stXNQYZHiiyfWkC5sgYUlXToOlMV8LuuNIdN7R1sgWPPEdJQwnteObTJVtARm C X-Gm-Gg: ASbGnctxZqqbX0sFTCLCaScSBB8eBofXCZ6dKZEDBOibCDzRmkUmhgX+fXQZuALU8UU KLqUuejGrJFhgHPzCAjdyCqvtxb2xEAYw4E/+mPKy3LaryIxtHQDnPIkF1CFVEIOj8jrvYSfUPt Yf9n8Px79R1ZdKvuree9PCOBk7WdUkuOq7am8kToyfzQB08IqKV19uFG/2h55TWuVHTPFlNdjAJ v0MUpfOEnjl7RJ2n2/eTgWQ8LfHxPhV084bumrlCxFfzXlgBO8ljCxRzNQg2gk5JYAtnHB3 X-Google-Smtp-Source: AGHT+IGF6bnQlGOOJSwmTTavg2zo5fkx649YuwkX2KVGh7yeql8d0d2LdpF/plNT/VzyYLuHpWJzKA== X-Received: by 2002:a05:6402:13c8:b0:5d0:bb73:4947 with SMTP id 4fb4d7f45d1cf-5d972d26b14mr6157273a12.0.1736688788499; Sun, 12 Jan 2025 05:33:08 -0800 (PST) Received: from [127.0.1.1] ([178.197.223.165]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d9903c4477sm3584609a12.51.2025.01.12.05.33.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jan 2025 05:33:07 -0800 (PST) From: Krzysztof Kozlowski Date: Sun, 12 Jan 2025 14:32:46 +0100 Subject: [PATCH net-next 4/5] net: stmmac: sti: Use syscon_regmap_lookup_by_phandle_args Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250112-syscon-phandle-args-net-v1-4-3423889935f7@linaro.org> References: <20250112-syscon-phandle-args-net-v1-0-3423889935f7@linaro.org> In-Reply-To: <20250112-syscon-phandle-args-net-v1-0-3423889935f7@linaro.org> To: MD Danish Anwar , Roger Quadros , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, imx@lists.linux.dev, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1695; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=NXMkmgaOV2RUkC4HwkfQVhlGXXVP2A5zrSYO2RnmBmE=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBng8SEMvfAj1e6BkujbTFZ72MSWMgcm2SMXQBGK GiE3r2n/mWJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZ4PEhAAKCRDBN2bmhouD 1+CtD/9NYfzUH01iViVY6CFPIesUd//8aqafZv/j9gif1sZe4BnpQWtWRxsUu6VQdMZlDJKE9W2 glDpCZIW+8lLh+IbsiXM/flGx1S/efHzGzwpjeK7L/+01H4KcEeR/NDg1+8TsGk3d6NX1yF1/js HwaSYCG5gF43SPXB2xa/7mE5PMEKpV30x5gImiU69/kQEkU+hG0h7SsxJIgj3xt/HOP5Z2VjmRd c4HXi8KAUcvDdEeAC1MKg7tZ39OjLQFztwEufapop5grKUL5tbxEaeZ8o2BlJwG/uCvWOTpXYyE XEW+sImdFKOMeKn464A5PXwEu2KkucXyL08nDihzDzhH4RmuG9XNtHs8yCTXvRmIAMtj1eYy2OU idW1s7RxvW3VBVusNX1ehUd05WYPYctpK+gqlj4H6DzxGAUuHu7b+vdVjnbFX+XI4UuUpXlkztG TkLWHNjvzf6OnOYG86bYh4Dr8IVPiD9ikN4N4rK+xw3ax9d2rsVK1/7ap4qJJt4iRlNaFQa5x89 prfGPAHxKBpsWwTTUQYDTjGg46zzir0mxKHPl+GxOyLo/9S+3xMdLTt7AAI874KFG7SjGAIgHcr JNJ2MvA9XFr3QF2JPTvtkqonyCssxtjXflAge8uhZAveyDIMEC1DiktRW+Y3V0P5Xxfzk03OH8G w23Ba9WErAio4Zg== 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() combined with getting the syscon 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/net/ethernet/stmicro/stmmac/dwmac-sti.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c index eabc4da9e1a985101643908d2efdb0b4acaa9d60..d30d34fa6ca52e32b10c312c96d462bd6df859d1 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c @@ -199,16 +199,11 @@ static int sti_dwmac_parse_data(struct sti_dwmac *dwmac, if (res) dwmac->clk_sel_reg = res->start; - regmap = syscon_regmap_lookup_by_phandle(np, "st,syscon"); + regmap = syscon_regmap_lookup_by_phandle_args(np, "st,syscon", + 1, &dwmac->ctrl_reg); if (IS_ERR(regmap)) return PTR_ERR(regmap); - err = of_property_read_u32_index(np, "st,syscon", 1, &dwmac->ctrl_reg); - if (err) { - dev_err(dev, "Can't get sysconfig ctrl offset (%d)\n", err); - return err; - } - err = of_get_phy_mode(np, &dwmac->interface); if (err && err != -ENODEV) { dev_err(dev, "Can't get phy-mode\n"); From patchwork Sun Jan 12 13:32:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13936379 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.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 435691BE23F for ; Sun, 12 Jan 2025 13:33:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736688795; cv=none; b=mQM87bOm+K4jGLrvGggPXWJDqA3mbY69mvVco6abp7BOKScqEZ66qseeK8ZbQZG2B8ZcDEIKUx3bBSFrUdBrSPJBud/xlTY3k86to0d6DX9YaZIr1NkM0WcDDtx9S/YSv827cJwJIYOnX3/R+vK6rZiORj+74LKem1BieUqClxo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736688795; c=relaxed/simple; bh=56BLcFVoX+7Lw71cTwO9yffs0jhx9suVmg3Qou8SBBk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WfXRishREl5NoabhXsG/dfD55M2uighXWUqimAGXChk6GyrdDaNDrSvRTiK10WlG4+VrvRNvZWGYdJki7Lyn/WZMi92p+ZtXCmg4B9xFKL+gKiMsNXWi7VpclKgO4LFbxkBfvM7wbFmpXmPmZn/ssPWaihmVCod/Q0+fyrVjmMY= 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=KlqEYEwq; arc=none smtp.client-ip=209.85.208.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="KlqEYEwq" Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5d3c1f68f1bso504805a12.3 for ; Sun, 12 Jan 2025 05:33:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736688791; x=1737293591; darn=lists.linux.dev; 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=TB4adxko33N4lxV8vB34w9Deg0raCbTSnaXjgezepI0=; b=KlqEYEwqyMbHaR85GGp7VPeFAyS4K1yfp+fglGMzBTaOZNNnkTeHfXUYVID+QGmZhx pa1foEUGFcK6FJ+UJ6lMojMau8UhfPONKFu/OPYR4bzlwuBy78C/mya7F0IVSdxhrjim lYFqeDBqSAwHK3I7kluZf8ltCqTBu14HEMZpeOwWhUCkXwnGfaj37Pzo9nyMPmKHfdGs eec7tjQG8FwMXzaO/6v6QqrxEJvjW5Vp89+l26BbWzh0x4kAUSagoprxtR4zaXY6R6Br EK3770NBAsqWuPZCZWm+tv/ViYt8cmGW/AvYpbMCOrf0O2+4PYNDmCoPga5yBmaGVq0X 5U9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736688791; x=1737293591; 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=TB4adxko33N4lxV8vB34w9Deg0raCbTSnaXjgezepI0=; b=G348vlKeY4/+FOUUOgpQ+uDmIsGGGyoLjdDEIt/qKDv5rvS3j820AMRFxFlM/BtL3e wUSYjXuuTW4DSW4zjTj8FKsyMeiyvDms2ScafBUwtGisLW8gt5NvsBZtJSc570UDVJ4q le9gh5OvQcib7sIK2zQn/klFcqfxScHtfOHr/wzsuyUpC5T0jDVkKTuFkxwWaqsvTaRy ab9mMRNNHot998Ci8CbKEiRC1tvIpHRM28cxc3dXu39/Mx+RgOdbIMdK2xQSYHv4l35O kD8JESyxnDAySBACOZgl+sn0uMFpIhBaMwpl3fEzHh/kWVUqDk1GmpSroMLcNurumGuJ q6TQ== X-Forwarded-Encrypted: i=1; AJvYcCU0GrD2Rtyel09/sG2Vv4DJojgJaBFRkNQp3VEM7RaCmkiXTCeYmX0zn00iz/Lu0bD/eyw=@lists.linux.dev X-Gm-Message-State: AOJu0YwKHdOGftOxK8WfIKP8gOE5oL8NYpiOjLTGVgdjBCYvg/xB0qVO K034I7fTinNMXOfgGouFm1QAPayfCc9IVDMAnWWkGa1lJ1640Xwsxd05e3rnzBwH8oH09TiOvYM Z X-Gm-Gg: ASbGncsPCKDcQ3bbfULWuLkZz4xi0D7+GW/9FbFks++PdcBHXdapdNTPCxI7DCIFJth 4cqipklhashKa4tNUnJmRlvmFzM0YduCoYGBUcHzJXrghDPwMsbGe3JIoDTG2J8ClzSW8bf1YxZ yayBe77bE5Ktr2G2O1vTqubG5PxJmGWfsiQXZudMjeDAUygdaLI/Slo2k5Lgu0/WUTNAA23Ehsm D2Lvf4E1lFHYUyzlPMMCWAW3KVGJKFvYTTkwjE6Ph3yEOCEkyg0ooEMGbrn6qZMFOD0ehxl X-Google-Smtp-Source: AGHT+IHIeA9RUVsHVjCtYBXrSzIpeTFeEgLh0b/t4eC6XNfpXfMITPN9fmFvIdYvwM7BkZDK6rGKqw== X-Received: by 2002:a05:6402:2355:b0:5d0:8111:e946 with SMTP id 4fb4d7f45d1cf-5d972e15f45mr5790801a12.5.1736688791295; Sun, 12 Jan 2025 05:33:11 -0800 (PST) Received: from [127.0.1.1] ([178.197.223.165]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d9903c4477sm3584609a12.51.2025.01.12.05.33.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jan 2025 05:33:09 -0800 (PST) From: Krzysztof Kozlowski Date: Sun, 12 Jan 2025 14:32:47 +0100 Subject: [PATCH net-next 5/5] net: stmmac: stm32: Use syscon_regmap_lookup_by_phandle_args Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250112-syscon-phandle-args-net-v1-5-3423889935f7@linaro.org> References: <20250112-syscon-phandle-args-net-v1-0-3423889935f7@linaro.org> In-Reply-To: <20250112-syscon-phandle-args-net-v1-0-3423889935f7@linaro.org> To: MD Danish Anwar , Roger Quadros , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, imx@lists.linux.dev, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1641; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=56BLcFVoX+7Lw71cTwO9yffs0jhx9suVmg3Qou8SBBk=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBng8SEkQmvfABZs7QuVyVH4wapih3fPoh+Xo3JF lM90gZIsb6JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZ4PEhAAKCRDBN2bmhouD 14yoD/9oAXKquSceP15cb4gscg+NjoZ+s/tq5Q7p4hSunWTAFL8/Wd9T3H6hKFgZZce+fKazJeH OuMNJ+xcL0SXlWwVY9G4b9YXdEuYoJA6TSXQUiajhx0AbWHblwVbebmLTEJVyYxSPWKdYMkDOM1 TwZdHK7mwNYgdJvCSJ5ND4AME0ONupR57eCjYKJHW06hflFBoqQ8JoXGpkG1cVrGrD5Yc/OpRdL qs0TPrx9Pcx0TLduLA4Y0WEIwAjWwQqipQVQXuiGf7bJDAcmgmrl3MMGhztBFz53tcAzWArA+wz vb3OxaD76FgG1AH8bHu1gUF6XiOMqGyO5MNclKzxnq20cnvmD51A9HJVo4AZ6Kn5iyQ2Uc7JAmX f852BpZXk+tD20hJ4LWw1CunjrtcZMKrTZs3KwJJqwhYUcylqd5+Jud0bH/kIJ0hy0kr4HV12ME 3cNiRRBx75ErXkyDnOh85zzcqJ1wHwyKln9Bu5QVcuOFmneuqUyzyCf1YYN/Yo/V1dGEMoThVcc Q91OFMfYpRjz4xynGG/SP2H+RVf9RMxS4KE0TyKWEUrX2T7KR3PB9WV0SZsrOss40nqpKqD7WaP y8K8kyRxarGD7SGNq5RqQXaHmQcDpKew2kHjLq1oC/56T8THHvlHWulDPgyaCHBrlE/uSvzogDW bj/Ib9m93TZhnaA== 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() combined with getting the syscon 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/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c index 1e8bac665cc9bc95c3aa96e87a8e95d9c63ba8e1..1fcb74e9e3ffacdc7581b267febb55d015a83aed 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c @@ -419,16 +419,11 @@ static int stm32_dwmac_parse_data(struct stm32_dwmac *dwmac, } /* Get mode register */ - dwmac->regmap = syscon_regmap_lookup_by_phandle(np, "st,syscon"); + dwmac->regmap = syscon_regmap_lookup_by_phandle_args(np, "st,syscon", + 1, &dwmac->mode_reg); if (IS_ERR(dwmac->regmap)) return PTR_ERR(dwmac->regmap); - err = of_property_read_u32_index(np, "st,syscon", 1, &dwmac->mode_reg); - if (err) { - dev_err(dev, "Can't get sysconfig mode offset (%d)\n", err); - return err; - } - if (dwmac->ops->is_mp2) return 0;