The code currently uses bitfields to store true-false values. Switch all of that to bools. Apart from the cleanup, it saves 20B of code as many shifts, ANDs, and ORs became simple movzb's.
Showing the changes to include/linux (2 of 7 files). Show all
Unified · Split
| @@ -78,7 +78,7 @@ struct consw { · 77 unmodified lines | ||
| 78 | 78 | void (*con_save_screen)(struct vc_data *vc); |
| 79 | 79 | u8 (*con_build_attr)(struct vc_data *vc, u8 color, |
| 80 | 80 | enum vc_intensity intensity, |
| 81 | − u8 blink, u8 underline, u8 reverse, u8 italic); | |
| 81 | + bool blink, bool underline, bool reverse, bool italic); | |
| 82 | 82 | void (*con_invert_region)(struct vc_data *vc, u16 *p, int count); |
| 83 | 83 | u16 *(*con_screen_pos)(struct vc_data *vc, int offset); |
| 84 | 84 | unsigned long (*con_getxy)(struct vc_data *vc, unsigned long position, |
| @@ -54,10 +54,10 @@ struct vc_state { · 53 unmodified lines | ||
| 54 | 54 | |
| 55 | 55 | /* attribute flags */ |
| 56 | 56 | enum vc_intensity intensity; |
| 57 | − unsigned int italic : 1; | |
| 58 | − unsigned int underline : 1; | |
| 59 | − unsigned int blink : 1; | |
| 60 | − unsigned int reverse : 1; | |
| 57 | + bool italic; | |
| 58 | + bool underline; | |
| 59 | + bool blink; | |
| 60 | + bool reverse; | |
| 61 | 61 | }; |
| 62 | 62 | |
| 63 | 63 | /* |