Skip to contentSkip to conversation

Staging: dgnc: fix bitmask

PATCH In review Matteo Semenzato 2 participants 2 messages Mar 9, 2015 – Mar 10, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: dgnc: fix bitmask

From: Matteo Semenzato <[email protected]>

The bitmask should be used on msignals since the signals variable is not used anywhere in the function.

---
 drivers/staging/dgnc/dgnc_cls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/dgnc/dgnc_cls.c +1 -1
index bedc522..29c6316 100644
@@ -1137,7 +1137,7 @@ static void cls_parse_modem(struct channel_t *ch, unsigned char signals)
 	 * Scrub off lower bits. They signify delta's, which I don't
 	 * care about
 	 */
-	signals &= 0xf0;
+	msignals &= 0xf0;
 
 	spin_lock_irqsave(&ch->ch_lock, flags);
 	if (msignals & UART_MSR_DCD)
Signature · 1 line
2.3.1
#1 lore raw
Quoted 5 lines · Matteo Semenzato

From: Matteo Semenzato <[email protected]>

The bitmask should be used on msignals since the signals variable is not used anywhere in the function.

You're probably right. I would really like to get Mark's Ack on this though becuase it's sort of a guess and not tested.

regards,
dan carpenter

Quoted 25 lines
---
 drivers/staging/dgnc/dgnc_cls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/dgnc/dgnc_cls.c +1 -1
index bedc522..29c6316 100644
@@ -1137,7 +1137,7 @@ static void cls_parse_modem(struct channel_t *ch, unsigned char signals)
 	 * Scrub off lower bits. They signify delta's, which I don't
 	 * care about
 	 */
-	signals &= 0xf0;
+	msignals &= 0xf0;
 
 	spin_lock_irqsave(&ch->ch_lock, flags);
 	if (msignals & UART_MSR_DCD)
Signature · 6 lines
2.3.1

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel