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

drm/edid: replace __attribute__((packed)) with __packed

__packed is preferred over __attribute__((packed)).

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Link: https://patchwork.freedesktop.org/patch/msgid/20231212132557.3777281-1-jani.nikula@intel.com

+16 -16
+16 -16
include/drm/drm_edid.h
··· 46 46 u8 t1; 47 47 u8 t2; 48 48 u8 mfg_rsvd; 49 - } __attribute__((packed)); 49 + } __packed; 50 50 51 51 /* 00=16:10, 01=4:3, 10=5:4, 11=16:9 */ 52 52 #define EDID_TIMING_ASPECT_SHIFT 6 ··· 59 59 struct std_timing { 60 60 u8 hsize; /* need to multiply by 8 then add 248 */ 61 61 u8 vfreq_aspect; 62 - } __attribute__((packed)); 62 + } __packed; 63 63 64 64 #define DRM_EDID_PT_HSYNC_POSITIVE (1 << 1) 65 65 #define DRM_EDID_PT_VSYNC_POSITIVE (1 << 2) ··· 85 85 u8 hborder; 86 86 u8 vborder; 87 87 u8 misc; 88 - } __attribute__((packed)); 88 + } __packed; 89 89 90 90 /* If it's not pixel timing, it'll be one of the below */ 91 91 struct detailed_data_string { 92 92 u8 str[13]; 93 - } __attribute__((packed)); 93 + } __packed; 94 94 95 95 #define DRM_EDID_RANGE_OFFSET_MIN_VFREQ (1 << 0) /* 1.4 */ 96 96 #define DRM_EDID_RANGE_OFFSET_MAX_VFREQ (1 << 1) /* 1.4 */ ··· 120 120 __le16 m; 121 121 u8 k; 122 122 u8 j; /* need to divide by 2 */ 123 - } __attribute__((packed)) gtf2; 123 + } __packed gtf2; 124 124 struct { 125 125 u8 version; 126 126 u8 data1; /* high 6 bits: extra clock resolution */ ··· 129 129 u8 flags; /* preferred aspect and blanking support */ 130 130 u8 supported_scalings; 131 131 u8 preferred_refresh; 132 - } __attribute__((packed)) cvt; 133 - } __attribute__((packed)) formula; 134 - } __attribute__((packed)); 132 + } __packed cvt; 133 + } __packed formula; 134 + } __packed; 135 135 136 136 struct detailed_data_wpindex { 137 137 u8 white_yx_lo; /* Lower 2 bits each */ 138 138 u8 white_x_hi; 139 139 u8 white_y_hi; 140 140 u8 gamma; /* need to divide by 100 then add 1 */ 141 - } __attribute__((packed)); 141 + } __packed; 142 142 143 143 struct detailed_data_color_point { 144 144 u8 windex1; 145 145 u8 wpindex1[3]; 146 146 u8 windex2; 147 147 u8 wpindex2[3]; 148 - } __attribute__((packed)); 148 + } __packed; 149 149 150 150 struct cvt_timing { 151 151 u8 code[3]; 152 - } __attribute__((packed)); 152 + } __packed; 153 153 154 154 struct detailed_non_pixel { 155 155 u8 pad1; ··· 163 163 struct detailed_data_wpindex color; 164 164 struct std_timing timings[6]; 165 165 struct cvt_timing cvt[4]; 166 - } __attribute__((packed)) data; 167 - } __attribute__((packed)); 166 + } __packed data; 167 + } __packed; 168 168 169 169 #define EDID_DETAIL_EST_TIMINGS 0xf7 170 170 #define EDID_DETAIL_CVT_3BYTE 0xf8 ··· 181 181 union { 182 182 struct detailed_pixel_timing pixel_data; 183 183 struct detailed_non_pixel other_data; 184 - } __attribute__((packed)) data; 185 - } __attribute__((packed)); 184 + } __packed data; 185 + } __packed; 186 186 187 187 #define DRM_EDID_INPUT_SERRATION_VSYNC (1 << 0) 188 188 #define DRM_EDID_INPUT_SYNC_ON_GREEN (1 << 1) ··· 307 307 u8 extensions; 308 308 /* Checksum */ 309 309 u8 checksum; 310 - } __attribute__((packed)); 310 + } __packed; 311 311 312 312 #define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8)) 313 313