block: Replace function name in string with __func__
PATCH 1/1 block: Replace function name in string with __func__
From: Keyur Patel <[email protected]>
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 Keyur Patel <[email protected]>
--- block/genhd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
block/genhd.c +4 -4
@@ -365,8 +365,8 @@ int register_blkdev(unsigned int major, const char *name) }if (index ==0 ) { -printk ("register_blkdev: failed to get major for %s\n" , - name); +printk ("%s: failed to get major for %s\n" , + __func__, name); ret = -EBUSY ; goto out; }
@@ -375,8 +375,8 @@ int register_blkdev(unsigned int major, const char *name) }if (major >=BLKDEV_MAJOR_MAX ) { -pr_err ("register_blkdev: major requested (%u) is greater than the maximum (%u) for %s\n" , - major,BLKDEV_MAJOR_MAX -1 , name); +pr_err ("%s: major requested (%u) is greater than the maximum (%u) for %s\n" , + __func__, major,BLKDEV_MAJOR_MAX -1 , name); ret = -EINVAL ; goto out;
Signature · 1 line
2.20.1
Quoted 5 lines · On 2/17/19 8:21 AM, [email protected] wrote:
From: Keyur Patel <[email protected]>
Replace hard coded function name
register_blkdevwith__func__, to improve robustness and to conform to the Linux kernel coding style. Issue found using checkpatch.
Applied, thanks.
Signature · 1 line
Jens Axboe