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: 13936368 X-Patchwork-Delegate: kuba@kernel.org 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 E0FD31B6D04 for ; Sun, 12 Jan 2025 13:33:01 +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=1736688783; cv=none; b=rhUeruC1b71Q4Uj2rLVgoJISQmk32HGvK8l38xP0TApWa1jy0+UL0BW5ht4ikQNGjYkzfguAbKeQYt22SSwE0C3+6YdK8FgOk6HQ93bcrVaIdl+GurVCx163/a2H3/Vr/K5NG1CnFJrC+jS4uJBP2Mj+Cf372iVajJdso4y1AO0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736688783; c=relaxed/simple; bh=/XBAGwsAFpwFBBQSU961+beyZLkCUNZ5sGTLi9rt57I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UAz5B+uHpVSPQwiPtcolpEUQKZvNb65psLwaLSY0S5f9jqRW6HjAoN+A7NTWauzVWmgaZJ2/nXoKA7I+QbZ4Byoz4P9OiMS0GsupRRe1RBqiP1zojyBkspVEsifgdlEb7MihyYb82GWbJ5pTzIPnvKFPrdsvyz16ythlwgfRfm8= 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=qCOZm1Pl; 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="qCOZm1Pl" Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5d3c0bd1cc4so553411a12.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=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=mRUu7xwt0GOb8hs+BKrBffaLbY4C8ptCLopKQNeTlgY=; b=qCOZm1Ple6su6xubB3aUzkbcGZY5K7MO0zPdNroySwDfBp2vZjced97lXRs20mCMjD TpqNhAYOVSgXEyLUlwSKPK8myR7E4LM7lC0bH/6uVBe64Tw6gbFrweWAezRV31FuqUus ylxA6yfdVHaoAn60GnMlTomzQT83GX65ptlRn9yCLiAH2XouZZROH4/UZ6DND+mRAn3m GUPNcDrglp5bdhdfK13nsmnv2pEJb826beBvVUlt2J8Kq9/ewyIDbouux6zCTx0spjgy Z+S6m7i5vmbAAiB5JBlkomehkCUsVGaTHdlUqfxb7hRqcQ0eLGt/bFrrcX3k8TuXz5i4 fTxg== 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=HVKj/Ca+9Wsoa7sqWsPyIqNXkHjc/mDEsdKiIgLGCQKEd6mLE87BtsBGHokw5JEtWS JQPJgOCblrBqcf0cBbDzvB96P17joZntLPxy8aeo8VZaPE4Y6vQUx+YYS3uc/bCrcQ1Q nUZMMTnYHs1H4lD7l3KDg7qMX9QsvfrZXYuMdjvbNITbM/rfm/EhFqrdEYJ6iQOws4wv fY8zqhqxjQo0bm6QfCbYXXxuco1dpgzRQdFRFVJfoKIrqWxHa4hLL6j+TgBc+MdBkFCN QI6AMmTLYqueubRTKkt+bejF8aehRvhY48SmIvcR/viMNNvB/ae1VI9/xSbDj/lQx6Oe FsQw== X-Forwarded-Encrypted: i=1; AJvYcCVw+zwoKgJxav4xsSJZIg82qx6BMwD8T1bJBXmDJoaDOh3KYLR/PeqR8zBz5V/Aa52yZtnHqkM=@vger.kernel.org X-Gm-Message-State: AOJu0Yzi200Rmeiq2u+G7wyFnUxXBh0QyugGI9jh3drlauJEwQfURZIh eZ165HqNM5tAOrinsCHqmuX1ln76qeTSlM6lgOqTMTV7h/ASxNlePPJIxdDVRTI= X-Gm-Gg: ASbGncsTdvp6+QNVki8YFad57TUZJZbwSbZB1z+fZKBgzXmu8nVq3hECF4dckukfTp9 RFAFXhH0fZN56XF1QfrR4h7AToyd7yVGqDo9CBmZyegohUFIyxet9/uxW46ieqLxtNCNwVIff4p sopcnQsydCIvzj1noaKKLl3iJx/NPAER89IT8vJAF09X6c8CL84gXNUVEo49rMiCzOYL5PWhAEG FAP4H4ohjUDKTq/TwGmFbC17gZhuFQcIconWVLX7B8H0nZIvVxcXSKa0DyLm62YCp29Xlvr 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: netdev@vger.kernel.org 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 X-Patchwork-Delegate: kuba@kernel.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 --- 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: 13936369 X-Patchwork-Delegate: kuba@kernel.org 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 7A21E1B81DC for ; Sun, 12 Jan 2025 13:33:03 +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=1736688785; cv=none; b=TjyZ7qrGe3bVniOPByVS7byi1b+PEfy8XqMyrYM/TAogdOQOGvphhCrkpNJW39uy8DfVxPE4WDwQILXQGUPM+wbWcdhJ1egeMiKIM8aIr4Wwhb1mKmnjAvKJb2esmcPmIGeaWWeV5k9QxHGqZ2FIN0MKwglXhmjTrUNb3KrVbPg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736688785; c=relaxed/simple; bh=9S7gVVHLbOOdhmOrgxdeq6yW9GeOcGb38tpUZkh03pU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Y0CiuhKTqTGLpmpdCHtFqaKloYwOLFXzhiwHxyR6KDXVL7PfKeRPmNG5Jo3OQEk8vjbru3Sqg0oKeJ+zbkyN2iM0phM0fhAVAsqKRl15Mc3J+4AG76e54ViRngLDsry4KxDvE3jN2qJe+IO55V53Fl1cjhibzG1mpG/VjnR4Pxk= 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=IvgEijYQ; 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="IvgEijYQ" Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-5d8753e9e1fso631256a12.1 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=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=BOVqy08C6GsLjB0sMrq2+YSaSxUnwU9JmLZUrKlTUz0=; b=IvgEijYQvbnrqu88gunNW/qw7wuuVPToGuP+J7nXymG2wkqerx95mZKDC2xdXAFXGg pJrgIJrCX9pSV1cNPummBHm4ikQdf5pgaSNQ/zXrhmw6C0m/z/84Pa+S8NOS8pNzgDO8 NeiI/xMEARaNWFbmUebWUglU25zfznu9b95KlqYJbKRsHWjk1iPqIMrJDMNXc4LkgR9A 6iHLJcSk1MXo88bBq3JiRSFRpa6BeAQ2A7CDZxbHcCXHOcZFA//V3tQ7MenvISOdDQeu KfEKjcVni2WSxIb3LgUaR6eXf5NEbWJRwN9Yd9SQMr+OJxponSVgCQl+xNvMrKFDNkRy u4nw== 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=KOZwTbtKfi+3cythMtlAnOL6VRTMZbr7saEBTVQCoWhUB6ZRqUGG/l7upkFCMKxMb5 UXaJa4/1k9mKw4nIC6n4ypczo1xB+4naF1f5uNZSXFUNB6mKNcmImLN3uhNRosln3e6O po3e2/IeE3FU4yZv/lJuLkwys2vTVVK1oWEtk5iIWS6LpsO4ui/3xlfi5I0q3yd9FFKs a0eNYKJ+jhmfcRR7Wx1acS5dhuz+9JegsMtDsTLZq3jFcKDZsiGRjhFzadL/CshoUTqn bbRgFC3MxPCf/vI1inYpmfISAxlIAND/iwZ1QDXDYCyzBd3Q+ueaG9QR+CmyG2B5VkBf 55iA== X-Forwarded-Encrypted: i=1; AJvYcCWEvJMR11K5izc9QBDDvtiupznbTuzngVJc4oGgajJtSusAGAq/0nkXXRZjut8MDWeRNdQam9g=@vger.kernel.org X-Gm-Message-State: AOJu0YxyeKgB+7/Npo4hTZjut50zfE+Vd0+E3a2liUPVM+cskiHupLlO APHifFB/n/3nlfOe9len3PSiHUtoK7EHTbyMd5sGddJqEv86kZxTfvW/XVL+UAA= X-Gm-Gg: ASbGnctKXLY8hBkXD7W4EsfQe2VfgI8NLwni1ObhnAzLpYCUJ1TYb22UhSl0TZJOT0o PyGrDoPHcNO8K3D+uZy4qSoplMVv1MRVKL87bChGqc3Kz1QHh9UKV/j+8ZWRmjA8oXCczUK1Xec X+PQeWekrDy86tHMLqyv53oL4/icxHtwGulKlm7u/ETbker8UoLoaTC3ueo2e9CCbB94ZMvQpTC 9TzmueBEvx2r7FKKUIbLBs/kfJprFDW4o97dT/KPB1i8gtKUJnI7B6seizzZySlXMiiAEo0 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: netdev@vger.kernel.org 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 X-Patchwork-Delegate: kuba@kernel.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: 13936370 X-Patchwork-Delegate: kuba@kernel.org 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 86E741BCA0C for ; Sun, 12 Jan 2025 13:33:07 +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=1736688789; cv=none; b=KlIc4lYKZRN3Grl1ohS1vFbWsKp0Bov6O6btUptCREPWtiVfrfg4LcySCKPA9yLMtOvrXbrnIg7xdxKWZUcYcKgK36InMnXrZh0vG3I0ruaMWNMEK+ovIREl/vUaurUNFPM6Oq2VwmBWnvgOUCeU2Wm0W5sz0LGNMMsdkia4fJE= 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=KJ4Ner/G; 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="KJ4Ner/G" Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5d3cfa1da14so645515a12.1 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=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=ld8ZPAnxgwhvLaqsgPKYU5t+3ZDPQJl13t2skco9HCk=; b=KJ4Ner/G7De0aUhC9am2o9zBjx/TANWeZ479tmefZix7WE7xtL/LD5T+tGkw8HZkGn t3zkctMkYk2FM8kYaIKvIfW1q1NoIB5Wy3u1c0PUH2iMX2LrvZjr/SUn3lwoX6Nfg5pd wpjzA6mE/rtebMbsCN6XsS61oiW1QIAH9bZeAHfh9aEliZhVgmD/JMM8XMQMu/J22NTl zOcXhW8bEZvkE+KX35X1rj/pKyQoQOrm+Ej9DpODGbgbJ0oQmuWpZE9XCBHll1Nmv9mq dUQNyY+1ydJO9NxZxzDdj9WBAWzA9T7szgnL46ONYa55TwCv6Bg92PPEXjl8mDhlW603 l+Ew== 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=MMTj2LLmyOvbk4Gcfig5Zwns8JEmWV7BEGlrfi6NaE4iSTCxMCH0p4birNyrhNkLNo 877GgXV6E2GoFUD4bF5ZcZsjHsB6daC2k8ouNEASIjuA8ylwpcXZ3sAPsJh+nBq8+3lo 2bgvq/j72/gY9v8qq2+iDlfz6ca4spzCLoV5nM4gkgKY8ZzbGHdAMPw4hT8lklZEnkcC pdAnZ/Np0A6lFB4nmm9Ags5NpGYh7LeXfkpk/UKECwbL6Tpk0gY/0SkdBPU1yJW7C9zH Z9OAluaRgiQ0z2YNHbKY4KIv1dpDP3117lB+7EuGlerLjaZEPgogb8DZ02iAjAKU0TlQ IhzA== X-Forwarded-Encrypted: i=1; AJvYcCVNFeA9lXU8G6mOkNSZhlBtMHweFSmLO4bKwewD8HD4ygVlyTgNc/hGLldOdTvjsEkfJCW/lWI=@vger.kernel.org X-Gm-Message-State: AOJu0Yxw6iFQ83nyQ51Mewx083ZLlyNxpVGil5hHHU5jluZKg1L2YH4M gk9XxF4MZggTYifPiyvsGbOL50X+XG0+TaKQ6NLunYFAw03vFsYkgRQy/57PJS8= X-Gm-Gg: ASbGncu606UgvdooE0mEf1MW0+XvYM56J0aYfjuG8vg121Ne7tf/WjPZRE0+1kKQdtd lK5dbIimycMvOqza54f42NLuyMC9725n3ssAhtN5QH6wCpVdzMdFcldS7AlUf/GaNANO/6NkOhD cxvG5PvlhMeJzPV0TeI163m5KYfJJSDftxnZDxW2LCv2ZujFPce56omNZvovbH81yMPjdOH9eNN OdsFMZGOB8MaZgjZ+rcjPNUFlJUgNMR08qaEotJa6fLMsAvWYpv7TDvst9VN0y2XLTr1pJy 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: netdev@vger.kernel.org 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 X-Patchwork-Delegate: kuba@kernel.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: 13936371 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (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 44FF71BD01F for ; Sun, 12 Jan 2025 13:33:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736688792; cv=none; b=VGQNSmwNdBKaJ+1npEvaIP3PCwLm0KvNdp65N39sKf+5GgrhceDBRFCCifnOKXg3sCAeVu8xStyRwzu6lxbdmtmvKvnJW13kRSZ0TFl2DWNANCLql/Ko3BHmf3k7Ghc40ak0uegU0NZ9T5v5L6Ed76hRbusoUyemjaYc6wW4YwM= 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=QTs9SYG5; arc=none smtp.client-ip=209.85.208.49 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="QTs9SYG5" Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-5d0bf4ec53fso632050a12.0 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=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=qkxcGNEB2JVbUM+gOy8SUbx7zqelxFkMblu3o9jMzUg=; b=QTs9SYG5S8yzyF0gsF24DgiHG4Ch2p/Z98FCjKVNX2EASU7GNbJjvX/G1ZWTgXlh6m utcq8gnyWl44Nk07Zq/ZHxT9tN/UY62HdvFhZUEqdtc5gYsE0DruVId6Htjl8nNX1/Na yIu+H0Py+1kRBEUWQV8s69Wzdb3wScX7HjBVyMfb539vXGS5JvoWZO9N+GUZU9Y6702n oqKzyjS4PWcFw3P0fro94gcphVJnLbCZ0LhIAQhM+FUx2JSxgyJlvq3Z2OiZFcaX400b WdpS75FllhfTJQIi0ICiIXJYKakNnrKxTGLiyHxCDHMXXZ1AZKHVt9Dzw8gTzEYDVlWF uabw== 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=fSA6zZnUImO2JmtdNBYBy84sUFL6EgNyD/a0OyQQdHKfUaICNkkk0YsOVrGlcoqLRI 9Jo+sHDBhzaVtXZcjLXtK/E4bIxkedh7UTUDefpqi0Yw5J4Gg4sRVPA1b1Y2yPdhpR9e 4cXhbgA9+w9n0bv/HQjuPx7+3yu8q0CHiGikkTbIoGKRB6gHfh4jORMuAhfpRqDZqeMm GbCImp+008nHwWDej2GoofqAM/Iw93C9LEi5EfKnkLDfaLIgXcXY62XPN1bJdWTlOLbC I/K5///3XuGXh8TZHy5dMxo/0aX8UuWA8/J6GPQbmSVs/N/If26a+DVbOyxOKWDpLq5Z Hqdw== X-Forwarded-Encrypted: i=1; AJvYcCX2RB24K2hMYdEIDMXQdDUiAuuHc136bNb1ljcMq8gid4SKnozaeWgH4lQXKe31YWicRy9o5Is=@vger.kernel.org X-Gm-Message-State: AOJu0Yxd2Ho8vEOAKLExQwpdSkeztSXPUCYwR1jgTmrQ8wCfIRcX9sy3 RwS28tBbwy68TZjvaC86adeuRwRZtgKZps81bAIBWp8nhbZtme4l6btPFyWntFM= X-Gm-Gg: ASbGncudud6vL2LBua/diLBLanv+Qt1V1+OzubI6K6q8TszOUQDCXXDr7s7tx1GCIQw JcUMcSJ0thae4wyLdWLoJlgSzxCrNkh7Q3oF4ERgG+GA58tKcgg2COXZRF0vIXaezIFssLCJ+fO M2kLsjFAQpW414kGsQnhCd+uBVmbWyLwzCMKYMYGnB2y8O7XalHhEwO00L0k7DgnVVydVcH8ywk ey9wpKCu2j7+swVqRRMJqlpmtb3pRGKxk8iZqv9T9/hjLSmjsLGIprvpryGtpTaFoL+tFS+ 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: netdev@vger.kernel.org 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 X-Patchwork-Delegate: kuba@kernel.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: 13936372 X-Patchwork-Delegate: kuba@kernel.org 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 CEC811BD9FB for ; Sun, 12 Jan 2025 13:33:12 +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=1736688794; cv=none; b=gdzi+3vwRBUSNFT+GMDYuynEKz9R9nUNJA2+0cbeL7GgVvQ6gxHwpgVZIoB3GGq+XxTRWABVfIMqKdtLskUfKoj/7++n3+OWKe2NFbD1JlZCD/5Lh1jex4FJpLOps9ouPRApc8lSLZKP2mq1N4HmOss3bhiUO54uJ7NIj/p37so= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736688794; c=relaxed/simple; bh=56BLcFVoX+7Lw71cTwO9yffs0jhx9suVmg3Qou8SBBk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OjuW6czA8T3aPh3uqUiK2683yQjvxebJEpqdHeod8Bx9yFBezVKOpRc23Xddo1KaEAxAEJMaBwRQ/lI/zojCPQlZ4wLlnBrqyfVTG+pBv0NU4vJdvvg3TI1pWavDbRUzhUHU2rzAZ9SReKoUGZFmi5xflDIXVl0aCd151E4mI9Q= 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=pugOECaV; 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="pugOECaV" Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5d3ce64e7e5so495344a12.0 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=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=TB4adxko33N4lxV8vB34w9Deg0raCbTSnaXjgezepI0=; b=pugOECaVywPkNHKYFOctHlD9b6dqX5clqRtQswgh5YMCTWn7335ZpHKHSd1pfct/3B VDozM3L8TAgBVbfkXT84jkHXoSmRGQ7usVuDQLJ+mT93uM730HxCWpwRRsAdEzMD5VYq z7f23ZuWi07erFgpviiB/3Ubi9o5BfQmX9qHtqjHc6TFrOysYyCzIawCBOo4Ry5OzOKq Uum5oa8j8UNPQURYxniIa0m9YbbNx1CUMZ3YpwIvLchyBgegF1hH/FGIqDUQTufICNBu 2NFTCuFmeQDY7c6rhFEn9OAPtAGXXz9g9qpafWYOCxEj3Dc/YtfROqKneM3r11vcBRot 7FVA== 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=As2D/9GPhqIY6Uw08osEDxnh5MF08mZ2lJjgiTfaG54la4p87W1u9E0VFp7OnMSYzU VXWvgO30CiA3f8qGfIDrKqtxA7qsS/demX9d3zTM2nLppxBL+PoR226bYkxozwoJqrvD fmBdGEo6UIqaxy7YuIO3OO0vmgZEH1boa6KecrAVQMtEmc+Dt+lqgRlTyChpcqlE0R3N WFVKrRC9dPw4GGN5pc1hFkhQWe+OI7BgJ4ehnEw8usfk5MRy+sOxPrsvlXnhIkXEGwb9 k1uel810qoIxeSceBVlWBWbVqgM9/sJC5a8nZwmADsfc7KK490E8ojr7Ypkssy58Vr+F 15sQ== X-Forwarded-Encrypted: i=1; AJvYcCUW5YW2UJtdyDpGvt2xM/HntjmgqZYfrTVYP9P8fo8iH7C2mA+qumIhHSn8X04qKJGHzINJgiQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwXFjoPLxsdQwCES7wxtxdcGr+ffqumdY5oEJuTH9iuN3kvuOdZ tAOXrX4vUdv0xJyPqTNBsFRCOAb57Cv+Ya9x4NJ9gR/Ers139HLUJ61/6DwLpxs= X-Gm-Gg: ASbGncvuoT/os33xRiqBoy/dQBHyCLEF9lUqVTbYnt1KAEkp36R6HWZatPo16mTBqlj x7v2mRIl5eTHcTfINsFTSqoJYhY7LM7ZyMUhiz5w/ZdLud4EyJaRxN9hZUFcKRT5uptYQ/p0MhH C7l8PntKj1QzAIfCOMGxcLyr0+01vByy8lutZwoinPZ2beAcQd8asi5Px4tx41VHuVrwsrQbjj0 Lf7vuWY7d+znTMiuS2mNmE5TD1bxBbAAAHHKbJcPTXdChSI2WqeXWCYteYkVF75841O5p4b 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: netdev@vger.kernel.org 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 X-Patchwork-Delegate: kuba@kernel.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;