All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmaengine: ti: edma: Remove some unused functions
@ 2022-09-14 10:19 Jiapeng Chong
  2022-09-26 18:00 ` Péter Ujfalusi
  2022-09-29 15:55 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Jiapeng Chong @ 2022-09-14 10:19 UTC (permalink / raw)
  To: peter.ujfalusi; +Cc: vkoul, dmaengine, linux-kernel, Jiapeng Chong, Abaci Robot

These functions are defined in the edma.c file, but not called elsewhere,
so delete these unused functions.

drivers/dma/ti/edma.c:746:31: warning: unused function 'to_edma_cc'.
drivers/dma/ti/edma.c:420:20: warning: unused function 'edma_param_or'.
drivers/dma/ti/edma.c:414:20: warning: unused function 'edma_param_and'.
drivers/dma/ti/edma.c:402:20: warning: unused function 'edma_param_write'.
drivers/dma/ti/edma.c:373:28: warning: unused function 'edma_shadow0_read'.
drivers/dma/ti/edma.c:396:28: warning: unused function 'edma_param_read'.
drivers/dma/ti/edma.c:355:20: warning: unused function 'edma_or_array'.

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

diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c
index 4cbca80ee16e..fa06d7e6d8e3 100644
--- a/drivers/dma/ti/edma.c
+++ b/drivers/dma/ti/edma.c
@@ -352,12 +352,6 @@ static inline void edma_modify_array(struct edma_cc *ecc, int offset, int i,
 	edma_modify(ecc, offset + (i << 2), and, or);
 }
 
-static inline void edma_or_array(struct edma_cc *ecc, int offset, int i,
-				 unsigned or)
-{
-	edma_or(ecc, offset + (i << 2), or);
-}
-
 static inline void edma_or_array2(struct edma_cc *ecc, int offset, int i, int j,
 				  unsigned or)
 {
@@ -370,11 +364,6 @@ static inline void edma_write_array2(struct edma_cc *ecc, int offset, int i,
 	edma_write(ecc, offset + ((i * 2 + j) << 2), val);
 }
 
-static inline unsigned int edma_shadow0_read(struct edma_cc *ecc, int offset)
-{
-	return edma_read(ecc, EDMA_SHADOW0 + offset);
-}
-
 static inline unsigned int edma_shadow0_read_array(struct edma_cc *ecc,
 						   int offset, int i)
 {
@@ -393,36 +382,12 @@ static inline void edma_shadow0_write_array(struct edma_cc *ecc, int offset,
 	edma_write(ecc, EDMA_SHADOW0 + offset + (i << 2), val);
 }
 
-static inline unsigned int edma_param_read(struct edma_cc *ecc, int offset,
-					   int param_no)
-{
-	return edma_read(ecc, EDMA_PARM + offset + (param_no << 5));
-}
-
-static inline void edma_param_write(struct edma_cc *ecc, int offset,
-				    int param_no, unsigned val)
-{
-	edma_write(ecc, EDMA_PARM + offset + (param_no << 5), val);
-}
-
 static inline void edma_param_modify(struct edma_cc *ecc, int offset,
 				     int param_no, unsigned and, unsigned or)
 {
 	edma_modify(ecc, EDMA_PARM + offset + (param_no << 5), and, or);
 }
 
-static inline void edma_param_and(struct edma_cc *ecc, int offset, int param_no,
-				  unsigned and)
-{
-	edma_and(ecc, EDMA_PARM + offset + (param_no << 5), and);
-}
-
-static inline void edma_param_or(struct edma_cc *ecc, int offset, int param_no,
-				 unsigned or)
-{
-	edma_or(ecc, EDMA_PARM + offset + (param_no << 5), or);
-}
-
 static void edma_assign_priority_to_queue(struct edma_cc *ecc, int queue_no,
 					  int priority)
 {
@@ -743,11 +708,6 @@ static void edma_free_channel(struct edma_chan *echan)
 	edma_setup_interrupt(echan, false);
 }
 
-static inline struct edma_cc *to_edma_cc(struct dma_device *d)
-{
-	return container_of(d, struct edma_cc, dma_slave);
-}
-
 static inline struct edma_chan *to_edma_chan(struct dma_chan *c)
 {
 	return container_of(c, struct edma_chan, vchan.chan);
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] dmaengine: ti: edma: Remove some unused functions
  2022-09-14 10:19 [PATCH] dmaengine: ti: edma: Remove some unused functions Jiapeng Chong
@ 2022-09-26 18:00 ` Péter Ujfalusi
  2022-09-29 15:55 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Péter Ujfalusi @ 2022-09-26 18:00 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: vkoul, dmaengine, linux-kernel, Abaci Robot



