There is no good reason for __bdevname to exist. Just open code printing the string in the callers. For three of them the format string can be trivially merged into existing printk statements, and in init/do_mounts.c we can at least do the scnprintf once at the start of the function, and unconditional of CONFIG_BLOCK to make the output for tiny configfs a little more helpful.
Showing the changes to include/linux (1 of 6 files). Show all
Unified · Split
| @@ -2699,7 +2699,6 @@ static inline void unregister_chrdev(unsigned int major, const char *name) · 2698 unmodified lines | |||
| 2699 | 2699 | ||
| 2700 | #ifdef CONFIG_BLOCK | 2700 | #ifdef CONFIG_BLOCK |
| 2701 | #define BLKDEV_MAJOR_MAX 512 | 2701 | #define BLKDEV_MAJOR_MAX 512 |
| 2702 | extern const char *__bdevname(dev_t, char *buffer); | ||
| 2703 | extern const char *bdevname(struct block_device *bdev, char *buffer); | 2702 | extern const char *bdevname(struct block_device *bdev, char *buffer); |
| 2704 | extern struct block_device *lookup_bdev(const char *); | 2703 | extern struct block_device *lookup_bdev(const char *); |
| 2705 | extern void blkdev_show(struct seq_file *,off_t); | 2704 | extern void blkdev_show(struct seq_file *,off_t); |