* [PATCH] char: misc: use pr_err instead of printk
@ 2014-10-11 18:31 Rahul Bedarkar
2014-10-11 18:35 ` Joe Perches
0 siblings, 1 reply; 3+ messages in thread
From: Rahul Bedarkar @ 2014-10-11 18:31 UTC (permalink / raw)
To: Arnd Bergmann, Greg Kroah-Hartman; +Cc: linux-kernel, Rahul Bedarkar
Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
---
drivers/char/misc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index 75b6de9..a6b96b1 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -280,12 +280,12 @@ static int __init misc_init(void)
err = -EIO;
if (register_chrdev(MISC_MAJOR,"misc",&misc_fops))
- goto fail_printk;
+ goto fail_pr_err;
misc_class->devnode = misc_devnode;
return 0;
-fail_printk:
- printk("unable to get major %d for misc devices\n", MISC_MAJOR);
+fail_pr_err:
+ pr_err("unable to get major %d for misc devices\n", MISC_MAJOR);
class_destroy(misc_class);
fail_remove:
remove_proc_entry("misc", NULL);
--
1.8.3.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] char: misc: use pr_err instead of printk
2014-10-11 18:31 [PATCH] char: misc: use pr_err instead of printk Rahul Bedarkar
@ 2014-10-11 18:35 ` Joe Perches
2014-10-14 15:22 ` Rahul Bedarkar
0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2014-10-11 18:35 UTC (permalink / raw)
To: Rahul Bedarkar; +Cc: Arnd Bergmann, Greg Kroah-Hartman, linux-kernel
On Sun, 2014-10-12 at 00:01 +0530, Rahul Bedarkar wrote:
[]
> diff --git a/drivers/char/misc.c b/drivers/char/misc.c
[]
> @@ -280,12 +280,12 @@ static int __init misc_init(void)
>
> err = -EIO;
> if (register_chrdev(MISC_MAJOR,"misc",&misc_fops))
> - goto fail_printk;
> + goto fail_pr_err;
> misc_class->devnode = misc_devnode;
> return 0;
>
> -fail_printk:
> - printk("unable to get major %d for misc devices\n", MISC_MAJOR);
> +fail_pr_err:
> + pr_err("unable to get major %d for misc devices\n", MISC_MAJOR);
> class_destroy(misc_class);
> fail_remove:
> remove_proc_entry("misc", NULL);
The printk is not relevant.
Maybe the label should be "fail_destroy:"
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] char: misc: use pr_err instead of printk
2014-10-11 18:35 ` Joe Perches
@ 2014-10-14 15:22 ` Rahul Bedarkar
0 siblings, 0 replies; 3+ messages in thread
From: Rahul Bedarkar @ 2014-10-14 15:22 UTC (permalink / raw)
To: Joe Perches; +Cc: Arnd Bergmann, Greg Kroah-Hartman, open list
On Sun, Oct 12, 2014 at 12:05 AM, Joe Perches <joe@perches.com> wrote:
> On Sun, 2014-10-12 at 00:01 +0530, Rahul Bedarkar wrote:
> []
>> diff --git a/drivers/char/misc.c b/drivers/char/misc.c
> []
>> @@ -280,12 +280,12 @@ static int __init misc_init(void)
>>
>> err = -EIO;
>> if (register_chrdev(MISC_MAJOR,"misc",&misc_fops))
>> - goto fail_printk;
>> + goto fail_pr_err;
>> misc_class->devnode = misc_devnode;
>> return 0;
>>
>> -fail_printk:
>> - printk("unable to get major %d for misc devices\n", MISC_MAJOR);
>> +fail_pr_err:
>> + pr_err("unable to get major %d for misc devices\n", MISC_MAJOR);
>> class_destroy(misc_class);
>> fail_remove:
>> remove_proc_entry("misc", NULL);
>
> The printk is not relevant.
> Maybe the label should be "fail_destroy:"
Ok. I will split this in two separate patches one renames label first and
other use pr_err instead of printk. I will resend this patch
Thanks,
Rahul
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-14 15:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-11 18:31 [PATCH] char: misc: use pr_err instead of printk Rahul Bedarkar
2014-10-11 18:35 ` Joe Perches
2014-10-14 15:22 ` Rahul Bedarkar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®