]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: phy: fixed_phy: shrink size of struct fixed_phy_status
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 5 Nov 2025 22:09:17 +0000 (23:09 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 8 Nov 2025 02:53:13 +0000 (18:53 -0800)
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>
drivers/net/phy/fixed_phy.c
include/linux/phy_fixed.h

index d498d8a9bba6fe83803e06a4df340397a9a1e4c9..9bd6937411e439d00cc89dcaffce9435975b7570 100644 (file)
@@ -224,7 +224,7 @@ EXPORT_SYMBOL_GPL(fixed_phy_register);
 struct phy_device *fixed_phy_register_100fd(void)
 {
        static const struct fixed_phy_status status = {
-               .link   = 1,
+               .link   = true,
                .speed  = SPEED_100,
                .duplex = DUPLEX_FULL,
        };
index 8bade999831c86fbe1121a69ffbdad0e2a51ad90..436bff20f324fc6d0008838cf0a7f72aed664c12 100644 (file)
@@ -5,11 +5,11 @@
 #include <linux/types.h>
 
 struct fixed_phy_status {
-       int link;
        int speed;
        int duplex;
-       int pause;
-       int asym_pause;
+       bool link:1;
+       bool pause:1;
+       bool asym_pause:1;
 };
 
 struct device_node;