block: always define struct blk_integrity in genhd.h
authorMax Gurtovoy <maxg@mellanox.com>
Tue, 19 May 2020 14:05:48 +0000 (17:05 +0300)
committerChristoph Hellwig <hch@lst.de>
Wed, 27 May 2020 05:12:38 +0000 (07:12 +0200)
This will reduce the amount of ifdefs inside the source code for various
drivers and also will reduce the amount of stub functions that were
created for the !CONFIG_BLK_DEV_INTEGRITY case.

Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Israel Rukshin <israelr@mellanox.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
include/linux/genhd.h

index f9c226f..2590bed 100644 (file)
@@ -169,8 +169,6 @@ struct disk_part_tbl {
 struct disk_events;
 struct badblocks;
 
-#if defined(CONFIG_BLK_DEV_INTEGRITY)
-
 struct blk_integrity {
        const struct blk_integrity_profile      *profile;
        unsigned char                           flags;
@@ -179,8 +177,6 @@ struct blk_integrity {
        unsigned char                           tag_size;
 };
 
-#endif /* CONFIG_BLK_DEV_INTEGRITY */
-
 struct gendisk {
        /* major, first_minor and minors are input parameters only,
         * don't use directly.  Use disk_devt() and disk_max_parts().