From: Xi Wang <xi.wang@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Xi Wang <xi.wang@gmail.com>
Subject: [PATCH] input: signedness bug in cma3000_thread_irq()
Date: Mon, 12 Dec 2011 01:49:26 -0500 [thread overview]
Message-ID: <1323672566-16738-1-git-send-email-xi.wang@gmail.com> (raw)
The error check (intr_status < 0) didn't work because intr_status is
a u8. Change its type to signed int.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
---
drivers/input/misc/cma3000_d0x.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/cma3000_d0x.c b/drivers/input/misc/cma3000_d0x.c
index 80793f1..06517e6 100644
--- a/drivers/input/misc/cma3000_d0x.c
+++ b/drivers/input/misc/cma3000_d0x.c
@@ -115,8 +115,8 @@ static void decode_mg(struct cma3000_accl_data *data, int *datax,
static irqreturn_t cma3000_thread_irq(int irq, void *dev_id)
{
struct cma3000_accl_data *data = dev_id;
- int datax, datay, dataz;
- u8 ctrl, mode, range, intr_status;
+ int datax, datay, dataz, intr_status;
+ u8 ctrl, mode, range;
intr_status = CMA3000_READ(data, CMA3000_INTSTATUS, "interrupt status");
if (intr_status < 0)
--
1.7.5.4
next reply other threads:[~2011-12-12 6:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-12 6:49 Xi Wang [this message]
2011-12-12 7:42 ` [PATCH] input: signedness bug in cma3000_thread_irq() Dmitry Torokhov
2011-12-15 2:27 ` Valdis.Kletnieks
2011-12-15 2:35 ` Xi Wang
2011-12-15 3:21 ` Valdis.Kletnieks
2011-12-15 22:17 ` Xi Wang
2011-12-22 17:50 ` Dmitry Torokhov
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=1323672566-16738-1-git-send-email-xi.wang@gmail.com \
--to=xi.wang@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paul.gortmaker@windriver.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;
as well as URLs for NNTP newsgroup(s).