Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1300372
| From | Ksenija Stanojevic <ksenija.stanojevic@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 4/5] Staging: panel: Reduce value range for *name |
| Date | 2016-01-03 20:50 +0100 |
| Message-ID | <qMWP8-1hw-13@gated-at.bofh.it> (permalink) |
| References | <qMWFr-1cF-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
v2: nothing
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 e9641ea..fcfcda7 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/5] Staging: panel: TODO fixes Ksenija Stanojevic <ksenija.stanojevic@gmail.com> - 2016-01-03 20:40 +0100 [PATCH v2 5/5] Staging: panel: Make code more readable Ksenija Stanojevic <ksenija.stanojevic@gmail.com> - 2016-01-03 20:50 +0100 [PATCH v2 4/5] Staging: panel: Reduce value range for *name Ksenija Stanojevic <ksenija.stanojevic@gmail.com> - 2016-01-03 20:50 +0100 [PATCH v2 3/5] Staging: panel: Remove ULL Ksenija Stanojevic <ksenija.stanojevic@gmail.com> - 2016-01-03 20:50 +0100 [PATCH v2 2/5] Staging: panel: Remove typedef pmask_t Ksenija Stanojevic <ksenija.stanojevic@gmail.com> - 2016-01-03 20:50 +0100 [PATCH v2 1/5] Staging: panel: Use u8 type Ksenija Stanojevic <ksenija.stanojevic@gmail.com> - 2016-01-03 20:50 +0100
csiph-web