From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
To: LMML <linux-media@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
DLOS <davinci-linux-open-source@linux.davincidsp.com>,
"Lad, Prabhakar" <prabhakar.lad@ti.com>
Subject: [PATCH] davinci: dm644x: fix enum ccdc_gama_width and enum ccdc_data_size comparision warning
Date: Wed, 2 Jan 2013 17:23:50 +0530 [thread overview]
Message-ID: <1357127630-8167-2-git-send-email-prabhakar.lad@ti.com> (raw)
In-Reply-To: <1357127630-8167-1-git-send-email-prabhakar.lad@ti.com>
while the effect is harmless this patch fixes following build warning,
drivers/media/platform/davinci/dm644x_ccdc.c: In function ‘validate_ccdc_param’:
drivers/media/platform/davinci/dm644x_ccdc.c:233:32: warning: comparison between
‘enum ccdc_gama_width’ and ‘enum ccdc_data_size’ [-Wenum-compare]
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
---
drivers/media/platform/davinci/dm644x_ccdc.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/media/platform/davinci/dm644x_ccdc.c b/drivers/media/platform/davinci/dm644x_ccdc.c
index ee7942b..42b473a 100644
--- a/drivers/media/platform/davinci/dm644x_ccdc.c
+++ b/drivers/media/platform/davinci/dm644x_ccdc.c
@@ -228,9 +228,12 @@ static void ccdc_readregs(void)
static int validate_ccdc_param(struct ccdc_config_params_raw *ccdcparam)
{
if (ccdcparam->alaw.enable) {
+ u32 gama_wd = ccdcparam->alaw.gama_wd;
+ u32 data_sz = ccdcparam->data_sz;
+
if ((ccdcparam->alaw.gama_wd > CCDC_GAMMA_BITS_09_0) ||
(ccdcparam->alaw.gama_wd < CCDC_GAMMA_BITS_15_6) ||
- (ccdcparam->alaw.gama_wd < ccdcparam->data_sz)) {
+ (gama_wd < data_sz)) {
dev_dbg(ccdc_cfg.dev, "\nInvalid data line select");
return -1;
}
--
1.7.4.1
next prev parent reply other threads:[~2013-01-02 11:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-02 11:53 [PATCH] davinci: dm355: Fix uninitialized variable compiler warnings Lad, Prabhakar
2013-01-02 11:53 ` Lad, Prabhakar [this message]
2013-02-05 16:24 ` [PATCH] davinci: dm644x: fix enum ccdc_gama_width and enum ccdc_data_size comparision warning Mauro Carvalho Chehab
2013-02-05 17:18 ` Prabhakar Lad
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=1357127630-8167-2-git-send-email-prabhakar.lad@ti.com \
--to=prabhakar.csengg@gmail.com \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=prabhakar.lad@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox