All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Linux Media Mailing List <linux-media@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: [PATCH 21/27] tda10086: change typecast to u64 to avoid smatch warnings
Date: Wed, 29 Apr 2015 20:06:06 -0300	[thread overview]
Message-ID: <1acf7361dc975eea2f0fb7f620a7964ee1a8219d.1430348725.git.mchehab@osg.samsung.com> (raw)
In-Reply-To: <89e5bc8de1ae960f10bd5ea465e7e4f7c6b8812a.1430348725.git.mchehab@osg.samsung.com>
In-Reply-To: <89e5bc8de1ae960f10bd5ea465e7e4f7c6b8812a.1430348725.git.mchehab@osg.samsung.com>

drivers/media/dvb-frontends/tda10086.c:476 tda10086_get_frontend() warn: should 'tda10086_read_byte(state, 81) << 8' be a 64 bit type?

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

diff --git a/drivers/media/dvb-frontends/tda10086.c b/drivers/media/dvb-frontends/tda10086.c
index fcfe2e080cb0..f1a752187d08 100644
--- a/drivers/media/dvb-frontends/tda10086.c
+++ b/drivers/media/dvb-frontends/tda10086.c
@@ -472,8 +472,8 @@ static int tda10086_get_frontend(struct dvb_frontend *fe)
 		return -EINVAL;
 
 	/* calculate the updated frequency (note: we convert from Hz->kHz) */
-	tmp64 = tda10086_read_byte(state, 0x52);
-	tmp64 |= (tda10086_read_byte(state, 0x51) << 8);
+	tmp64 = ((u64)tda10086_read_byte(state, 0x52)
+		| (tda10086_read_byte(state, 0x51) << 8));
 	if (tmp64 & 0x8000)
 		tmp64 |= 0xffffffffffff0000ULL;
 	tmp64 = (tmp64 * (SACLK/1000ULL));
-- 
2.1.0


  parent reply	other threads:[~2015-04-29 23:06 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-29 23:05 [PATCH 01/27] qt1010: avoid going past array Mauro Carvalho Chehab
2015-04-29 23:05 ` [PATCH 02/27] mantis: remove dead code Mauro Carvalho Chehab
2015-04-29 23:05 ` [PATCH 03/27] tda1004x: fix identation Mauro Carvalho Chehab
2015-04-29 23:05 ` [PATCH 04/27] r820t: fix identing Mauro Carvalho Chehab
2015-04-29 23:05 ` [PATCH 05/27] bttv: fix indenting Mauro Carvalho Chehab
2015-04-29 23:05 ` [PATCH 06/27] zl10353: " Mauro Carvalho Chehab
2015-04-29 23:05 ` [PATCH 07/27] stv0297: change typecast to u64 to avoid smatch warnings Mauro Carvalho Chehab
2015-04-29 23:05 ` [PATCH 08/27] ov7670: check read error also for REG_AECHH on ov7670_s_exp() Mauro Carvalho Chehab
2015-04-30 16:59   ` Jonathan Corbet
2015-04-29 23:05 ` [PATCH 09/27] cx231xx: fix bad indenting Mauro Carvalho Chehab
2015-04-29 23:05 ` [PATCH 10/27] dib3000mc: " Mauro Carvalho Chehab
2015-04-29 23:05 ` [PATCH 11/27] dib0070: Fix indenting Mauro Carvalho Chehab
2015-04-29 23:05 ` [PATCH 12/27] go7007: Comment some dead code Mauro Carvalho Chehab
2015-04-29 23:05 ` [PATCH 13/27] vp702x: comment " Mauro Carvalho Chehab
2015-04-29 23:05 ` [PATCH 14/27] redrat3: change return argument on redrat3_send_cmd() to int Mauro Carvalho Chehab
2015-04-29 23:06 ` [PATCH 15/27] sonixj: fix bad indenting Mauro Carvalho Chehab
2015-04-29 23:06 ` [PATCH 16/27] stk014: " Mauro Carvalho Chehab
2015-04-29 23:06 ` [PATCH 17/27] pvrusb2: fix inconsistent indenting Mauro Carvalho Chehab
2015-04-29 23:06 ` [PATCH 18/27] cx25840: fix bad identing Mauro Carvalho Chehab
2015-04-30 10:17   ` Lad, Prabhakar
2015-04-29 23:06 ` [PATCH 19/27] stv0900: fix bad indenting Mauro Carvalho Chehab
2015-04-29 23:06 ` [PATCH 20/27] s5h1420: use only one statement per line Mauro Carvalho Chehab
2015-04-29 23:06 ` Mauro Carvalho Chehab [this message]
2015-04-29 23:06 ` [PATCH 22/27] bttv: fix audio hooks Mauro Carvalho Chehab
2015-04-29 23:06 ` [PATCH 23/27] ttusb-dec: fix bad indentation Mauro Carvalho Chehab
2015-04-29 23:06 ` [PATCH 24/27] s5p-mfc: " Mauro Carvalho Chehab
2015-04-29 23:06   ` Mauro Carvalho Chehab
2015-04-29 23:06 ` [PATCH 25/27] usbvision: " Mauro Carvalho Chehab
2015-04-30  6:19   ` Hans Verkuil
2015-04-29 23:06 ` [PATCH 26/27] saa7134: fix bad indenting Mauro Carvalho Chehab
2015-04-29 23:06 ` [PATCH 27/27] dib0700: fix bad indentation Mauro Carvalho Chehab

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=1acf7361dc975eea2f0fb7f620a7964ee1a8219d.1430348725.git.mchehab@osg.samsung.com \
    --to=mchehab@osg.samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    /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.