Skip to contentSkip to conversation

ipw2x00: remove unused _ipw_read16 function

PATCH In review Tom Rix 2 participants 3 messages Mar 19, 2023 – Mar 31, 2023

Subsystems (3)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 ipw2x00: remove unused _ipw_read16 function

clang with W=1 reports drivers/net/wireless/intel/ipw2x00/ipw2200.c:381:19: error:
unused function '_ipw_read16' [-Werror,-Wunused-function]
static inline u16 _ipw_read16(struct ipw_priv *ipw, unsigned long ofs)

                  ^

This function and its wrapping marco are not used, so remove them.

---
 drivers/net/wireless/intel/ipw2x00/ipw2200.c | 13 -------------
 1 file changed, 13 deletions(-)
drivers/net/wireless/intel/ipw2x00/ipw2200.c +0 -13
index b91b1a2d0be7..dfe0f74369e6 100644
@@ -377,19 +377,6 @@ static inline u8 _ipw_read8(struct ipw_priv *ipw, unsigned long ofs)
 	_ipw_read8(ipw, ofs); \
 })
 
-/* 16-bit direct read (low 4K) */
-static inline u16 _ipw_read16(struct ipw_priv *ipw, unsigned long ofs)
-{
-	return readw(ipw->hw_base + ofs);
-}
-
-/* alias to 16-bit direct read (low 4K of SRAM/regs), with debug wrapper */
-#define ipw_read16(ipw, ofs) ({ \
-	IPW_DEBUG_IO("%s %d: read_direct16(0x%08X)\n", __FILE__, __LINE__, \
-			(u32)(ofs)); \
-	_ipw_read16(ipw, ofs); \
-})
-
 /* 32-bit direct read (low 4K) */
 static inline u32 _ipw_read32(struct ipw_priv *ipw, unsigned long ofs)
 {
Signature · 1 line
2.27.0
#1 lore raw
Quoted 8 lines · Tom Rix

clang with W=1 reports drivers/net/wireless/intel/ipw2x00/ipw2200.c:381:19: error:
unused function '_ipw_read16' [-Werror,-Wunused-function]
static inline u16 _ipw_read16(struct ipw_priv *ipw, unsigned long ofs)

                  ^

This function and its wrapping marco are not used, so remove them.

I'll add "wifi:" to the title.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#2 lore raw

Re: wifi: ipw2x00: remove unused _ipw_read16 function

In reply to Tom Rix
Quoted 8 lines · Tom Rix

clang with W=1 reports drivers/net/wireless/intel/ipw2x00/ipw2200.c:381:19: error:
unused function '_ipw_read16' [-Werror,-Wunused-function]
static inline u16 _ipw_read16(struct ipw_priv *ipw, unsigned long ofs)

                  ^

This function and its wrapping marco are not used, so remove them.

Patch applied to wireless-next.git, thanks.

c7e39d70613c wifi: ipw2x00: remove unused _ipw_read16 function

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

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