In upstream kernel, it is not well received to use a lot of simple booleans
in structs. It is preferred to use 1-bit bitfields [1] and consolidate the
booleans together.
[1] https://www.kernel.org/doc/html/v6.16/process/coding-style.html#using-bool
Signed-off-by: Sven Eckelmann <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20360
Signed-off-by: Robert Marko <[email protected]>
};
struct rtl838x_port {
- bool enable;
+ bool enable:1;
+ bool phy_is_integrated:1;
+ bool is10G:1;
+ bool is2G5:1;
u64 pm;
u16 pvid;
bool eee_enabled;
enum phy_type phy;
- bool phy_is_integrated;
- bool is10G;
- bool is2G5;
int sds_num;
int led_set;
int leds_on_this_port;