dmaengine: edma: predecence bug in GET_NUM_QDMACH()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 4 Nov 2015 13:38:31 +0000 (16:38 +0300)
committerVinod Koul <vinod.koul@intel.com>
Mon, 16 Nov 2015 03:37:35 +0000 (09:07 +0530)
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')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/edma.c

index c69d22c0b9ba78932883e8472cd5844c37221d44..0675e268d5777967489bf25b30f5d217290fa441 100644 (file)
 
 /* 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 */