From: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
To: gregkh@linuxfoundation.org
Cc: willy@meta-x.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org,
Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Subject: [PATCH 4/5] Staging: panel: Reduce value range for *name
Date: Tue, 29 Dec 2015 21:09:07 +0100 [thread overview]
Message-ID: <98e397c49797d27fc7494e213a6980946df785e7.1451418912.git.ksenija.stanojevic@gmail.com> (raw)
In-Reply-To: <cover.1451418911.git.ksenija.stanojevic@gmail.com>
out is 0-9 so it's too much for om, therefore reduce value range for
*name from '0'-'9' to '0'-'7'.
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
---
drivers/staging/panel/panel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index 6dc3efb..70cb9f3 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -2065,7 +2065,7 @@ static u8 input_name2mask(const char *name, __u64 *mask, __u64 *value,
im |= BIT(in);
name++;
- if (isdigit(*name)) {
+ if (*name >= '0' && *name <= '7') {
out = *name - '0';
om |= BIT(out);
} else if (*name == '-') {
--
1.9.1
next prev parent reply other threads:[~2015-12-29 20:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-29 20:04 [PATCH 0/5] Staging: panel: TODO fixes Ksenija Stanojevic
2015-12-29 20:05 ` [PATCH 1/5] Staging: panel: Use u8 type Ksenija Stanojevic
2015-12-29 20:07 ` [PATCH 2/5] Staging: panel: Remove typedef pmask_t Ksenija Stanojevic
2015-12-29 20:08 ` [PATCH 3/5] Staging: panel: Remove ULL Ksenija Stanojevic
2015-12-29 20:59 ` Ilia Mirkin
2015-12-29 23:35 ` Willy Tarreau
2015-12-29 20:09 ` Ksenija Stanojevic [this message]
2015-12-29 20:11 ` [PATCH 5/5] Staging: panel: Make statement more readable Ksenija Stanojevic
2016-01-02 6:53 ` Willy Tarreau
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=98e397c49797d27fc7494e213a6980946df785e7.1451418912.git.ksenija.stanojevic@gmail.com \
--to=ksenija.stanojevic@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=willy@meta-x.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 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).