Skip to content

Commit 9a05e75

Browse files
tklauseraxboe
authored andcommitted
block: Change extern inline to static inline
With compilers which follow the C99 standard (like modern versions of gcc and clang), "extern inline" does the opposite thing from older versions of gcc (emits code for an externally linkable version of the inline function). "static inline" does the intended behavior in all cases instead. Description taken from commit 6d91857 ("staging, rtl8192e, LLVMLinux: Change extern inline to static inline"). This also fixes the following GCC warning when building with CONFIG_PM disabled: ./include/linux/blkdev.h:1143:20: warning: no previous prototype for 'blk_set_runtime_active' [-Wmissing-prototypes] Fixes: d07ab6d ("block: Add blk_set_runtime_active()") Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Jens Axboe <axboe@fb.com>
1 parent 55f958c commit 9a05e75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/blkdev.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,7 @@ static inline int blk_pre_runtime_suspend(struct request_queue *q)
11741174
static inline void blk_post_runtime_suspend(struct request_queue *q, int err) {}
11751175
static inline void blk_pre_runtime_resume(struct request_queue *q) {}
11761176
static inline void blk_post_runtime_resume(struct request_queue *q, int err) {}
1177-
extern inline void blk_set_runtime_active(struct request_queue *q) {}
1177+
static inline void blk_set_runtime_active(struct request_queue *q) {}
11781178
#endif
11791179

11801180
/*

0 commit comments

Comments
 (0)