Skip to content

Commit

Permalink
include/uapi/linux/blkzoned.h: Remove a superfluous __packed directive
Browse files Browse the repository at this point in the history
Using the __packed directive for a structure that does not need
it is wrong because it makes gcc generate suboptimal code on some
architectures. Hence remove the __packed directive from the
blk_zone_report structure definition. See also
http://digitalvampire.org/blog/index.php/2006/07/31/why-you-shouldnt-use-__attribute__packed/.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Cc: Matias Bjorling <mb@lightnvm.io>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Bart Van Assche authored and axboe committed Jul 9, 2018
1 parent f441108 commit b3e7e7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/uapi/linux/blkzoned.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ struct blk_zone_report {
__u32 nr_zones;
__u8 reserved[4];
struct blk_zone zones[0];
} __packed;
};

/**
* struct blk_zone_range - BLKRESETZONE ioctl request
Expand Down

0 comments on commit b3e7e7d

Please sign in to comment.