Skip to contentSkip to conversation

misc: pci_endpoint_test: Remove some unused functions

PATCH Superseded Jiapeng Chong 2 participants 2 messages May 16, 2024 – Jul 1, 2024

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc: pci_endpoint_test: Remove some unused functions

These functions are defined in the pci_endpoint_test.c file, but not called elsewhere, so delete these unused functions.

drivers/misc/pci_endpoint_test.c:144:19: warning: unused function 'pci_endpoint_test_bar_readl'. drivers/misc/pci_endpoint_test.c:150:20: warning: unused function 'pci_endpoint_test_bar_writel'.

---
 drivers/misc/pci_endpoint_test.c | 12 ------------
 1 file changed, 12 deletions(-)
drivers/misc/pci_endpoint_test.c +0 -12
index 4f3ec1f2ba9f..5d98b82da17a 100644
@@ -141,18 +141,6 @@ static inline void pci_endpoint_test_writel(struct pci_endpoint_test *test,
 	writel(value, test->base + offset);
 }
 
-static inline u32 pci_endpoint_test_bar_readl(struct pci_endpoint_test *test,
-					      int bar, int offset)
-{
-	return readl(test->bar[bar] + offset);
-}
-
-static inline void pci_endpoint_test_bar_writel(struct pci_endpoint_test *test,
-						int bar, u32 offset, u32 value)
-{
-	writel(value, test->bar[bar] + offset);
-}
-
 static irqreturn_t pci_endpoint_test_irqhandler(int irq, void *dev_id)
 {
 	struct pci_endpoint_test *test = dev_id;
Signature · 1 line
2.20.1.7.g153144c
#1 lore raw

Hello,

Quoted 5 lines

These functions are defined in the pci_endpoint_test.c file, but not called elsewhere, so delete these unused functions.

drivers/misc/pci_endpoint_test.c:144:19: warning: unused function 'pci_endpoint_test_bar_readl'. drivers/misc/pci_endpoint_test.c:150:20: warning: unused function 'pci_endpoint_test_bar_writel'.

Are you sure these aren't used?

Index File Line Content
0 drivers/misc/pci_endpoint_test.c 143 static inline u32 pci_endpoint_test_bar_readl(struct pci_endpoint_test *test, 1 drivers/misc/pci_endpoint_test.c 296 val = pci_endpoint_test_bar_readl(test, barno, j);

Index File Line Content
0 drivers/misc/pci_endpoint_test.c 149 static inline void pci_endpoint_test_bar_writel(struct pci_endpoint_test *test, 1 drivers/misc/pci_endpoint_test.c 292 pci_endpoint_test_bar_writel(test, barno, j,

Krzysztof