Skip to contentSkip to conversation

PCI: shpchp: remove unused function

PATCH Applied Jiapeng Chong 3 participants 3 messages Apr 15, 2021 – Apr 16, 2021 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: shpchp: remove unused function

Fix the following clang warning:

drivers/pci/hotplug/shpchp_hpc.c:177:20: warning: unused function 'shpc_writeb' [-Wunused-function].

---
 drivers/pci/hotplug/shpchp_hpc.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/pci/hotplug/shpchp_hpc.c +0 -5
index db04728..9e3b277 100644
@@ -174,11 +174,6 @@ static inline u8 shpc_readb(struct controller *ctrl, int reg)
 	return readb(ctrl->creg + reg);
 }
 
-static inline void shpc_writeb(struct controller *ctrl, int reg, u8 val)
-{
-	writeb(val, ctrl->creg + reg);
-}
-
 static inline u16 shpc_readw(struct controller *ctrl, int reg)
 {
 	return readw(ctrl->creg + reg);
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 4 lines

Fix the following clang warning:

drivers/pci/hotplug/shpchp_hpc.c:177:20: warning: unused function 'shpc_writeb' [-Wunused-function].

[...]

Nice catch! Thank you.

By the way, next time capitalise the subject line.

Krzysztof

#2 lore raw
In reply to Jiapeng Chong
Quoted 7 lines · Jiapeng Chong

Fix the following clang warning:

drivers/pci/hotplug/shpchp_hpc.c:177:20: warning: unused function 'shpc_writeb' [-Wunused-function].

Applied to pci/hotplug for v5.13 with the following subject, thanks!

PCI: shpchp: Remove unused shpc_writeb()

Quoted 23 lines
---
 drivers/pci/hotplug/shpchp_hpc.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/pci/hotplug/shpchp_hpc.c +0 -5
index db04728..9e3b277 100644
@@ -174,11 +174,6 @@ static inline u8 shpc_readb(struct controller *ctrl, int reg)
 	return readb(ctrl->creg + reg);
 }
 
-static inline void shpc_writeb(struct controller *ctrl, int reg, u8 val)
-{
-	writeb(val, ctrl->creg + reg);
-}
-
 static inline u16 shpc_readw(struct controller *ctrl, int reg)
 {
 	return readw(ctrl->creg + reg);
Signature · 1 line
1.8.3.1