netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath10k: remove unused ath10k_get_ring_byte function
@ 2023-03-22 12:28 Tom Rix
  2023-03-22 20:40 ` Simon Horman
  2023-03-24 14:53 ` Kalle Valo
  0 siblings, 2 replies; 5+ messages in thread
From: Tom Rix @ 2023-03-22 12:28 UTC (permalink / raw)
  To: kvalo, davem, edumazet, kuba, pabeni, nathan, ndesaulniers
  Cc: ath10k, linux-wireless, netdev, linux-kernel, llvm, Tom Rix

clang with W=1 reports
drivers/net/wireless/ath/ath10k/ce.c:88:1: error:
  unused function 'ath10k_get_ring_byte' [-Werror,-Wunused-function]
ath10k_get_ring_byte(unsigned int offset,
^
This function is not used so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/net/wireless/ath/ath10k/ce.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
index b656cfc03648..c27b8204718a 100644
--- a/drivers/net/wireless/ath/ath10k/ce.c
+++ b/drivers/net/wireless/ath/ath10k/ce.c
@@ -84,13 +84,6 @@ ath10k_set_ring_byte(unsigned int offset,
 	return ((offset << addr_map->lsb) & addr_map->mask);
 }
 
-static inline unsigned int
-ath10k_get_ring_byte(unsigned int offset,
-		     struct ath10k_hw_ce_regs_addr_map *addr_map)
-{
-	return ((offset & addr_map->mask) >> (addr_map->lsb));
-}
-
 static inline u32 ath10k_ce_read32(struct ath10k *ar, u32 offset)
 {
 	struct ath10k_ce *ce = ath10k_ce_priv(ar);
-- 
2.27.0


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

* Re: [PATCH] ath10k: remove unused ath10k_get_ring_byte function
  2023-03-22 12:28 [PATCH] ath10k: remove unused ath10k_get_ring_byte function Tom Rix
@ 2023-03-22 20:40 ` Simon Horman
  2023-03-23 14:18   ` Tom Rix
  2023-03-24 14:53 ` Kalle Valo
  1 sibling, 1 reply; 5+ messages in thread
From: Simon Horman @ 2023-03-22 20:40 UTC (permalink / raw)
  To: Tom Rix
  Cc: kvalo, davem, edumazet, kuba, pabeni, nathan, ndesaulniers,
	ath10k, linux-wireless, netdev, linux-kernel, llvm

On Wed, Mar 22, 2023 at 08:28:55AM -0400, Tom Rix wrote:
> clang with W=1 reports
> drivers/net/wireless/ath/ath10k/ce.c:88:1: error:
>   unused function 'ath10k_get_ring_byte' [-Werror,-Wunused-function]
> ath10k_get_ring_byte(unsigned int offset,
> ^
> This function is not used so remove it.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>

Hi Tom,

this looks good. But this patch applied, and with clang 11.0.2,
make CC=clang W=1 tells me:

drivers/net/wireless/ath/ath10k/ce.c:80:19: error: unused function 'shadow_dst_wr_ind_addr' [-Werror,-Wunused-function]
static inline u32 shadow_dst_wr_ind_addr(struct ath10k *ar,
                  ^
drivers/net/wireless/ath/ath10k/ce.c:434:20: error: unused function 'ath10k_ce_error_intr_enable' [-Werror,-Wunused-function]
static inline void ath10k_ce_error_intr_enable(struct ath10k *ar,
                   ^
Perhaps those functions should be removed too?

> ---
>  drivers/net/wireless/ath/ath10k/ce.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
> index b656cfc03648..c27b8204718a 100644
> --- a/drivers/net/wireless/ath/ath10k/ce.c
> +++ b/drivers/net/wireless/ath/ath10k/ce.c
> @@ -84,13 +84,6 @@ ath10k_set_ring_byte(unsigned int offset,
>  	return ((offset << addr_map->lsb) & addr_map->mask);
>  }
>  
> -static inline unsigned int
> -ath10k_get_ring_byte(unsigned int offset,
> -		     struct ath10k_hw_ce_regs_addr_map *addr_map)
> -{
> -	return ((offset & addr_map->mask) >> (addr_map->lsb));
> -}
> -
>  static inline u32 ath10k_ce_read32(struct ath10k *ar, u32 offset)
>  {
>  	struct ath10k_ce *ce = ath10k_ce_priv(ar);
> -- 
> 2.27.0
> 

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

* Re: [PATCH] ath10k: remove unused ath10k_get_ring_byte function
  2023-03-22 20:40 ` Simon Horman
@ 2023-03-23 14:18   ` Tom Rix
  2023-03-23 18:31     ` Simon Horman
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Rix @ 2023-03-23 14:18 UTC (permalink / raw)
  To: Simon Horman
  Cc: kvalo, davem, edumazet, kuba, pabeni, nathan, ndesaulniers,
	ath10k, linux-wireless, netdev, linux-kernel, llvm


On 3/22/23 1:40 PM, Simon Horman wrote:
> On Wed, Mar 22, 2023 at 08:28:55AM -0400, Tom Rix wrote:
>> clang with W=1 reports
>> drivers/net/wireless/ath/ath10k/ce.c:88:1: error:
>>    unused function 'ath10k_get_ring_byte' [-Werror,-Wunused-function]
>> ath10k_get_ring_byte(unsigned int offset,
>> ^
>> This function is not used so remove it.
>>
>> Signed-off-by: Tom Rix <trix@redhat.com>
> Hi Tom,
>
> this looks good. But this patch applied, and with clang 11.0.2,
> make CC=clang W=1 tells me:
>
> drivers/net/wireless/ath/ath10k/ce.c:80:19: error: unused function 'shadow_dst_wr_ind_addr' [-Werror,-Wunused-function]
> static inline u32 shadow_dst_wr_ind_addr(struct ath10k *ar,
>                    ^
> drivers/net/wireless/ath/ath10k/ce.c:434:20: error: unused function 'ath10k_ce_error_intr_enable' [-Werror,-Wunused-function]
> static inline void ath10k_ce_error_intr_enable(struct ath10k *ar,
>                     ^
> Perhaps those functions should be removed too?

I believe these were removed with

c3ab8c9a296 ("wifi: ath10k: Remove the unused function 
shadow_dst_wr_ind_addr() and ath10k_ce_error_intr_enable()")

Tom

>
>> ---
>>   drivers/net/wireless/ath/ath10k/ce.c | 7 -------
>>   1 file changed, 7 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
>> index b656cfc03648..c27b8204718a 100644
>> --- a/drivers/net/wireless/ath/ath10k/ce.c
>> +++ b/drivers/net/wireless/ath/ath10k/ce.c
>> @@ -84,13 +84,6 @@ ath10k_set_ring_byte(unsigned int offset,
>>   	return ((offset << addr_map->lsb) & addr_map->mask);
>>   }
>>   
>> -static inline unsigned int
>> -ath10k_get_ring_byte(unsigned int offset,
>> -		     struct ath10k_hw_ce_regs_addr_map *addr_map)
>> -{
>> -	return ((offset & addr_map->mask) >> (addr_map->lsb));
>> -}
>> -
>>   static inline u32 ath10k_ce_read32(struct ath10k *ar, u32 offset)
>>   {
>>   	struct ath10k_ce *ce = ath10k_ce_priv(ar);
>> -- 
>> 2.27.0
>>


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

* Re: [PATCH] ath10k: remove unused ath10k_get_ring_byte function
  2023-03-23 14:18   ` Tom Rix
@ 2023-03-23 18:31     ` Simon Horman
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2023-03-23 18:31 UTC (permalink / raw)
  To: Tom Rix
  Cc: kvalo, davem, edumazet, kuba, pabeni, nathan, ndesaulniers,
	ath10k, linux-wireless, netdev, linux-kernel, llvm

On Thu, Mar 23, 2023 at 07:18:09AM -0700, Tom Rix wrote:
> 
> On 3/22/23 1:40 PM, Simon Horman wrote:
> > On Wed, Mar 22, 2023 at 08:28:55AM -0400, Tom Rix wrote:
> > > clang with W=1 reports
> > > drivers/net/wireless/ath/ath10k/ce.c:88:1: error:
> > >    unused function 'ath10k_get_ring_byte' [-Werror,-Wunused-function]
> > > ath10k_get_ring_byte(unsigned int offset,
> > > ^
> > > This function is not used so remove it.
> > > 
> > > Signed-off-by: Tom Rix <trix@redhat.com>
> > Hi Tom,
> > 
> > this looks good. But this patch applied, and with clang 11.0.2,
> > make CC=clang W=1 tells me:
> > 
> > drivers/net/wireless/ath/ath10k/ce.c:80:19: error: unused function 'shadow_dst_wr_ind_addr' [-Werror,-Wunused-function]
> > static inline u32 shadow_dst_wr_ind_addr(struct ath10k *ar,
> >                    ^
> > drivers/net/wireless/ath/ath10k/ce.c:434:20: error: unused function 'ath10k_ce_error_intr_enable' [-Werror,-Wunused-function]
> > static inline void ath10k_ce_error_intr_enable(struct ath10k *ar,
> >                     ^
> > Perhaps those functions should be removed too?
> 
> I believe these were removed with
> 
> c3ab8c9a296 ("wifi: ath10k: Remove the unused function
> shadow_dst_wr_ind_addr() and ath10k_ce_error_intr_enable()")

Sorry, my bad. You are correct.
Patch looks good to me (now).

Reviewed-by: Simon Horman <simon.horman@corigine.com>


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

* Re: [PATCH] ath10k: remove unused ath10k_get_ring_byte function
  2023-03-22 12:28 [PATCH] ath10k: remove unused ath10k_get_ring_byte function Tom Rix
  2023-03-22 20:40 ` Simon Horman
@ 2023-03-24 14:53 ` Kalle Valo
  1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2023-03-24 14:53 UTC (permalink / raw)
  To: Tom Rix
  Cc: davem, edumazet, kuba, pabeni, nathan, ndesaulniers, ath10k,
	linux-wireless, netdev, linux-kernel, llvm, Tom Rix

Tom Rix <trix@redhat.com> wrote:

> clang with W=1 reports:
> 
> drivers/net/wireless/ath/ath10k/ce.c:88:1: error:
>   unused function 'ath10k_get_ring_byte' [-Werror,-Wunused-function]
> ath10k_get_ring_byte(unsigned int offset,
> ^
> This function is not used so remove it.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

9fc093b756f6 wifi: ath10k: remove unused ath10k_get_ring_byte function

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20230322122855.2570417-1-trix@redhat.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

end of thread, other threads:[~2023-03-24 14:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-22 12:28 [PATCH] ath10k: remove unused ath10k_get_ring_byte function Tom Rix
2023-03-22 20:40 ` Simon Horman
2023-03-23 14:18   ` Tom Rix
2023-03-23 18:31     ` Simon Horman
2023-03-24 14:53 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).