public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next v2] misc: pci_endpoint_test: Remove some unused functions
@ 2024-07-04  2:32 Jiapeng Chong
  2024-07-04  7:14 ` Krzysztof Wilczyński
  2024-07-06  3:18 ` Krzysztof Wilczyński
  0 siblings, 2 replies; 7+ messages in thread
From: Jiapeng Chong @ 2024-07-04  2:32 UTC (permalink / raw)
  To: manivannan.sadhasivam
  Cc: kw, kishon, arnd, gregkh, linux-pci, linux-kernel, Jiapeng Chong,
	Abaci Robot

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

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9064
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
Changes in v2:
  -Modify the branch name in the topic. 

 drivers/misc/pci_endpoint_test.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c
index edced893221e..3aaaf47fa4ee 100644
--- a/drivers/misc/pci_endpoint_test.c
+++ b/drivers/misc/pci_endpoint_test.c
@@ -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;
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH -next v2] misc: pci_endpoint_test: Remove some unused functions
  2024-07-04  2:32 [PATCH -next v2] misc: pci_endpoint_test: Remove some unused functions Jiapeng Chong
@ 2024-07-04  7:14 ` Krzysztof Wilczyński
  2024-07-04 12:58   ` Greg KH
  2024-07-04 13:49   ` Rick Wertenbroek
  2024-07-06  3:18 ` Krzysztof Wilczyński
  1 sibling, 2 replies; 7+ messages in thread
From: Krzysztof Wilczyński @ 2024-07-04  7:14 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: manivannan.sadhasivam, kishon, arnd, gregkh, linux-pci,
	linux-kernel, Abaci Robot

Hello,

> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH -next v2] misc: pci_endpoint_test: Remove some unused functions
  2024-07-04  7:14 ` Krzysztof Wilczyński
@ 2024-07-04 12:58   ` Greg KH
  2024-07-04 14:00     ` Rick Wertenbroek
  2024-07-04 13:49   ` Rick Wertenbroek
  1 sibling, 1 reply; 7+ messages in thread
From: Greg KH @ 2024-07-04 12:58 UTC (permalink / raw)
  To: Krzysztof Wilczyński
  Cc: Jiapeng Chong, manivannan.sadhasivam, kishon, arnd, linux-pci,
	linux-kernel, Abaci Robot

On Thu, Jul 04, 2024 at 04:14:06PM +0900, Krzysztof Wilczyński wrote:
> Hello,
> 
> > 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: [PATCH -next v2] misc: pci_endpoint_test: Remove some unused functions
  2024-07-04  7:14 ` Krzysztof Wilczyński
  2024-07-04 12:58   ` Greg KH
@ 2024-07-04 13:49   ` Rick Wertenbroek
  2024-07-04 14:22     ` Krzysztof Wilczyński
  1 sibling, 1 reply; 7+ messages in thread
From: Rick Wertenbroek @ 2024-07-04 13:49 UTC (permalink / raw)
  To: kw
  Cc: abaci, arnd, gregkh, jiapeng.chong, kishon, linux-kernel,
	linux-pci, manivannan.sadhasivam, Rick Wertenbroek

On Thu, Jul 04, 2024 at 04:14:06PM +0900, Krzysztof Wilczyński wrote:
> Hello,
> 
> > 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/20240322164139.678228-1-cassel@kernel.org/
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: [PATCH -next v2] misc: pci_endpoint_test: Remove some unused functions
  2024-07-04 12:58   ` Greg KH
@ 2024-07-04 14:00     ` Rick Wertenbroek
  0 siblings, 0 replies; 7+ messages in thread
From: Rick Wertenbroek @ 2024-07-04 14:00 UTC (permalink / raw)
  To: gregkh
  Cc: abaci, arnd, jiapeng.chong, kishon, kw, linux-kernel, linux-pci,
	manivannan.sadhasivam, Rick Wertenbroek

On Thu, Jul 04, 2024 at 02:58:10PM +0200, Greg KH wrote:
> On Thu, Jul 04, 2024 at 04:14:06PM +0900, Krzysztof Wilczyński wrote:
> > Hello,
> >
> > > 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

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: [PATCH -next v2] misc: pci_endpoint_test: Remove some unused functions
  2024-07-04 13:49   ` Rick Wertenbroek
@ 2024-07-04 14:22     ` Krzysztof Wilczyński
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Wilczyński @ 2024-07-04 14:22 UTC (permalink / raw)
  To: Rick Wertenbroek
  Cc: abaci, arnd, gregkh, jiapeng.chong, kishon, linux-kernel,
	linux-pci, manivannan.sadhasivam

Hello,

> > > 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?
[...]
> The functions were removed in this patch : https://lore.kernel.org/linux-pci/20240322164139.678228-1-cassel@kernel.org/
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH -next v2] misc: pci_endpoint_test: Remove some unused functions
  2024-07-04  2:32 [PATCH -next v2] misc: pci_endpoint_test: Remove some unused functions Jiapeng Chong
  2024-07-04  7:14 ` Krzysztof Wilczyński
@ 2024-07-06  3:18 ` Krzysztof Wilczyński
  1 sibling, 0 replies; 7+ messages in thread
From: Krzysztof Wilczyński @ 2024-07-06  3:18 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: manivannan.sadhasivam, kishon, arnd, gregkh, linux-pci,
	linux-kernel, Abaci Robot

Hello,

> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-07-06  3:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-04  2:32 [PATCH -next v2] misc: pci_endpoint_test: Remove some unused functions Jiapeng Chong
2024-07-04  7:14 ` Krzysztof Wilczyński
2024-07-04 12:58   ` Greg KH
2024-07-04 14:00     ` Rick Wertenbroek
2024-07-04 13:49   ` Rick Wertenbroek
2024-07-04 14:22     ` Krzysztof Wilczyński
2024-07-06  3:18 ` Krzysztof Wilczyński

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox