2023-03-21 12:15:15

by Tom Rix

[permalink] [raw]
Subject: [PATCH] comedi: remove unused dma_chain_flag_bits function

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 <[email protected]>
---
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;
--
2.27.0



2023-03-21 14:28:39

by Ian Abbott

[permalink] [raw]
Subject: Re: [PATCH] comedi: remove unused dma_chain_flag_bits function

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 <[email protected]>
> ---
> 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 <[email protected]>

--
-=( Ian Abbott <[email protected]> || MEV Ltd. is a company )=-
-=( registered in England & Wales. Regd. number: 02862268. )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || http://www.mev.co.uk )=-