media: stm32-dma2d: fix compile errors when W=1
authorDillon Min <dillon.minfei@gmail.com>
Sun, 7 Nov 2021 14:41:44 +0000 (14:41 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:12:05 +0000 (08:12 +0000)
remove unused functions to avoid compile errors when W=1.

>> drivers/media/platform/stm32/dma2d/dma2d-hw.c:29:20:
error: unused function 'reg_set' [-Werror,-Wunused-function]
static inline void reg_set(void __iomem *base, u32 reg, u32 mask)

>> drivers/media/platform/stm32/dma2d/dma2d-hw.c:34:20:
error: unused function 'reg_clear' [-Werror,-Wunused-function]
static inline void reg_clear(void __iomem *base, u32 reg, u32 mask)

Fixes: bff6e3e2f4c9 ("media: stm32-dma2d: STM32 DMA2D driver")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Dillon Min <dillon.minfei@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/stm32/dma2d/dma2d-hw.c

index 8c1c664..ea4cc84 100644 (file)
@@ -26,16 +26,6 @@ static inline void reg_write(void __iomem *base, u32 reg, u32 val)
        writel_relaxed(val, base + reg);
 }
 
-static inline void reg_set(void __iomem *base, u32 reg, u32 mask)
-{
-       reg_write(base, reg, reg_read(base, reg) | mask);
-}
-
-static inline void reg_clear(void __iomem *base, u32 reg, u32 mask)
-{
-       reg_write(base, reg, reg_read(base, reg) & ~mask);
-}
-
 static inline void reg_update_bits(void __iomem *base, u32 reg, u32 mask,
                                   u32 val)
 {