On 9/14/22 13:19, Jiapeng Chong wrote:
> These functions are defined in the edma.c file, but not called elsewhere,
> so delete these unused functions.
> 
> drivers/dma/ti/edma.c:746:31: warning: unused function 'to_edma_cc'.
> drivers/dma/ti/edma.c:420:20: warning: unused function 'edma_param_or'.
> drivers/dma/ti/edma.c:414:20: warning: unused function 'edma_param_and'.
> drivers/dma/ti/edma.c:402:20: warning: unused function 'edma_param_write'.
> drivers/dma/ti/edma.c:373:28: warning: unused function 'edma_shadow0_read'.
> drivers/dma/ti/edma.c:396:28: warning: unused function 'edma_param_read'.
> drivers/dma/ti/edma.c:355:20: warning: unused function 'edma_or_array'.

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

> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2152
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  drivers/dma/ti/edma.c | 40 ----------------------------------------
>  1 file changed, 40 deletions(-)
> 
> diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c
> index 4cbca80ee16e..fa06d7e6d8e3 100644
> --- a/drivers/dma/ti/edma.c
> +++ b/drivers/dma/ti/edma.c
> @@ -352,12 +352,6 @@ static inline void edma_modify_array(struct edma_cc *ecc, int offset, int i,
>  	edma_modify(ecc, offset + (i << 2), and, or);
>  }
>  
> -static inline void edma_or_array(struct edma_cc *ecc, int offset, int i,
> -				 unsigned or)
> -{
> -	edma_or(ecc, offset + (i << 2), or);
> -}
> -
>  static inline void edma_or_array2(struct edma_cc *ecc, int offset, int i, int j,
>  				  unsigned or)
>  {
> @@ -370,11 +364,6 @@ static inline void edma_write_array2(struct edma_cc *ecc, int offset, int i,
>  	edma_write(ecc, offset + ((i * 2 + j) << 2), val);
>  }
>  
> -static inline unsigned int edma_shadow0_read(struct edma_cc *ecc, int offset)
> -{
> -	return edma_read(ecc, EDMA_SHADOW0 + offset);
> -}
> -
>  static inline unsigned int edma_shadow0_read_array(struct edma_cc *ecc,
>  						   int offset, int i)
>  {
> @@ -393,36 +382,12 @@ static inline void edma_shadow0_write_array(struct edma_cc *ecc, int offset,
>  	edma_write(ecc, EDMA_SHADOW0 + offset + (i << 2), val);
>  }
>  
> -static inline unsigned int edma_param_read(struct edma_cc *ecc, int offset,
> -					   int param_no)
> -{
> -	return edma_read(ecc, EDMA_PARM + offset + (param_no << 5));
> -}
> -
> -static inline void edma_param_write(struct edma_cc *ecc, int offset,
> -				    int param_no, unsigned val)
> -{
> -	edma_write(ecc, EDMA_PARM + offset + (param_no << 5), val);
> -}
> -
>  static inline void edma_param_modify(struct edma_cc *ecc, int offset,
>  				     int param_no, unsigned and, unsigned or)
>  {
>  	edma_modify(ecc, EDMA_PARM + offset + (param_no << 5), and, or);
>  }
>  
> -static inline void edma_param_and(struct edma_cc *ecc, int offset, int param_no,
> -				  unsigned and)
> -{
> -	edma_and(ecc, EDMA_PARM + offset + (param_no << 5), and);
> -}
> -
> -static inline void edma_param_or(struct edma_cc *ecc, int offset, int param_no,
> -				 unsigned or)
> -{
> -	edma_or(ecc, EDMA_PARM + offset + (param_no << 5), or);
> -}
> -
>  static void edma_assign_priority_to_queue(struct edma_cc *ecc, int queue_no,
>  					  int priority)
>  {
> @@ -743,11 +708,6 @@ static void edma_free_channel(struct edma_chan *echan)
>  	edma_setup_interrupt(echan, false);
>  }
>  
> -static inline struct edma_cc *to_edma_cc(struct dma_device *d)
> -{
> -	return container_of(d, struct edma_cc, dma_slave);
> -}
> -
>  static inline struct edma_chan *to_edma_chan(struct dma_chan *c)
>  {
>  	return container_of(c, struct edma_chan, vchan.chan);

-- 
Péter

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dmaengine: ti: edma: Remove some unused functions
  2022-09-14 10:19 [PATCH] dmaengine: ti: edma: Remove some unused functions Jiapeng Chong
  2022-09-26 18:00 ` Péter Ujfalusi
@ 2022-09-29 15:55 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2022-09-29 15:55 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: peter.ujfalusi, dmaengine, linux-kernel, Abaci Robot

On 14-09-22, 18:19, Jiapeng Chong wrote:
> These functions are defined in the edma.c file, but not called elsewhere,
> so delete these unused functions.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-29 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14 10:19 [PATCH] dmaengine: ti: edma: Remove some unused functions Jiapeng Chong
2022-09-26 18:00 ` Péter Ujfalusi
2022-09-29 15:55 ` Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.