linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 1/1] net: ethernet: stmmac: drop unused variable in stm32mp1_set_mode()
@ 2019-11-04 10:51 Christophe Roullier
  2019-11-04 19:31 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe Roullier @ 2019-11-04 10:51 UTC (permalink / raw)
  To: robh, davem, joabreu, mark.rutland, mcoquelin.stm32,
	alexandre.torgue, peppe.cavallaro
  Cc: linux-stm32, linux-kernel, devicetree, linux-arm-kernel, netdev,
	christophe.roullier, andrew

Building with W=1 (cf.scripts/Makefile.extrawarn) outputs:
warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Drop the unused 'ret' variable.

Signed-off-by: Christophe Roullier <christophe.roullier@st.com>

---
V2: update commit message with Marc Gonzalez recommendation
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
index 4ef041bdf6a1..595af2ec89fb 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
@@ -175,7 +175,7 @@ static int stm32mp1_set_mode(struct plat_stmmacenet_data *plat_dat)
 {
 	struct stm32_dwmac *dwmac = plat_dat->bsp_priv;
 	u32 reg = dwmac->mode_reg;
-	int val, ret;
+	int val;
 
 	switch (plat_dat->interface) {
 	case PHY_INTERFACE_MODE_MII:
@@ -211,8 +211,8 @@ static int stm32mp1_set_mode(struct plat_stmmacenet_data *plat_dat)
 	}
 
 	/* Need to update PMCCLRR (clear register) */
-	ret = regmap_write(dwmac->regmap, reg + SYSCFG_PMCCLRR_OFFSET,
-			   dwmac->ops->syscfg_eth_mask);
+	regmap_write(dwmac->regmap, reg + SYSCFG_PMCCLRR_OFFSET,
+		     dwmac->ops->syscfg_eth_mask);
 
 	/* Update PMCSETR (set register) */
 	return regmap_update_bits(dwmac->regmap, reg,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH V2 1/1] net: ethernet: stmmac: drop unused variable in stm32mp1_set_mode()
  2019-11-04 10:51 [PATCH V2 1/1] net: ethernet: stmmac: drop unused variable in stm32mp1_set_mode() Christophe Roullier
@ 2019-11-04 19:31 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-11-04 19:31 UTC (permalink / raw)
  To: christophe.roullier
  Cc: robh, joabreu, mark.rutland, mcoquelin.stm32, alexandre.torgue,
	peppe.cavallaro, linux-stm32, linux-kernel, devicetree,
	linux-arm-kernel, netdev, andrew

From: Christophe Roullier <christophe.roullier@st.com>
Date: Mon, 4 Nov 2019 11:51:00 +0100

> Building with W=1 (cf.scripts/Makefile.extrawarn) outputs:
> warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
> 
> Drop the unused 'ret' variable.
> 
> Signed-off-by: Christophe Roullier <christophe.roullier@st.com>

Applied to net-next.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-04 19:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-04 10:51 [PATCH V2 1/1] net: ethernet: stmmac: drop unused variable in stm32mp1_set_mode() Christophe Roullier
2019-11-04 19:31 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).