Skip to content

Commit f8922a4

Browse files
mauelshaMike Snitzer
authored andcommitted
dm: favour __aligned(N) versus "__attribute__ (aligned(N))"
Signed-off-by: Heinz Mauelshagen <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent 6a80803 commit f8922a4

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

drivers/md/dm-io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct io {
3939
void *context;
4040
void *vma_invalidate_address;
4141
unsigned long vma_invalidate_size;
42-
} __attribute__((aligned(DM_IO_MAX_REGIONS)));
42+
} __aligned(DM_IO_MAX_REGIONS);
4343

4444
static struct kmem_cache *_dm_io_cache;
4545

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+
} __attribute__ ((packed)) __aligned(8);
3939

4040
struct btree_node {
4141
struct node_header header;
4242
__le64 keys[];
43-
} __attribute__((packed, aligned(8)));
43+
} __attribute__ ((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+
} __attribute__ ((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+
} __attribute__ ((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+
} __attribute__ ((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+
} __attribute__ ((packed)) __aligned(8);
115115

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

0 commit comments

Comments
 (0)