Skip to content

Commit

Permalink
skd: Use __packed only when needed
Browse files Browse the repository at this point in the history
Since needless use of __packed slows down access to data structures,
only use __packed when needed.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Bart Van Assche authored and Jens Axboe committed Aug 18, 2017
1 parent 16a7053 commit 53e617e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/block/skd_s1120.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#ifndef SKD_S1120_H
#define SKD_S1120_H

#pragma pack(push, s1120_h, 1)

/*
* Q-channel, 64-bit r/w
*/
Expand Down Expand Up @@ -276,7 +274,7 @@ struct fit_comp_error_info {
uint16_t sks_low; /* 10: Sense Key Specific (LSW) */
uint16_t reserved3; /* 12: Part of additional sense bytes (unused) */
uint16_t uec; /* 14: Additional Sense Bytes */
uint64_t per; /* 16: Additional Sense Bytes */
uint64_t per __packed; /* 16: Additional Sense Bytes */
uint8_t reserved4[2]; /* 1E: Additional Sense Bytes (unused) */
};

Expand Down Expand Up @@ -323,6 +321,4 @@ struct driver_inquiry_data {
uint8_t driver_version[0x14];
};

#pragma pack(pop, s1120_h)

#endif /* SKD_S1120_H */

0 comments on commit 53e617e

Please sign in to comment.