dmaengine: ti: edma: Remove the unused function edma_and()

Message ID 20221018083820.25297-1-jiapeng.chong@linux.alibaba.com
State New
Headers
Series dmaengine: ti: edma: Remove the unused function edma_and() |

Commit Message

Jiapeng Chong Oct. 18, 2022, 8:38 a.m. UTC
  The function edma_and() is defined in the edma.c file, but not called
elsewhere, so remove this unused function.

drivers/dma/ti/edma.c:321:20: warning: unused function 'edma_and'.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2430
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/dma/ti/edma.c | 8 --------
 1 file changed, 8 deletions(-)
  

Comments

Vinod Koul Oct. 19, 2022, 1:46 p.m. UTC | #1
On 18-10-22, 16:38, Jiapeng Chong wrote:
> The function edma_and() is defined in the edma.c file, but not called
> elsewhere, so remove this unused function.
> 
> drivers/dma/ti/edma.c:321:20: warning: unused function 'edma_and'.
> 
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2430
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>

Where is this report?

> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  drivers/dma/ti/edma.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c
> index fa06d7e6d8e3..9ea91c640c32 100644
> --- a/drivers/dma/ti/edma.c
> +++ b/drivers/dma/ti/edma.c
> @@ -318,14 +318,6 @@ static inline void edma_modify(struct edma_cc *ecc, int offset, unsigned and,
>  	edma_write(ecc, offset, val);
>  }
>  
> -static inline void edma_and(struct edma_cc *ecc, int offset, unsigned and)
> -{
> -	unsigned val = edma_read(ecc, offset);
> -
> -	val &= and;
> -	edma_write(ecc, offset, val);
> -}
> -
>  static inline void edma_or(struct edma_cc *ecc, int offset, unsigned or)
>  {
>  	unsigned val = edma_read(ecc, offset);
> -- 
> 2.20.1.7.g153144c
  
Péter Ujfalusi Oct. 26, 2022, 5:21 p.m. UTC | #2
On 18/10/2022 11:38, Jiapeng Chong wrote:
> The function edma_and() is defined in the edma.c file, but not called
> elsewhere, so remove this unused function.
> 
> drivers/dma/ti/edma.c:321:20: warning: unused function 'edma_and'.

0f4c5b29e333 dmaengine: ti: edma: Remove some unused functions
dropped edma_param_and() but left the edma_and() behind...

Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>

> 
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2430
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>   drivers/dma/ti/edma.c | 8 --------
>   1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c
> index fa06d7e6d8e3..9ea91c640c32 100644
> --- a/drivers/dma/ti/edma.c
> +++ b/drivers/dma/ti/edma.c
> @@ -318,14 +318,6 @@ static inline void edma_modify(struct edma_cc *ecc, int offset, unsigned and,
>   	edma_write(ecc, offset, val);
>   }
>   
> -static inline void edma_and(struct edma_cc *ecc, int offset, unsigned and)
> -{
> -	unsigned val = edma_read(ecc, offset);
> -
> -	val &= and;
> -	edma_write(ecc, offset, val);
> -}
> -
>   static inline void edma_or(struct edma_cc *ecc, int offset, unsigned or)
>   {
>   	unsigned val = edma_read(ecc, offset);
  
Vinod Koul Nov. 4, 2022, 2:40 p.m. UTC | #3
On 20-10-22, 10:10, Jiapeng.Chong wrote:
> The report is the link, which can be seen in the submitted patch description. Thank you.

Pls dont top post!

> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2430

This bug says: "ABACI reported the following bug by code static
scanning"

Where is the ABACI report?

> ------------------------------------------------------------------
> 发件人:Vinod Koul <vkoul@kernel.org>
> 发送时间:2022年10月19日(星期三) 21:46
> 收件人:Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> 抄 送:peter.ujfalusi <peter.ujfalusi@gmail.com>; dmaengine <dmaengine@vger.kernel.org>; linux-kernel <linux-kernel@vger.kernel.org>; Abaci Robot <abaci@linux.alibaba.com>
> 主 题:Re: [PATCH] dmaengine: ti: edma: Remove the unused function edma_and()
> On 18-10-22, 16:38, Jiapeng Chong wrote:
> > The function edma_and() is defined in the edma.c file, but not called
> > elsewhere, so remove this unused function.
> > 
> > drivers/dma/ti/edma.c:321:20: warning: unused function 'edma_and'.
> > 
> > Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2430
> > Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Where is this report?
> > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> > ---
> > drivers/dma/ti/edma.c | 8 --------
> > 1 file changed, 8 deletions(-)
> > 
> > diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c
> > index fa06d7e6d8e3..9ea91c640c32 100644
> > --- a/drivers/dma/ti/edma.c
> > +++ b/drivers/dma/ti/edma.c
> > @@ -318,14 +318,6 @@ static inline void edma_modify(struct edma_cc *ecc, int offset, unsigned and,
> > edma_write(ecc, offset, val);
> > }
> > 
> > -static inline void edma_and(struct edma_cc *ecc, int offset, unsigned and)
> > -{
> > - unsigned val = edma_read(ecc, offset);
> > -
> > - val &= and;
> > - edma_write(ecc, offset, val);
> > -}
> > -
> > static inline void edma_or(struct edma_cc *ecc, int offset, unsigned or)
> > {
> > unsigned val = edma_read(ecc, offset);
> > -- 
> > 2.20.1.7.g153144c
> -- 
> ~Vinod
  

Patch

diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c
index fa06d7e6d8e3..9ea91c640c32 100644
--- a/drivers/dma/ti/edma.c
+++ b/drivers/dma/ti/edma.c
@@ -318,14 +318,6 @@  static inline void edma_modify(struct edma_cc *ecc, int offset, unsigned and,
 	edma_write(ecc, offset, val);
 }
 
-static inline void edma_and(struct edma_cc *ecc, int offset, unsigned and)
-{
-	unsigned val = edma_read(ecc, offset);
-
-	val &= and;
-	edma_write(ecc, offset, val);
-}
-
 static inline void edma_or(struct edma_cc *ecc, int offset, unsigned or)
 {
 	unsigned val = edma_read(ecc, offset);