diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2021-11-09 16:29:49 -0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-11-09 19:19:34 -0700 |
commit | 278167fd2f8ffe679351605fe03e29ff3ab8db18 (patch) | |
tree | 685d3d0485a3002c8bf1ff8e05a9054543ce582c /include/linux/genhd.h | |
parent | ecaf97f474447821ade290cebbe82bc9b6b23cff (diff) | |
download | linux-278167fd2f8ffe679351605fe03e29ff3ab8db18.tar.gz linux-278167fd2f8ffe679351605fe03e29ff3ab8db18.tar.bz2 linux-278167fd2f8ffe679351605fe03e29ff3ab8db18.zip |
block: add __must_check for *add_disk*() callers
Now that we have done a spring cleaning on all drivers and added
error checking / handling, let's keep it that way and ensure
no new drivers fail to stick with it.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20211110002949.999380-1-mcgrof@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/genhd.h')
-rw-r--r-- | include/linux/genhd.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 462634b4b48f..74c410263113 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -205,9 +205,9 @@ static inline dev_t disk_devt(struct gendisk *disk) void disk_uevent(struct gendisk *disk, enum kobject_action action); /* block/genhd.c */ -int device_add_disk(struct device *parent, struct gendisk *disk, - const struct attribute_group **groups); -static inline int add_disk(struct gendisk *disk) +int __must_check device_add_disk(struct device *parent, struct gendisk *disk, + const struct attribute_group **groups); +static inline int __must_check add_disk(struct gendisk *disk) { return device_add_disk(NULL, disk, NULL); } |