Skip to content

Commit 451b365

Browse files
authored
Merge pull request #321 from igaw/remove-packed-attribute
ioctl: Remove attribute packed and alignedof for args structs
2 parents 8d78784 + f274eeb commit 451b365

1 file changed

Lines changed: 32 additions & 32 deletions

File tree

src/nvme/ioctl.h

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ struct nvme_identify_args {
405405
__u16 cntid;
406406
__u16 cns_specific_id;
407407
__u8 uuidx;
408-
} __attribute__((packed, aligned(__alignof__(__u32*))));
408+
};
409409

410410
/**
411411
* nvme_identify() - Send the NVMe Identify command
@@ -1219,7 +1219,7 @@ struct nvme_get_log_args {
12191219
__u8 uuidx;
12201220
bool rae;
12211221
bool ot;
1222-
} __attribute__((packed, aligned(__alignof__(__u64))));
1222+
};
12231223

12241224
/**
12251225
* nvme_get_log() - NVMe Admin Get Log command
@@ -2029,7 +2029,7 @@ struct nvme_set_features_args {
20292029
bool save;
20302030
__u8 uuidx;
20312031
__u8 fid;
2032-
} __attribute__((packed, aligned(__alignof__(__u32*))));
2032+
};
20332033

20342034
/**
20352035
* nvme_set_features() - Set a feature attribute
@@ -2469,7 +2469,7 @@ struct nvme_get_features_args {
24692469
__u32 data_len;
24702470
__u8 fid;
24712471
__u8 uuidx;
2472-
} __attribute__((packed, aligned(__alignof__(__u32*))));
2472+
};
24732473

24742474
/**
24752475
* nvme_get_features() - Retrieve a feature attribute
@@ -2918,7 +2918,7 @@ struct nvme_format_nvm_args {
29182918
enum nvme_cmd_format_pil pil;
29192919
enum nvme_cmd_format_ses ses;
29202920
__u8 lbaf;
2921-
} __attribute__((packed, aligned(__alignof__(__u32*))));
2921+
};
29222922

29232923
/**
29242924
* nvme_format_nvm() - Format nvme namespace(s)
@@ -2954,7 +2954,7 @@ struct nvme_ns_mgmt_args {
29542954
__u32 nsid;
29552955
enum nvme_ns_mgmt_sel sel;
29562956
__u8 csi;
2957-
} __attribute__((packed, aligned(__alignof__(__u32*))));
2957+
};
29582958

29592959
/**
29602960
* nvme_ns_mgmt() - Issue a Namespace management command
@@ -3041,7 +3041,7 @@ struct nvme_ns_attach_args {
30413041
__u32 timeout;
30423042
__u32 nsid;
30433043
enum nvme_ns_attach_sel sel;
3044-
} __attribute__((packed, aligned(__alignof__(__u32*))));
3044+
};
30453045

30463046
/**
30473047
* nvme_ns_attach() - Attach or detach namespace to controller(s)
@@ -3111,7 +3111,7 @@ struct nvme_fw_download_args {
31113111
__u32 timeout;
31123112
__u32 offset;
31133113
__u32 data_len;
3114-
} __attribute__((packed, aligned(__alignof__(__u32*))));
3114+
};
31153115

31163116
/**
31173117
* nvme_fw_download() - Download part or all of a firmware image to the
@@ -3154,7 +3154,7 @@ struct nvme_fw_commit_args {
31543154
enum nvme_fw_commit_ca action;
31553155
__u8 slot;
31563156
bool bpid;
3157-
} __attribute__((packed, aligned(__alignof__(__u32*))));
3157+
};
31583158

31593159
/**
31603160
* nvme_fw_commit() - Commit firmware using the specified action
@@ -3197,7 +3197,7 @@ struct nvme_security_send_args {
31973197
__u8 spsp0;
31983198
__u8 spsp1;
31993199
__u8 secp;
3200-
} __attribute__((packed, aligned(__alignof__(__u32*))));
3200+
};
32013201

32023202
/**
32033203
* nvme_security_send() -
@@ -3245,7 +3245,7 @@ struct nvme_security_receive_args {
32453245
__u8 spsp0;
32463246
__u8 spsp1;
32473247
__u8 secp;
3248-
} __attribute__((packed, aligned(__alignof__(__u32*))));
3248+
};
32493249

32503250
/**
32513251
* nvme_security_receive() -
@@ -3281,7 +3281,7 @@ struct nvme_get_lba_status_args {
32813281
__u32 mndw;
32823282
enum nvme_lba_status_atype atype;
32833283
__u16 rl;
3284-
} __attribute__((packed, aligned(__alignof__(__u64))));
3284+
};
32853285

32863286
/**
32873287
* nvme_get_lba_status() - Retrieve information on possibly unrecoverable LBAs
@@ -3321,7 +3321,7 @@ struct nvme_directive_send_args {
33213321
__u32 cdw12;
33223322
__u32 data_len;
33233323
__u16 dspec;
3324-
} __attribute__((packed, aligned(__alignof__(__u32*))));
3324+
};
33253325

33263326
/**
33273327
* nvme_directive_send() - Send directive command
@@ -3435,7 +3435,7 @@ struct nvme_directive_recv_args {
34353435
__u32 cdw12;
34363436
__u32 data_len;
34373437
__u16 dspec;
3438-
} __attribute__((packed, aligned(__alignof__(__u32*))));
3438+
};
34393439

34403440
/**
34413441
* nvme_directive_recv() - Receive directive specific data
@@ -3587,7 +3587,7 @@ struct nvme_capacity_mgmt_args {
35873587
__u32 cdw12;
35883588
__u16 element_id;
35893589
__u8 op;
3590-
} __attribute__((packed, aligned(__alignof__(__u32*))));
3590+
};
35913591

35923592
/**
35933593
* nvme_capacity_mgmt() -
@@ -3620,7 +3620,7 @@ struct nvme_lockdown_args {
36203620
__u8 ifc;
36213621
__u8 ofi;
36223622
__u8 uuidx;
3623-
} __attribute__((__packed__));
3623+
};
36243624

36253625
/**
36263626
* nvme_lockdown() - Issue lockdown command
@@ -3647,7 +3647,7 @@ struct nvme_set_property_args {
36473647
int fd;
36483648
__u32 timeout;
36493649
int offset;
3650-
} __attribute__((packed, aligned(__alignof__(__u64))));
3650+
};
36513651

36523652
/**
36533653
* nvme_set_property() - Set controller property
@@ -3675,7 +3675,7 @@ struct nvme_get_property_args {
36753675
int fd;
36763676
__u32 timeout;
36773677
int offset;
3678-
} __attribute__((packed, aligned(__alignof__(__u64*))));
3678+
};
36793679

36803680
/**
36813681
* nvme_get_property() - Get a controller property
@@ -3713,7 +3713,7 @@ struct nvme_sanitize_nvm_args {
37133713
__u8 owpass;
37143714
bool oipbp;
37153715
bool nodas;
3716-
} __attribute__((packed, aligned(__alignof__(__u32*))));
3716+
};
37173717

37183718
/**
37193719
* nvme_sanitize_nvm() - Start a sanitize operation
@@ -3750,7 +3750,7 @@ struct nvme_dev_self_test_args {
37503750
__u32 timeout;
37513751
__u32 nsid;
37523752
enum nvme_dst_stc stc;
3753-
} __attribute__((packed, aligned(__alignof__(__u32*))));
3753+
};
37543754

37553755
/**
37563756
* nvme_dev_self_test() - Start or abort a self test
@@ -3793,7 +3793,7 @@ struct nvme_virtual_mgmt_args {
37933793
enum nvme_virt_mgmt_rt rt;
37943794
__u16 cntlid;
37953795
__u16 nr;
3796-
} __attribute__((packed, aligned(__alignof__(__u32*))));
3796+
};
37973797

37983798
/**
37993799
* nvme_virtual_mgmt() - Virtualization resource management
@@ -3880,7 +3880,7 @@ struct nvme_io_args {
38803880
__u16 appmask;
38813881
__u16 dspec;
38823882
__u8 dsm;
3883-
} __attribute__((__packed__, aligned(__alignof__(__u64))));
3883+
};
38843884

38853885
/**
38863886
* nvme_io() - Submit an nvme user I/O command
@@ -3998,7 +3998,7 @@ struct nvme_dsm_args {
39983998
__u32 nsid;
39993999
__u32 attrs;
40004000
__u16 nr_ranges;
4001-
} __attribute__((packed, aligned(__alignof__(__u32*))));
4001+
};
40024002

40034003
/**
40044004
* nvme_dsm() - Send an nvme data set management command
@@ -4055,7 +4055,7 @@ struct nvme_copy_args {
40554055
__u8 prinfow;
40564056
__u8 dtype;
40574057
__u8 format;
4058-
} __attribute__((packed, aligned(__alignof__(__u64))));
4058+
};
40594059

40604060
/**
40614061
* nvme_copy() -
@@ -4092,7 +4092,7 @@ struct nvme_resv_acquire_args {
40924092
enum nvme_resv_rtype rtype;
40934093
enum nvme_resv_racqa racqa;
40944094
bool iekey;
4095-
} __attribute__((packed, aligned(__alignof__(__u64))));
4095+
};
40964096

40974097
/**
40984098
* nvme_resv_acquire() - Send an nvme reservation acquire
@@ -4132,7 +4132,7 @@ struct nvme_resv_register_args {
41324132
enum nvme_resv_rrega rrega;
41334133
enum nvme_resv_cptpl cptpl;
41344134
bool iekey;
4135-
} __attribute__((packed, aligned(__alignof__(__u64))));
4135+
};
41364136

41374137
/**
41384138
* nvme_resv_register() - Send an nvme reservation register
@@ -4168,7 +4168,7 @@ struct nvme_resv_release_args {
41684168
enum nvme_resv_rtype rtype;
41694169
enum nvme_resv_rrela rrela;
41704170
bool iekey;
4171-
} __attribute__((packed, aligned(__alignof__(__u64))));
4171+
};
41724172

41734173
/**
41744174
* nvme_resv_release() - Send an nvme reservation release
@@ -4200,7 +4200,7 @@ struct nvme_resv_report_args {
42004200
__u32 nsid;
42014201
__u32 len;
42024202
bool eds;
4203-
} __attribute__((packed, aligned(__alignof__(__u32*))));
4203+
};
42044204

42054205
/**
42064206
* nvme_resv_report() - Send an nvme reservation report
@@ -4241,7 +4241,7 @@ struct nvme_zns_mgmt_send_args {
42414241
__u32 data_len;
42424242
bool select_all;
42434243
__u8 zsaso;
4244-
} __attribute__((packed, aligned(__alignof__(__u64))));
4244+
};
42454245

42464246
/**
42474247
* nvme_zns_mgmt_send() -
@@ -4279,7 +4279,7 @@ struct nvme_zns_mgmt_recv_args {
42794279
__u32 data_len;
42804280
__u16 zrasf;
42814281
bool zras_feat;
4282-
} __attribute__((packed, aligned(__alignof__(__u64))));
4282+
};
42834283

42844284
/**
42854285
* nvme_zns_mgmt_recv() -
@@ -4364,7 +4364,7 @@ struct nvme_zns_append_args {
43644364
__u16 control;
43654365
__u16 lbat;
43664366
__u16 lbatm;
4367-
} __attribute__((packed, aligned(__alignof__(__u64))));
4367+
};
43684368

43694369
/**
43704370
* nvme_zns_append() - Append data to a zone
@@ -4393,7 +4393,7 @@ struct nvme_dim_args {
43934393
__u32 timeout;
43944394
__u32 data_len;
43954395
__u8 tas;
4396-
} __attribute__((packed, aligned(__alignof__(__u32*))));
4396+
};
43974397

43984398
/**
43994399
* nvme_dim_send - Send a Discovery Information Management (DIM) command

0 commit comments

Comments
 (0)