From: Sylwester Nawrocki <snjw23@gmail.com>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: linux-media@vger.kernel.org, t.stanislaws@samsung.com,
k.debski@samsung.com, s.nawrocki@samsung.com,
kyungmin.park@samsung.com, mchehab@infradead.org,
patches@linaro.org
Subject: Re: [PATCH 3/3] [media] s5p-fimc: Replace printk with pr_* functions
Date: Mon, 11 Jun 2012 15:00:25 +0200 [thread overview]
Message-ID: <4FD5EBE9.509@gmail.com> (raw)
In-Reply-To: <1339409634-13657-3-git-send-email-sachin.kamat@linaro.org>
Hi Sachin,
On 06/11/2012 12:13 PM, Sachin Kamat wrote:
> Replace printk with pr_* functions to silence checkpatch warnings.
>
> Signed-off-by: Sachin Kamat<sachin.kamat@linaro.org>
> ---
> drivers/media/video/s5p-fimc/fimc-core.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/video/s5p-fimc/fimc-core.h b/drivers/media/video/s5p-fimc/fimc-core.h
> index 95b27ae..c22fb0a 100644
> --- a/drivers/media/video/s5p-fimc/fimc-core.h
> +++ b/drivers/media/video/s5p-fimc/fimc-core.h
> @@ -28,7 +28,7 @@
> #include<media/s5p_fimc.h>
>
> #define err(fmt, args...) \
> - printk(KERN_ERR "%s:%d: " fmt "\n", __func__, __LINE__, ##args)
> + pr_err("%s:%d: " fmt "\n", __func__, __LINE__, ##args)
I don't think it's worth the effort. If you really want to get rid
of that warnings, please remove the err() macro altogether and
do something like this instead:
8<----------------------------------------------------------------
diff --git a/drivers/media/video/s5p-fimc/fimc-core.h b/drivers/media/video/s5p-fimc/fimc-core.h
index 95b27ae..808ccc6 100644
--- a/drivers/media/video/s5p-fimc/fimc-core.h
+++ b/drivers/media/video/s5p-fimc/fimc-core.h
@@ -27,9 +27,6 @@
#include <media/v4l2-mediabus.h>
#include <media/s5p_fimc.h>
-#define err(fmt, args...) \
- printk(KERN_ERR "%s:%d: " fmt "\n", __func__, __LINE__, ##args)
-
#define dbg(fmt, args...) \
pr_debug("%s:%d: " fmt "\n", __func__, __LINE__, ##args)
diff --git a/drivers/media/video/s5p-fimc/fimc-reg.c b/drivers/media/video/s5p-fimc/fimc-reg.c
index 1fc4ce8..74a2fba 100644
--- a/drivers/media/video/s5p-fimc/fimc-reg.c
+++ b/drivers/media/video/s5p-fimc/fimc-reg.c
@@ -683,8 +683,8 @@ int fimc_hw_set_camera_type(struct fimc_dev *fimc,
cfg |= FIMC_REG_CIGCTRL_CAM_JPEG;
break;
default:
- v4l2_err(fimc->vid_cap.vfd,
- "Not supported camera pixel format: %d",
+ v4l2_err(vid_cap->vfd,
+ "Not supported camera pixel format: %#x\n",
vid_cap->mf.code);
return -EINVAL;
}
@@ -699,7 +699,7 @@ int fimc_hw_set_camera_type(struct fimc_dev *fimc,
} else if (cam->bus_type == FIMC_LCD_WB) {
cfg |= FIMC_REG_CIGCTRL_CAMIF_SELWB;
} else {
- err("invalid camera bus type selected\n");
+ v4l2_err(vid_cap->vfd, "Invalid camera bus type selected\n");
return -EINVAL;
}
writel(cfg, fimc->regs + FIMC_REG_CIGCTRL);
8>----------------------------------------------------------------
Thanks!
Sylwester
next prev parent reply other threads:[~2012-06-11 13:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-11 10:13 [PATCH 1/3] [media] s5p-tv: Replace printk with pr_* functions Sachin Kamat
2012-06-11 10:13 ` [PATCH 2/3] [media] s5p-mfc: " Sachin Kamat
2012-06-13 12:15 ` Kamil Debski
2012-06-11 10:13 ` [PATCH 3/3] [media] s5p-fimc: " Sachin Kamat
2012-06-11 13:00 ` Sylwester Nawrocki [this message]
2012-06-12 6:07 ` Sachin Kamat
2012-08-14 14:06 ` [PATCH 1/3] [media] s5p-tv: " Sylwester Nawrocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FD5EBE9.509@gmail.com \
--to=snjw23@gmail.com \
--cc=k.debski@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=patches@linaro.org \
--cc=s.nawrocki@samsung.com \
--cc=sachin.kamat@linaro.org \
--cc=t.stanislaws@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.