dmaengine: tegra-apb: remove unused tdma_read function

Message ID 20230322121001.2569909-1-trix@redhat.com
State New
Headers
Series dmaengine: tegra-apb: remove unused tdma_read function |

Commit Message

Tom Rix March 22, 2023, 12:10 p.m. UTC
  clang with W=1 reports
drivers/dma/tegra20-apb-dma.c:236:19: error: unused function
  'tdma_read' [-Werror,-Wunused-function]
static inline u32 tdma_read(struct tegra_dma *tdma, u32 reg)
                  ^
This function is not used so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/dma/tegra20-apb-dma.c | 5 -----
 1 file changed, 5 deletions(-)
  

Comments

Jon Hunter March 22, 2023, 1:46 p.m. UTC | #1
On 22/03/2023 12:10, Tom Rix wrote:
> clang with W=1 reports
> drivers/dma/tegra20-apb-dma.c:236:19: error: unused function
>    'tdma_read' [-Werror,-Wunused-function]
> static inline u32 tdma_read(struct tegra_dma *tdma, u32 reg)
>                    ^
> This function is not used so remove it.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>   drivers/dma/tegra20-apb-dma.c | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
> index eaafcbe4ca94..cc6b91f48979 100644
> --- a/drivers/dma/tegra20-apb-dma.c
> +++ b/drivers/dma/tegra20-apb-dma.c
> @@ -233,11 +233,6 @@ static inline void tdma_write(struct tegra_dma *tdma, u32 reg, u32 val)
>   	writel(val, tdma->base_addr + reg);
>   }
>   
> -static inline u32 tdma_read(struct tegra_dma *tdma, u32 reg)
> -{
> -	return readl(tdma->base_addr + reg);
> -}
> -
>   static inline void tdc_write(struct tegra_dma_channel *tdc,
>   			     u32 reg, u32 val)
>   {


Thanks!

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>

Jon
  
Vinod Koul March 31, 2023, 12:21 p.m. UTC | #2
On 22-03-23, 08:10, Tom Rix wrote:
> clang with W=1 reports
> drivers/dma/tegra20-apb-dma.c:236:19: error: unused function
>   'tdma_read' [-Werror,-Wunused-function]
> static inline u32 tdma_read(struct tegra_dma *tdma, u32 reg)
>                   ^
> This function is not used so remove it.

Applied, thanks
  

Patch

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index eaafcbe4ca94..cc6b91f48979 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -233,11 +233,6 @@  static inline void tdma_write(struct tegra_dma *tdma, u32 reg, u32 val)
 	writel(val, tdma->base_addr + reg);
 }
 
-static inline u32 tdma_read(struct tegra_dma *tdma, u32 reg)
-{
-	return readl(tdma->base_addr + reg);
-}
-
 static inline void tdc_write(struct tegra_dma_channel *tdc,
 			     u32 reg, u32 val)
 {