Commit dfc76d11 authored by Keyur Patel's avatar Keyur Patel Committed by Jens Axboe

block: Replace function name in string with __func__

Replace hard coded function name register_blkdev with __func__, to
improve robustness and to conform to the Linux kernel coding
style. Issue found using checkpatch.
Signed-off-by: default avatarKeyur Patel <iamkeyur96@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent cd46eb89
...@@ -365,8 +365,8 @@ int register_blkdev(unsigned int major, const char *name) ...@@ -365,8 +365,8 @@ int register_blkdev(unsigned int major, const char *name)
} }
if (index == 0) { if (index == 0) {
printk("register_blkdev: failed to get major for %s\n", printk("%s: failed to get major for %s\n",
name); __func__, name);
ret = -EBUSY; ret = -EBUSY;
goto out; goto out;
} }
...@@ -375,8 +375,8 @@ int register_blkdev(unsigned int major, const char *name) ...@@ -375,8 +375,8 @@ int register_blkdev(unsigned int major, const char *name)
} }
if (major >= BLKDEV_MAJOR_MAX) { if (major >= BLKDEV_MAJOR_MAX) {
pr_err("register_blkdev: major requested (%u) is greater than the maximum (%u) for %s\n", pr_err("%s: major requested (%u) is greater than the maximum (%u) for %s\n",
major, BLKDEV_MAJOR_MAX-1, name); __func__, major, BLKDEV_MAJOR_MAX-1, name);
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment