Skip to content

Commit

Permalink
null_blk: fix inline misuse
Browse files Browse the repository at this point in the history
You can't magically mark a function inline and expect that to work.

Fixes: fceb5d1 ("null_blk: create a helper for zoned devices")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Jens Axboe committed Aug 23, 2019
1 parent a3d7d67 commit 38b4e09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions drivers/block/null_blk.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ int null_zone_init(struct nullb_device *dev);
void null_zone_exit(struct nullb_device *dev);
int null_zone_report(struct gendisk *disk, sector_t sector,
struct blk_zone *zones, unsigned int *nr_zones);
inline blk_status_t null_handle_zoned(struct nullb_cmd *cmd,
enum req_opf op, sector_t sector,
sector_t nr_sectors);
blk_status_t null_handle_zoned(struct nullb_cmd *cmd,
enum req_opf op, sector_t sector,
sector_t nr_sectors);
#else
static inline int null_zone_init(struct nullb_device *dev)
{
Expand Down
5 changes: 2 additions & 3 deletions drivers/block/null_blk_zoned.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,8 @@ static blk_status_t null_zone_reset(struct nullb_cmd *cmd, sector_t sector)
return BLK_STS_OK;
}

inline blk_status_t null_handle_zoned(struct nullb_cmd *cmd,
enum req_opf op, sector_t sector,
sector_t nr_sectors)
blk_status_t null_handle_zoned(struct nullb_cmd *cmd, enum req_opf op,
sector_t sector, sector_t nr_sectors)
{
switch (op) {
case REQ_OP_WRITE:
Expand Down

0 comments on commit 38b4e09

Please sign in to comment.