Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: adin1100: Simplify register value passing

The additional use case for that variable is gone,
the expression is simple enough to pass it inline now.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Acked-by: Nuno Sá <nuno.sa@analog.com>
Link: https://patch.msgid.link/20251119124737.280939-3-ada@thorsis.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Alexander Dahl and committed by
Jakub Kicinski
5894cab4 bccaf1fe

+2 -3
+2 -3
drivers/net/phy/adin1100.c
··· 192 192 static int adin_set_powerdown_mode(struct phy_device *phydev, bool en) 193 193 { 194 194 int ret; 195 - int val; 196 195 197 - val = en ? ADIN_CRSM_SFT_PD_CNTRL_EN : 0; 198 196 ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, 199 - ADIN_CRSM_SFT_PD_CNTRL, val); 197 + ADIN_CRSM_SFT_PD_CNTRL, 198 + en ? ADIN_CRSM_SFT_PD_CNTRL_EN : 0); 200 199 if (ret < 0) 201 200 return ret; 202 201