From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: unlisted-recipients:; (no To-header on input)@casper.infradead.org
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Andy Walls <awalls@md.metrocast.net>
Subject: [PATCH v2] ivtv-mailbox: avoid confusing smatch
Date: Tue, 23 Feb 2016 07:10:59 -0300 [thread overview]
Message-ID: <dbfb8be944cabea5bc1eef31ca5c93d71f081b41.1456222254.git.mchehab@osg.samsung.com> (raw)
The current logic causes smatch to be confused:
include/linux/jiffies.h:359:41: error: strange non-value function or array
include/linux/jiffies.h:361:42: error: strange non-value function or array
include/linux/jiffies.h:359:41: error: strange non-value function or array
include/linux/jiffies.h:361:42: error: strange non-value function or array
Use a different logic.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
---
drivers/media/pci/ivtv/ivtv-mailbox.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/media/pci/ivtv/ivtv-mailbox.c b/drivers/media/pci/ivtv/ivtv-mailbox.c
index e3ce96763785..1d3586109b84 100644
--- a/drivers/media/pci/ivtv/ivtv-mailbox.c
+++ b/drivers/media/pci/ivtv/ivtv-mailbox.c
@@ -177,8 +177,10 @@ static int get_mailbox(struct ivtv *itv, struct ivtv_mailbox_data *mbdata, int f
/* Sleep before a retry, if not atomic */
if (!(flags & API_NO_WAIT_MB)) {
- if (time_after(jiffies,
- then + msecs_to_jiffies(10*retries)))
+ unsigned long timeout;
+
+ timeout = msecs_to_jiffies(10 * retries);
+ if (time_after(jiffies, then + timeout))
break;
ivtv_msleep_timeout(10, 0);
}
--
2.5.0
reply other threads:[~2016-02-23 10:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=dbfb8be944cabea5bc1eef31ca5c93d71f081b41.1456222254.git.mchehab@osg.samsung.com \
--to=mchehab@osg.samsung.com \
--cc=awalls@md.metrocast.net \
--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.