comedi: remove unused dma_chain_flag_bits function

Message ID 20230321121410.1782901-1-trix@redhat.com
State New
Headers
Series comedi: remove unused dma_chain_flag_bits function |

Commit Message

Tom Rix March 21, 2023, 12:14 p.m. UTC
  clang with W=1 reports
drivers/comedi/drivers/cb_pcidas64.c:377:28: error: unused function
  'dma_chain_flag_bits' [-Werror,-Wunused-function]
static inline unsigned int dma_chain_flag_bits(u16 prepost_bits)
                           ^
This function is not used, so remove it.

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

Comments

Ian Abbott March 21, 2023, 2:18 p.m. UTC | #1
On 21/03/2023 12:14, Tom Rix wrote:
> clang with W=1 reports
> drivers/comedi/drivers/cb_pcidas64.c:377:28: error: unused function
>    'dma_chain_flag_bits' [-Werror,-Wunused-function]
> static inline unsigned int dma_chain_flag_bits(u16 prepost_bits)
>                             ^
> This function is not used, so remove it.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>   drivers/comedi/drivers/cb_pcidas64.c | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/comedi/drivers/cb_pcidas64.c b/drivers/comedi/drivers/cb_pcidas64.c
> index ca6038a25f26..59390b23fa81 100644
> --- a/drivers/comedi/drivers/cb_pcidas64.c
> +++ b/drivers/comedi/drivers/cb_pcidas64.c
> @@ -374,11 +374,6 @@ static inline u16 pipe_full_bits(u16 hw_status_bits)
>   	return (hw_status_bits >> 10) & 0x3;
>   };
>   
> -static inline unsigned int dma_chain_flag_bits(u16 prepost_bits)
> -{
> -	return (prepost_bits >> 6) & 0x3;
> -}
> -
>   static inline unsigned int adc_upper_read_ptr_code(u16 prepost_bits)
>   {
>   	return (prepost_bits >> 12) & 0x3;

Looks OK, thanks!

Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
  

Patch

diff --git a/drivers/comedi/drivers/cb_pcidas64.c b/drivers/comedi/drivers/cb_pcidas64.c
index ca6038a25f26..59390b23fa81 100644
--- a/drivers/comedi/drivers/cb_pcidas64.c
+++ b/drivers/comedi/drivers/cb_pcidas64.c
@@ -374,11 +374,6 @@  static inline u16 pipe_full_bits(u16 hw_status_bits)
 	return (hw_status_bits >> 10) & 0x3;
 };
 
-static inline unsigned int dma_chain_flag_bits(u16 prepost_bits)
-{
-	return (prepost_bits >> 6) & 0x3;
-}
-
 static inline unsigned int adc_upper_read_ptr_code(u16 prepost_bits)
 {
 	return (prepost_bits >> 12) & 0x3;