Skip to contentSkip to conversation

ath10k: remove unused ath10k_get_ring_byte function

PATCH In review Tom Rix 3 participants 5 messages Mar 22, 2023 – Mar 24, 2023

Subsystems (3)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 ath10k: remove unused ath10k_get_ring_byte function

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.

---
 drivers/net/wireless/ath/ath10k/ce.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/net/wireless/ath/ath10k/ce.c +0 -7
index b656cfc03648..c27b8204718a 100644
@@ -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);
Signature · 1 line
2.27.0
#1 lore raw
Quoted 8 lines · 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.

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?

Quoted 25 lines
---
 drivers/net/wireless/ath/ath10k/ce.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/net/wireless/ath/ath10k/ce.c +0 -7
index b656cfc03648..c27b8204718a 100644
@@ -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);
Signature · 1 line
2.27.0
author
#2 lore raw
Quoted 14 lines · Simon Horman
Quoted 8 lines · 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.

Hi Tom,

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

Quoted 7 lines

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

Quoted 26 lines
Quoted 26 lines
---
  drivers/net/wireless/ath/ath10k/ce.c | 7 -------
  1 file changed, 7 deletions(-)
drivers/net/wireless/ath/ath10k/ce.c +0 -7
index b656cfc03648..c27b8204718a 100644
@@ -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);
Signature · 1 line
2.27.0
Reviewed-by
#3 lore raw
Quoted 24 lines · Tom Rix
Quoted 14 lines · Simon Horman
Quoted 8 lines · 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.

Hi Tom,

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

Quoted 7 lines

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?

Quoted 4 lines

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).

#4 lore raw
In reply to Tom Rix
Quoted 10 lines · 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.

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

9fc093b756f6 wifi: ath10k: remove unused ath10k_get_ring_byte function

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

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