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

net: phy: fixed_phy: shrink size of struct fixed_phy_status

All three members are effectively of type bool, so make this explicit
and shrink size of struct fixed_phy_status.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/9eca3d7e-fa64-4724-8fdc-f2c1a8f2ae8f@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Heiner Kallweit and committed by
Jakub Kicinski
f73e0f46 ac81130e

+4 -4
+1 -1
drivers/net/phy/fixed_phy.c
··· 224 224 struct phy_device *fixed_phy_register_100fd(void) 225 225 { 226 226 static const struct fixed_phy_status status = { 227 - .link = 1, 227 + .link = true, 228 228 .speed = SPEED_100, 229 229 .duplex = DUPLEX_FULL, 230 230 };
+3 -3
include/linux/phy_fixed.h
··· 5 5 #include <linux/types.h> 6 6 7 7 struct fixed_phy_status { 8 - int link; 9 8 int speed; 10 9 int duplex; 11 - int pause; 12 - int asym_pause; 10 + bool link:1; 11 + bool pause:1; 12 + bool asym_pause:1; 13 13 }; 14 14 15 15 struct device_node;