Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: hsu: Use GENMASK() consistently

For the masks replace chain of BIT() macros by GENMASK().
While at it, explicitly include bits.h.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220713172235.22611-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Andy Shevchenko and committed by
Vinod Koul
2c40c787 d6b76a45

+4 -3
+4 -3
drivers/dma/hsu/hsu.h
··· 10 10 #ifndef __DMA_HSU_H__ 11 11 #define __DMA_HSU_H__ 12 12 13 + #include <linux/bits.h> 13 14 #include <linux/spinlock.h> 14 15 #include <linux/dma/hsu.h> 15 16 ··· 37 36 38 37 /* Bits in HSU_CH_SR */ 39 38 #define HSU_CH_SR_DESCTO(x) BIT(8 + (x)) 40 - #define HSU_CH_SR_DESCTO_ANY (BIT(11) | BIT(10) | BIT(9) | BIT(8)) 39 + #define HSU_CH_SR_DESCTO_ANY GENMASK(11, 8) 41 40 #define HSU_CH_SR_CHE BIT(15) 42 41 #define HSU_CH_SR_DESCE(x) BIT(16 + (x)) 43 - #define HSU_CH_SR_DESCE_ANY (BIT(19) | BIT(18) | BIT(17) | BIT(16)) 44 - #define HSU_CH_SR_CDESC_ANY (BIT(31) | BIT(30)) 42 + #define HSU_CH_SR_DESCE_ANY GENMASK(19, 16) 43 + #define HSU_CH_SR_CDESC_ANY GENMASK(31, 30) 45 44 46 45 /* Bits in HSU_CH_CR */ 47 46 #define HSU_CH_CR_CHA BIT(0)