From: Yanteng Si <si.yanteng@linux.dev>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
MD Danish Anwar <danishanwar@ti.com>,
Roger Quadros <rogerq@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>
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
Subject: Re: [PATCH net-next 5/5] net: stmmac: stm32: Use syscon_regmap_lookup_by_phandle_args
Date: Mon, 13 Jan 2025 16:05:13 +0800 [thread overview]
Message-ID: <5d97dd34-f293-4403-b605-c0ae7b5490fd@linux.dev> (raw)
In-Reply-To: <20250112-syscon-phandle-args-net-v1-5-3423889935f7@linaro.org>
在 2025/1/12 21:32, Krzysztof Kozlowski 写道:
> 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 <krzysztof.kozlowski@linaro.org>
> ---
> 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);
The network subsystem still requires that the length of
each line of code should not exceed 80 characters.
So, let's silence the warning:
WARNING: line length of 83 exceeds 80 columns
#33: FILE: drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c:307:
+ &dwmac->intf_reg_off);
BTW, The other two stmmac patches also need to adjust
the code so that each line doesn't exceed 80 characters.
Thanks,
Yanteng
next prev parent reply other threads:[~2025-01-13 8:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-12 13:32 [PATCH net-next 0/5] net: ethernet: Simplify few things Krzysztof Kozlowski
2025-01-12 13:32 ` [PATCH net-next 1/5] net: ti: icssg-prueth: Do not print physical memory addresses Krzysztof Kozlowski
2025-01-13 8:03 ` MD Danish Anwar
2025-01-12 13:32 ` [PATCH net-next 2/5] net: ti: icssg-prueth: Use syscon_regmap_lookup_by_phandle_args Krzysztof Kozlowski
2025-01-13 8:07 ` MD Danish Anwar
2025-01-13 11:04 ` Krzysztof Kozlowski
2025-01-15 2:06 ` Jakub Kicinski
2025-01-12 13:32 ` [PATCH net-next 3/5] net: stmmac: imx: " Krzysztof Kozlowski
2025-01-12 13:32 ` [PATCH net-next 4/5] net: stmmac: sti: " Krzysztof Kozlowski
2025-01-12 13:32 ` [PATCH net-next 5/5] net: stmmac: stm32: " Krzysztof Kozlowski
2025-01-13 8:05 ` Yanteng Si [this message]
2025-01-13 11:08 ` Krzysztof Kozlowski
2025-01-13 17:01 ` Andrew Lunn
2025-01-14 1:58 ` Yanteng Si
2025-01-15 2:10 ` [PATCH net-next 0/5] net: ethernet: Simplify few things patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d97dd34-f293-4403-b605-c0ae7b5490fd@linux.dev \
--to=si.yanteng@linux.dev \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=joabreu@synopsys.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rogerq@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox