include/uapi/linux/blkzoned.h: Remove a superfluous __packed directive
authorBart Van Assche <bart.vanassche@wdc.com>
Fri, 15 Jun 2018 21:55:18 +0000 (14:55 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 9 Jul 2018 15:07:52 +0000 (09:07 -0600)
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>
include/uapi/linux/blkzoned.h

index e3c70fe6bf0fbb2c672d66e89f424bac513ce08a..ff5a5db8906a7c90dd44b40f2a48a10ba6ca40b6 100644 (file)
@@ -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