Skip to contentSkip to conversation

dmaengine: edma: predecence bug in GET_NUM_QDMACH()

PATCH Applied Dan Carpenter 3 participants 3 messages Nov 4, 2015 – Nov 16, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: edma: predecence bug in GET_NUM_QDMACH()

The current code uses bits 0-2 instead of 4-6 as the comment says.

Fixes 633e42b8c546 ('dmaengine: edma: Get qDMA channel information from HW also')
drivers/dma/edma.c +1 -1
index 31722d4..ba5eb17 100644
@@ -107,7 +107,7 @@
 
 /* CCCFG register */
 #define GET_NUM_DMACH(x)	(x & 0x7) /* bits 0-2 */
-#define GET_NUM_QDMACH(x)	(x & 0x70 >> 4) /* bits 4-6 */
+#define GET_NUM_QDMACH(x)	((x & 0x70) >> 4) /* bits 4-6 */
 #define GET_NUM_PAENTRY(x)	((x & 0x7000) >> 12) /* bits 12-14 */
 #define GET_NUM_EVQUE(x)	((x & 0x70000) >> 16) /* bits 16-18 */
 #define GET_NUM_REGN(x)		((x & 0x300000) >> 20) /* bits 20-21 */
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Dan Carpenter

The current code uses bits 0-2 instead of 4-6 as the comment says.

Fixes 633e42b8c546 ('dmaengine: edma: Get qDMA channel information from HW also')

True, I did not noticed this since we are not using qDMA in Linux right now.

Quoted 15 lines
drivers/dma/edma.c +1 -1
index 31722d4..ba5eb17 100644
@@ -107,7 +107,7 @@
 
 /* CCCFG register */
 #define GET_NUM_DMACH(x)	(x & 0x7) /* bits 0-2 */
-#define GET_NUM_QDMACH(x)	(x & 0x70 >> 4) /* bits 4-6 */
+#define GET_NUM_QDMACH(x)	((x & 0x70) >> 4) /* bits 4-6 */
 #define GET_NUM_PAENTRY(x)	((x & 0x7000) >> 12) /* bits 12-14 */
 #define GET_NUM_EVQUE(x)	((x & 0x70000) >> 16) /* bits 16-18 */
 #define GET_NUM_REGN(x)		((x & 0x300000) >> 20) /* bits 20-21 */
Signature · 5 lines
Péter
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html