Skip to contentSkip to conversation

misc: pci_endpoint_test: Remove some unused functions

PATCH Applied Jiapeng Chong 4 participants 7 messages Jul 4, 2024 – Jul 6, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 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'.

---
Changes in v2:
-Modify the branch name in the topic.

 drivers/misc/pci_endpoint_test.c | 12 ------------
 1 file changed, 12 deletions(-)
drivers/misc/pci_endpoint_test.c +0 -12
index edced893221e..3aaaf47fa4ee 100644
@@ -144,18 +144,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'.

Have you see my question to the first version of this patch?

Krzysztof

maintainer
#2 lore raw
Quoted 9 lines · Krzysztof Wilczyński

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

Have you see my question to the first version of this patch?

Yeah, I don't understand this at all, how is this patch even building?

What tree/branch is it made against?

thanks,

greg k-h

#3 lore raw
Quoted 11 lines · Greg KH
Quoted 9 lines · Krzysztof Wilczyński

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

Have you see my question to the first version of this patch?

Quoted 7 lines

Yeah, I don't understand this at all, how is this patch even building?

What tree/branch is it made against?

thanks,

greg k-h

Hi,
I can confirm in linux-next tag next-20240703 the functions are indeed removed. See commit 0ace3d3b70ed6a474d52fc44ee9b0b1f16ca3724
misc: pci_endpoint_test: Use memcpy_toio()/memcpy_fromio() for BAR tests

Regards,
Rick

#4 lore raw
In reply to Krzysztof Wilczyński
Quoted 11 lines · Krzysztof Wilczyński

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

Have you see my question to the first version of this patch?

Krzysztof

Hello,
The functions were removed in this patch : https://lore.kernel.org/linux-pci/[email protected]/
So in linux-next they are indeed not used anymore.

You applied it to misc : https://lore.kernel.org/linux-pci/20240517100929.GB202520@rocinante/

Regards,
Rick

#5 lore raw

Hello,

Quoted 7 lines
Quoted 7 lines
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'.

Have you see my question to the first version of this patch?

[...]

Quoted 4 lines

The functions were removed in this patch : https://lore.kernel.org/linux-pci/[email protected]/
So in linux-next they are indeed not used anymore.

You applied it to misc : https://lore.kernel.org/linux-pci/20240517100929.GB202520@rocinante/

Ahh, it was sometime in May... I assumed we already got this into the mainline, hence my confusion. Hard to remember what went out when.

Also, I looked only at our head branch first, as I always do, before I noticed the updated tag.

Thank you for getting back to me. Appreciated.

I will get this applied against our pending "misc" branch, should sort out the warnings on next.

Krzysztof

#6 lore raw
In reply to Jiapeng Chong

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

Applied to misc, thank you!

[1/1] misc: pci_endpoint_test: Remove unused pci_endpoint_test_bar_{readl,writel} functions

      https://git.kernel.org/pci/pci/c/c22359447a19

	Krzysztof