linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: shpchp: remove unused function
@ 2021-04-15  8:30 Jiapeng Chong
  2021-04-15 13:33 ` Krzysztof Wilczyński
  2021-04-16 16:23 ` Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Jiapeng Chong @ 2021-04-15  8:30 UTC (permalink / raw)
  To: bhelgaas; +Cc: linux-pci, linux-kernel, Jiapeng Chong

Fix the following clang warning:

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

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/pci/hotplug/shpchp_hpc.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c
index db04728..9e3b277 100644
--- a/drivers/pci/hotplug/shpchp_hpc.c
+++ b/drivers/pci/hotplug/shpchp_hpc.c
@@ -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);
-- 
1.8.3.1


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

* Re: [PATCH] PCI: shpchp: remove unused function
  2021-04-15  8:30 [PATCH] PCI: shpchp: remove unused function Jiapeng Chong
@ 2021-04-15 13:33 ` Krzysztof Wilczyński
  2021-04-16 16:23 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Wilczyński @ 2021-04-15 13:33 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: bhelgaas, linux-pci, linux-kernel

Hi,

> Fix the following clang warning:
> 
> drivers/pci/hotplug/shpchp_hpc.c:177:20: warning: unused function
> 'shpc_writeb' [-Wunused-function].
[...]

Nice catch!  Thank you.

Reviewed-by: Krzysztof Wilczyński <kw@linux.com>

By the way, next time capitalise the subject line.

Krzysztof

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

* Re: [PATCH] PCI: shpchp: remove unused function
  2021-04-15  8:30 [PATCH] PCI: shpchp: remove unused function Jiapeng Chong
  2021-04-15 13:33 ` Krzysztof Wilczyński
@ 2021-04-16 16:23 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2021-04-16 16:23 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: bhelgaas, linux-pci, linux-kernel

On Thu, Apr 15, 2021 at 04:30:22PM +0800, Jiapeng Chong wrote:
> Fix the following clang warning:
> 
> drivers/pci/hotplug/shpchp_hpc.c:177:20: warning: unused function
> 'shpc_writeb' [-Wunused-function].
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

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

  PCI: shpchp: Remove unused shpc_writeb()

> ---
>  drivers/pci/hotplug/shpchp_hpc.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c
> index db04728..9e3b277 100644
> --- a/drivers/pci/hotplug/shpchp_hpc.c
> +++ b/drivers/pci/hotplug/shpchp_hpc.c
> @@ -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);
> -- 
> 1.8.3.1
> 

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

end of thread, other threads:[~2021-04-16 16:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15  8:30 [PATCH] PCI: shpchp: remove unused function Jiapeng Chong
2021-04-15 13:33 ` Krzysztof Wilczyński
2021-04-16 16:23 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).