* [PATCH v2 5/5] media: davinci: vpbe: Replace printk with dev_*
@ 2013-07-18 15:29 Prabhakar Lad
2013-07-18 15:40 ` Joe Perches
0 siblings, 1 reply; 3+ messages in thread
From: Prabhakar Lad @ 2013-07-18 15:29 UTC (permalink / raw)
To: LMML; +Cc: DLOS, LKML, Lad, Prabhakar
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Use the dev_* message logging API instead of raw printk.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
Posting independent patch of the series,
http://www.spinics.net/lists/linux-media/msg65701.html
Changes for v2:
1: Fixed logging levels.
drivers/media/platform/davinci/vpbe.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
index 33b9660..a3a36e0 100644
--- a/drivers/media/platform/davinci/vpbe.c
+++ b/drivers/media/platform/davinci/vpbe.c
@@ -595,7 +595,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
* matching with device name
*/
if (NULL == vpbe_dev || NULL == dev) {
- printk(KERN_ERR "Null device pointers.\n");
+ dev_err(dev, "Null device pointers.\n");
return -ENODEV;
}
@@ -735,7 +735,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
mutex_unlock(&vpbe_dev->lock);
- printk(KERN_NOTICE "Setting default output to %s\n", def_output);
+ dev_notice(dev, "Setting default output to %s\n", def_output);
ret = vpbe_set_default_output(vpbe_dev);
if (ret) {
v4l2_err(&vpbe_dev->v4l2_dev, "Failed to set default output %s",
@@ -743,7 +743,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
return ret;
}
- printk(KERN_NOTICE "Setting default mode to %s\n", def_mode);
+ dev_notice(dev, "Setting default mode to %s\n", def_mode);
ret = vpbe_set_default_mode(vpbe_dev);
if (ret) {
v4l2_err(&vpbe_dev->v4l2_dev, "Failed to set default mode %s",
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 5/5] media: davinci: vpbe: Replace printk with dev_*
2013-07-18 15:29 [PATCH v2 5/5] media: davinci: vpbe: Replace printk with dev_* Prabhakar Lad
@ 2013-07-18 15:40 ` Joe Perches
2013-07-18 15:45 ` Prabhakar Lad
0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2013-07-18 15:40 UTC (permalink / raw)
To: Prabhakar Lad; +Cc: LMML, DLOS, LKML
On Thu, 2013-07-18 at 20:59 +0530, Prabhakar Lad wrote:
> Use the dev_* message logging API instead of raw printk.
[]
> diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
[]
> @@ -595,7 +595,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
> * matching with device name
> */
> if (NULL == vpbe_dev || NULL == dev) {
> - printk(KERN_ERR "Null device pointers.\n");
> + dev_err(dev, "Null device pointers.\n");
And if dev actually is NULL?
btw: canonical forms for this test are
(if vpbe_dev == NULL || dev == NULL)
or
if (!bpbe_dev || !dev)
I stopped reading here.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 5/5] media: davinci: vpbe: Replace printk with dev_*
2013-07-18 15:40 ` Joe Perches
@ 2013-07-18 15:45 ` Prabhakar Lad
0 siblings, 0 replies; 3+ messages in thread
From: Prabhakar Lad @ 2013-07-18 15:45 UTC (permalink / raw)
To: Joe Perches; +Cc: LMML, DLOS, LKML
Hi Joe,
On Thu, Jul 18, 2013 at 9:10 PM, Joe Perches <joe@perches.com> wrote:
> On Thu, 2013-07-18 at 20:59 +0530, Prabhakar Lad wrote:
>> Use the dev_* message logging API instead of raw printk.
> []
>> diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
> []
>> @@ -595,7 +595,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
>> * matching with device name
>> */
>> if (NULL == vpbe_dev || NULL == dev) {
>> - printk(KERN_ERR "Null device pointers.\n");
>> + dev_err(dev, "Null device pointers.\n");
>
> And if dev actually is NULL?
>
Ah nice catch, I overlooked it, I'll fix it.
Regards,
--Prabhakar
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-18 15:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-18 15:29 [PATCH v2 5/5] media: davinci: vpbe: Replace printk with dev_* Prabhakar Lad
2013-07-18 15:40 ` Joe Perches
2013-07-18 15:45 ` Prabhakar Lad
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).