Skip to content

Commit ae99111

Browse files
mauelshaMike Snitzer
authored andcommitted
dm: favour __packed versus "__attribute__ ((packed))"
Signed-off-by: Heinz Mauelshagen <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent f8922a4 commit ae99111

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/md/persistent-data/dm-btree-internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ struct node_header {
3535
__le32 max_entries;
3636
__le32 value_size;
3737
__le32 padding;
38-
} __attribute__ ((packed)) __aligned(8);
38+
} __packed __aligned(8);
3939

4040
struct btree_node {
4141
struct node_header header;
4242
__le64 keys[];
43-
} __attribute__ ((packed)) __aligned(8);
43+
} __packed __aligned(8);
4444

4545

4646
/*

drivers/md/persistent-data/dm-space-map-common.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct disk_index_entry {
3434
__le64 blocknr;
3535
__le32 nr_free;
3636
__le32 none_free_before;
37-
} __attribute__ ((packed)) __aligned(8);
37+
} __packed __aligned(8);
3838

3939

4040
#define MAX_METADATA_BITMAPS 255
@@ -44,7 +44,7 @@ struct disk_metadata_index {
4444
__le64 blocknr;
4545

4646
struct disk_index_entry index[MAX_METADATA_BITMAPS];
47-
} __attribute__ ((packed)) __aligned(8);
47+
} __packed __aligned(8);
4848

4949
struct ll_disk;
5050

@@ -103,15 +103,15 @@ struct disk_sm_root {
103103
__le64 nr_allocated;
104104
__le64 bitmap_root;
105105
__le64 ref_count_root;
106-
} __attribute__ ((packed)) __aligned(8);
106+
} __packed __aligned(8);
107107

108108
#define ENTRIES_PER_BYTE 4
109109

110110
struct disk_bitmap_header {
111111
__le32 csum;
112112
__le32 not_used;
113113
__le64 blocknr;
114-
} __attribute__ ((packed)) __aligned(8);
114+
} __packed __aligned(8);
115115

116116
/*----------------------------------------------------------------*/
117117

0 commit comments

Comments
 (0)