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: 13936382 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 D417CE77188 for ; Sun, 12 Jan 2025 13:35:45 +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=mRUu7xwt0GOb8hs+BKrBffaLbY4C8ptCLopKQNeTlgY=; b=X11aia/CG8J9KX4kPVb5wJYJBO Fp0Z4Aoobk+pyPiYI2lnoYXImkLLgJtjrjUuG2et9NzRd4qwgR5y9iE5RyxdeXKOAI5H4g33YELnz ClARcv1PG5GoZEvRAtbsEsqrbZCxRDWQQxRn4WRUaUckIy3/jHCQq2Rqz6+rd1VKhXtwQgupXPt+z b5qeqhITNrCS6D2A6VoNJLFIOsQn4t+JpPXoGPUYVppYjgFEP3MKYT8eL467m9UjPrxJRCz3t9PQt EBlVgoNA/Xn/bDB47MJjmT+1WHMrcCD7U963DvlaDAh86yjrKlUhMID+V55j6jjjRW+Ikes31Y3pB 0wktiDIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tWy7q-00000002mEP-0fcQ; Sun, 12 Jan 2025 13:35:34 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tWy5N-00000002lbU-21Hj for linux-arm-kernel@lists.infradead.org; Sun, 12 Jan 2025 13:33:02 +0000 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5d3c0bd1cc4so553414a12.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.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=mRUu7xwt0GOb8hs+BKrBffaLbY4C8ptCLopKQNeTlgY=; b=sSzTljRk4/Gtbg9nzcM5GWQe5t16jN+/Bs8obIOQoSw0Ai19jQHVZCbERuma5ErYac 3mlUaeD/EAPN1z2+s+CxhA9xOsf2Wnyucfyy26VZCf7KkeF0Ux18CqklGY7I7R43kmzh ZlypLkveEXmUy/KcOWcJbbFcDBZYDVDQGBYefgF7KvtgND82RLiUUWzbPWehVx/qJmLx bJQvGvDqFWMOMqQycjDpgscdIbhrmfV7Da0ZeqgvZj7IoebVWI9iwwwbjaNZLjX3ge0p MDqLAzKWRVoRbj4YGYfBYM50d0qTZKXXrPo6cuIAmGvtl7CV/jz75bdjw34tJiuNu/Yk bDPQ== 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=BuVInpaLILnR1vMFiJ4cRPa1i01vonFj9NTK77OSjHndjbSu2pZmoQ6Y/h4JVCzB8n 49LljdjxVfjNfGIeWiNZueeWS1lZfHToUUF0ewV4gwPbVxQAc2Itd506uEgmM9sLdFbG AKaGgeKES/ZMPCKWr5VFu4+tlqCBNzhIu7QxZgOBmhmDhZnlYm+DkzPa38DWl2XJ+bbc kRhoDSxC4Wuh/YRaKdyCH3PGwtmFfTb6l3bYpDgwcsuOq6sCf7nKQ29Laj0wj0R9qWcY LMlPzmgkbUXTOsxNDe9pNEjlp7kvQ/lU3mglhGVmpODRMedmMV/50b5YLlqppagsjQ6y 10hg== X-Gm-Message-State: AOJu0YwFxcntjfcbjYRA7x4/fBuh4KDbgy9E15DdZjuD4sIP/W56JvIs IHmyqd6jpJM0BtApOLofr6BnhtSxycAdGplLR86tEhCbOdEPcI+nWfbH35bYNGA= X-Gm-Gg: ASbGnctQLbkBLUm4NYxie9k/LddP0ZsqtlyX2RVKytP70yuqonomt6lWT65QnZUAa1i bhpr2bTgIXU5dCnK5PJHB9grBfb7QC5K8W+1PLuQyjnsxA3vZ2FetPgX+R3zmnt7e278lSmv0wL 1h1+YZDpm9l1TNe/NuQPEruAoACHbi7VxCpfaeqP9hz8CAHciQYWkTwJHZfee1EEvp51Dz75cnh E9zLFKryxRVZhzejTtah4Gs+S7v52WK3OtbZqbcDaD/wKqOv+yo/nLsGh+eW0fuCXqK0UA1 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250112_053301_526043_2EA2D868 X-CRM114-Status: GOOD ( 10.21 ) 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 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: 13936383 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 39FF0E77188 for ; Sun, 12 Jan 2025 13:37:00 +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=BOVqy08C6GsLjB0sMrq2+YSaSxUnwU9JmLZUrKlTUz0=; b=4i5yqjWUtx4mT01wUgwMGBe2CU PtfGlswuQPkxIIgT9RJ5DwShZVlg3jXSb5u8c6zUcUMq/XFAKJeBT7ozQcFI5AVNmSFjh5mMKiTpf Q+tO4s9k13btTnzG+sUd/efk+8uPTvoF7yeDPWnc2hhKd58W9XH3UOCFvSNe+JhSwhb4y9MmpJPJ+ iIVaPgive9W0FLUNKpt3Wif0B1Z0vgkBunTuBH26zNTDWVJUcOQc5/w74d9P7acjtj99qqGga/HEC WeniG0MkgKZCmPd3dwd8wD35kn+kB3beTaOxtj8Wj5hkdWDW/TXUOrqRNEBKaail8Z5DiohSoWCwR aAIde3Rw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tWy93-00000002mQr-3iYd; Sun, 12 Jan 2025 13:36:49 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tWy5P-00000002lcM-1wPZ for linux-arm-kernel@lists.infradead.org; Sun, 12 Jan 2025 13:33:04 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5d0bf4ec53fso632040a12.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.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=BOVqy08C6GsLjB0sMrq2+YSaSxUnwU9JmLZUrKlTUz0=; b=ZyBWCApEkDTJYXGkiImFD/PWn2qA/f0nhb/7ZXZxuWquZ+EhmZ/koj6zNHMkwihEPs cXd5nzygwScv2YYVSFzRd5TLjUQT54U/OKgYfUc57fj5PLMcyR77h6RECxz4JputXp4b QPEEcVQyeNUNMvlKJRb0cCwri9Y5UHalpNHVIVmiiSzxU8duofZ70w/6VLPh51kENvXN WDlEDs8dRhcHSVuICqzoyV5u2+mUi1NgFgIYem9fCUTyT4/IomPGVHqyBPBsFOFf7b1T 0ZS1xaVmbAH53RzFZmz3VxuON3lJ6k22AwQNmvcUBvkuXnB4H72zF2Zx7rK9YkHuaXg3 1JeQ== 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=p6CmUwedy4FwKqzqJAQdwgsbJ2xgB9poX81T2VupU2bRkDSi/xjJztLyG3PptGrbez GKFY8gLqzNcESk9zf0by9hc2oWSm7d7F3RFo5wME0wGx5AmSfOruyIgdnuvE78WmwWbd Ejkz02D3u8ICGSL6YQtBuhyZi6ggrBOSNSBNHQeEfg7pPfsq5IlsVEkDGNpUKjsBKSZM MhbNxbN/2zPYC1n7boY/3teCNfMur79O6SXvBV+WLi1DsuU3019H1CFo9KEAmeHZReS9 UQ7/cqjAGAnd2XH3zM1pNzh4K1HIUmbdHzQ4iRFMAs+fWifpmrcsj9bVffEp5yw2vJhG VewQ== X-Gm-Message-State: AOJu0YzN6RFsrA/Cjm33ySRI9/7YwsdD0vhi2steVnY39dHWvtgcqPmG lba3I+ebUrKKr/CogHFmw+8DbVgeotC09APw07IPF13uYSlGT1IfMWQv9fY79Fw= X-Gm-Gg: ASbGncuSfu/ZiKCBLl3LhNc0g024G240VAFeq7aOVSNDEtGlpRkjeJaYO8phyhfI6r0 CUNIHfjvM0CPGLY9Ge47xScvy+uLbhUzJy3gtAtqACyOCb8RMaAbODynX8e/GfFZ2g2b903t7NN bEF6U0uimGbHIndLshqMLnyX7runpDol1lAuYxmUkni1RYIHb7odnPngk5XBhVAyhXLr6BeMIQ3 D5adPkKRH/tzxvVt6plc/xQ25O7g2gu4klWq7bUkEoLPJvhEFlBQ/EQ1d1NTS05V3WXOvwi 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250112_053303_506418_92AD7AC7 X-CRM114-Status: GOOD ( 10.98 ) 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() 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: 13936384 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 54606E77188 for ; Sun, 12 Jan 2025 13:38:17 +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=ld8ZPAnxgwhvLaqsgPKYU5t+3ZDPQJl13t2skco9HCk=; b=ELUljNbn9aN6y4Ri18AMkL/+Z1 i28OxzxeNFwNMrdIlGPwEWESd85HZSoqfrYwwwAG/pPrHJvyHQPReBF2Iebvypx/sjGnj5zeUoGIi zkHMOjQZAGVNZY+safTnFqSohmxQ9rU0OyzeHXGyK+1KxdKVu2divl8aATRVQIx1h0nm4rlpNvF3L zWLxRapMEJ8ezEM3JDxWZtquoNBJ43JozmJR4xqgwWhn724QSAUiSxUF9y+W6k0XndefPutKd90V4 477nSlzBEQ2z4o+9dUWHxMqARddA3xrEvXsTEwTANEFN0T10LJ1pP4F+pnh05lkz9eoNYvtZBMIk8 AQu21Rew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tWyAH-00000002mdn-2ZtY; Sun, 12 Jan 2025 13:38:05 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tWy5T-00000002lcz-1LyM for linux-arm-kernel@lists.infradead.org; Sun, 12 Jan 2025 13:33:08 +0000 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-5d3c0bd1cc4so553427a12.0 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.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=ld8ZPAnxgwhvLaqsgPKYU5t+3ZDPQJl13t2skco9HCk=; b=wb9+ykYdfRlkEs6qvnMJKWkm9lu+3rUX3bYj0qC6QDb3g/VrBv0ulWz+eOB1d7RvXC X2MVCvsXRaJiH44SiWf3vD9v1Qqc+/jsmdmA6vHuhbFtKpKN0w+el1oQdF8KL6s36+Ya VOsUUzWdAIGOKeu1o+YziiGhLt5k3BGtsb6TAwAk1VQSaiiv9Kdxn4ISt5vfbXMDckyA 0baPOcx6qczZ6FrRM52motCfqvfN2q8QKUsyjF0j0Ep2NcGiEp6gN0P2gW7XV758yXQi LRsYuW+DBZSWnYuBy4FlGj0df90SKV9nSw1BsYNb1+GJ0HccL7suSa8VYEGrAIcsepFT OvdA== 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=eEKY2Drsc7fVjQ7R/tnH9R4YK5HZl+zhlFuWk//QJE4VB0LzjwVSXraVeu0fM8NQRd JaRnqjfTQycpotxeamMEhDQ0Uge59FEmHlG8SKugxvqhSZVtvprkWo5CiMZuGUMKlKku YShnaCrZIKwGtn1qAtsTjPwG9mQp5NswclRsxiP2C+48YSLcHFy9pO7PCvCh+yO9Xo7j KPyqk/z0i5QSM1chonIR2JoBpVyJgmu7gsQ3KNPvcZCNKRysSF6vzLry+qRGh+fQX+AO fSt2DXwaGa3Jw8yh+Eb1iDJiqzuhg9EDb0QZ/lVVL7R2NYmFreEV6wSgM6huJird5XiI RyRQ== X-Gm-Message-State: AOJu0Yxv/sft7HsnPYiFU65AKQ27luWg0kO8Q1Bi8WNWQ/uMNlfMgcS1 8KfF1C4RiGd9nBYwKCqdwlLE4Hz87XNTq08l9HGYDkka9yKAlyJ+GC2qlc55UbI= X-Gm-Gg: ASbGncs/A1u2AFLKz6cWQ6A8tm8lUZ8PzCLf097X/oN1ohJFG690B+q8i//fiU9LUku E9/KJEf9gqOP8IqIOPKEyNoniph3VXEjYp0hVBaYQwWUuOtt2dzg08UpFOOm471HREsg2QE4psu afocJjLxPzCqzIDyEegQF76nD8MQXqKHGrwhzqyJU5TJ6ee+9Gvhsy8Htyw7fPYHIsnQi8/yqTh GP2b5RdAl/s8tzdU6GaHRIhKKfkberxZZllq2+Nw3f/7fiCs8/Rg2g4haFEZ8DrLwqZVJ91 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250112_053307_373568_3A2F0840 X-CRM114-Status: GOOD ( 10.67 ) 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() 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: 13936395 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 7405DE7719E for ; Sun, 12 Jan 2025 13:39:33 +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=qkxcGNEB2JVbUM+gOy8SUbx7zqelxFkMblu3o9jMzUg=; b=XEiCvUHi6tHM/QTcls82f3bWtM b38koHBsXIC2HXRM8MEpXc6rwTrpdGhFJQ2M6V96SY7ziF2N1ER94bkl3q6dcPqcIWeZeLrp3SATg IyibxOQtBmo/6PigRBzTsD3PzGHybRs7DB7u6LpybXHXOMkUUkD1iUNN+fY2h0DTTFVW4wgH/GRB5 g/u5H0IcgWMNYwcc/L99TlEuR9EYbWsN5T8gzU9b/3gDvPsudGNmHrnvrZkSz6yrVO3uVWZCFpr5M gwNbgFcKKxFF8hPqe1FunuIgoR1GhQn0iKMGprKmnzBt6u0nAqVMZWypmkoTDdW4io3nxz4zlRgX5 ycFr5gxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tWyBV-00000002mmz-1jCh; Sun, 12 Jan 2025 13:39:21 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tWy5W-00000002ldm-0yab for linux-arm-kernel@lists.infradead.org; Sun, 12 Jan 2025 13:33:11 +0000 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5d8753e9e1fso631273a12.1 for ; Sun, 12 Jan 2025 05:33:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736688788; x=1737293588; 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=qkxcGNEB2JVbUM+gOy8SUbx7zqelxFkMblu3o9jMzUg=; b=H90HAlhEj6VppLipJP0ygRLsen5fdK/wVbvvIjjDH4uzXFgmXwbg2GuVZOqhfU7C2a Slziby1YC8mwvc5gu/IrgRhbH17iE/KS8hZiO1z/wc2O1kD17CiLz5brG8OjiBkKH6vo L93uOJEeBCNSUD7nVUYtdcdBkXM2poMzzbeFoSxnMgo/Jc+zT/2X8jDZhN5wV0vsodi3 XEuZqukdxHShTZnVJW5NKLgelKFqI9XZzd/KdZLfQMXJ8Qg/a5ifR5cPh1LiflryN86O E0avTCYe8ibN2rsDqUE2EHBC3D6fkOJ6eNn0evRWGnjwvMJHdDqasdoxgF0OEQ0CrXG/ EtDg== 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=nvnnej40VjuEcBs/sWMZtXCa60JU7QBjrz6Mwr+3CodxgPiPhjU3pujaxeXFM4Y4Ub 3wlU+s99RcVj38Qu1YLh7JpkvMq2Lqf/Czuu22oEj5EeuJbqHgVjla6jv1PkyeTXvLcY muqQBSTXf7IcRUownJqLOFfPESTVGC85J4ZJ6cioBou9FEld0pI/Gk5ycFxO+OgZkYCk RJSZ9h58i2MVNYQrTboHyUdlWMIbPi52V7JFJpbky9rvC441UwrCsgXXL0NB9GVCyIpe adxXpyuWh/ovBUkDKr+i7ms1vIX+3/KR8iSt6FHDTOo+Hq8JBGACLTcjezaU2wCD9aIh bGIw== X-Gm-Message-State: AOJu0YzFkGMtnwRdw3CXq6u1M2g7CaVolmJc0ZugPUmqkm2KOboo9R7y Q5ZF3tZ8gte1ImJCAjagWu6ex/DnkXa6N3c1fMtaF+w0GTt2HL7ldMLcQ4VOhlE= X-Gm-Gg: ASbGnctRgFRpvq7sN19T5ogxYStdmFW3k0iNj05cwBS9sqyhPRLbBiQDl7JRXn6+NmT h5/viVJ1UwThi6JxN7+0rfsuc77eGc9ptg2rHHAFq+e9y+4sQ9DZ4GZb1eDUzhHRzImw0y8II+D P2eQs9J+T2Ov2S2SDEKMbCUvxcvoA6tk87l2dkc9sSnd2vDd9+ErzEDnZNWCIjoyuygL9UpAJTb LeUCUjm+AcgkhMkQrXfXyp3ay7D0A4UIK8n4AqIQiStywxm9ZytvyFoGSmGLJqf3y9+CX1L 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250112_053310_275438_972B1D02 X-CRM114-Status: GOOD ( 10.47 ) 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() 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: 13936396 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 9BC06E77188 for ; Sun, 12 Jan 2025 13:40:49 +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=TB4adxko33N4lxV8vB34w9Deg0raCbTSnaXjgezepI0=; b=Cq4jDufPzwAUvHw7XFfkaXzcSU D5NsNq1sGs9F8p5fnQJKQmDj2JnT2SBQ3gfBISQcaNgZxxw85/O9eT7Z4Torl1mBLfVnOVh9kv+4I FsbbuODcwVpO9a3k6I0DhutqLKH3H36gUJmzOHSh9ty7uf2F+tblRZc4exrcuP0uysgF3uP7xzqeV +zxAf3w8K9XyfMDCQSm1nEMwegIqmZot+kY+bhpxLz64mCOc+PFO8WNqKSIvIrYXHTzyfz8UP1nKJ eLWa2m3swl69i+JwBOdmdbpdHbCDWdoNxIbd6P7vILsHeZ7CRsXSc5Qk+CCIIvNVGpUKjI62aakfT rdLlKeNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tWyCk-00000002n63-0RCo; Sun, 12 Jan 2025 13:40:38 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tWy5Y-00000002ler-3vY1 for linux-arm-kernel@lists.infradead.org; Sun, 12 Jan 2025 13:33:14 +0000 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-5d3ea2a5a9fso441143a12.2 for ; Sun, 12 Jan 2025 05:33:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736688791; x=1737293591; 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=TB4adxko33N4lxV8vB34w9Deg0raCbTSnaXjgezepI0=; b=zpJlymowe7mhELLVgjrh+onfq2styhDj3IWlTk39Emlt7FsASh7T1rhUNPAqsQkyFM ixxueDtuUBG8CJAXuiTesmIKD+94P1+2dtsbyZ98N/0Cjy6KsnqjxOP8JOCaFXaviOgL i+W8dNKPNBVgm/xOlmEqAvRGLoS2wRkPH9T6fsY2FQThwCF7+7mG4GsWyy0NtUiBza38 1AgcPyaPZxAzPvg+OPe/bntUdvIsBS3v0E6GjoM/Tf4RI2ncN7oSsKH//6EQZy/do179 MjVE4YVZnKGWqqNhGyK+HyrKswd1z0+7+/EFB8EiXsg1+WZ2pADH05hEx1/QRy1nNEod lTqw== 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=iL63YdXqnhNXcWA2cw0pXGZetP6VsIazc1ipnIQJO9Ikj8urABEUjj0UnVj6K6gMh5 DI1I1JXgWqVfubQ8aoD/v4F592/FCpxh948wMZaGi9X9BlM5CjhIFwS1IDm/nF8nfRpC 4dG/kXEWP/IJ+BbTFG2/NE5DaqV8b85/FtzLF1VrMwWHz5mp21ebzpFba8NbyDCjft/2 hz3bbA4s0q9b0o+52jfU6z+Fp60DFN8h9b6/y1Kq34PvX+sxbRjrn6YuYhehwjqMr3T3 wEDO3MqxPrgwFzVelWjgfHDw41o7EWzO2q1KhuxZhVhNPglK9Shm6mcPh0NHLo+5kHWp c+ig== X-Gm-Message-State: AOJu0YzkvM3LhMN7IW83q5hBfUEtuzoYOsKjYVTlQofs8PeVe0cov6EJ K830ZtY1CnK8PyJ70T6xGeOFg450VuZUyc3VUdnGVHTcabXed21pGzYhhzEU+xw= X-Gm-Gg: ASbGncu6s8w5j9ue+Hzg08YnDsS0Jpd8VHe16HhvDzG4DMfz1EHD6WYZenoZXdaTxFx IgSTPQByoMxw33qsWRyNWTKZCL+M8N7K0wbX6yVWByxdk3dzwoZwaMnGa+asn0WYIL0OdAE34r5 uZRk184V09KOCLllMT5GvdOpu86E+hEdm/VW6zpkUSzhHv3hduUAExCN0MgQbZRrmqnXoIi6cL/ twjMKPA8TqJbCu0YMLHs9QSEbjSrbtWEfRDLdOvZH0+GO7eFvrkw40eWGzKI1HH8LBprJCI 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250112_053312_985085_3D43CB15 X-CRM114-Status: GOOD ( 10.80 ) 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() 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;