All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch: mips: pci: pci-ip27.c:  Remove unused function
@ 2015-01-01 15:32 Rickard Strandqvist
  2015-01-01 16:16   ` Paul Gortmaker
  0 siblings, 1 reply; 3+ messages in thread
From: Rickard Strandqvist @ 2015-01-01 15:32 UTC (permalink / raw)
  To: Ralf Baechle, Paul Gortmaker
  Cc: Rickard Strandqvist, John Crispin, linux-mips, linux-kernel

Remove the function pci_enable_swapping() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 arch/mips/pci/pci-ip27.c |   11 -----------
 1 file changed, 11 deletions(-)

diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c
index 0f09eaf..55e3332 100644
--- a/arch/mips/pci/pci-ip27.c
+++ b/arch/mips/pci/pci-ip27.c
@@ -200,17 +200,6 @@ static inline void pci_disable_swapping(struct pci_dev *dev)
 	bridge->b_widget.w_tflush;	/* Flush */
 }
 
-static inline void pci_enable_swapping(struct pci_dev *dev)
-{
-	struct bridge_controller *bc = BRIDGE_CONTROLLER(dev->bus);
-	bridge_t *bridge = bc->base;
-	int slot = PCI_SLOT(dev->devfn);
-
-	/* Turn on byte swapping */
-	bridge->b_device[slot].reg |= BRIDGE_DEV_SWAP_DIR;
-	bridge->b_widget.w_tflush;	/* Flush */
-}
-
 static void pci_fixup_ioc3(struct pci_dev *d)
 {
 	pci_disable_swapping(d);
-- 
1.7.10.4

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

* Re: [PATCH] arch: mips: pci: pci-ip27.c:  Remove unused function
@ 2015-01-01 16:16   ` Paul Gortmaker
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Gortmaker @ 2015-01-01 16:16 UTC (permalink / raw)
  To: Rickard Strandqvist; +Cc: Ralf Baechle, John Crispin, linux-mips, linux-kernel

[[PATCH] arch: mips: pci: pci-ip27.c:  Remove unused function] On 01/01/2015 (Thu 16:32) Rickard Strandqvist wrote:

> Remove the function pci_enable_swapping() that is not used anywhere.

A quick search shows it has been orphanware since the git epoch (~2005)
so removing it should be fine AFAICT.

P.
--

> 
> This was partially found by using a static code analysis program called cppcheck.
> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
>  arch/mips/pci/pci-ip27.c |   11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c
> index 0f09eaf..55e3332 100644
> --- a/arch/mips/pci/pci-ip27.c
> +++ b/arch/mips/pci/pci-ip27.c
> @@ -200,17 +200,6 @@ static inline void pci_disable_swapping(struct pci_dev *dev)
>  	bridge->b_widget.w_tflush;	/* Flush */
>  }
>  
> -static inline void pci_enable_swapping(struct pci_dev *dev)
> -{
> -	struct bridge_controller *bc = BRIDGE_CONTROLLER(dev->bus);
> -	bridge_t *bridge = bc->base;
> -	int slot = PCI_SLOT(dev->devfn);
> -
> -	/* Turn on byte swapping */
> -	bridge->b_device[slot].reg |= BRIDGE_DEV_SWAP_DIR;
> -	bridge->b_widget.w_tflush;	/* Flush */
> -}
> -
>  static void pci_fixup_ioc3(struct pci_dev *d)
>  {
>  	pci_disable_swapping(d);
> -- 
> 1.7.10.4
> 

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

* Re: [PATCH] arch: mips: pci: pci-ip27.c:  Remove unused function
@ 2015-01-01 16:16   ` Paul Gortmaker
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Gortmaker @ 2015-01-01 16:16 UTC (permalink / raw)
  To: Rickard Strandqvist; +Cc: Ralf Baechle, John Crispin, linux-mips, linux-kernel

[[PATCH] arch: mips: pci: pci-ip27.c:  Remove unused function] On 01/01/2015 (Thu 16:32) Rickard Strandqvist wrote:

> Remove the function pci_enable_swapping() that is not used anywhere.

A quick search shows it has been orphanware since the git epoch (~2005)
so removing it should be fine AFAICT.

P.
--

> 
> This was partially found by using a static code analysis program called cppcheck.
> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
>  arch/mips/pci/pci-ip27.c |   11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c
> index 0f09eaf..55e3332 100644
> --- a/arch/mips/pci/pci-ip27.c
> +++ b/arch/mips/pci/pci-ip27.c
> @@ -200,17 +200,6 @@ static inline void pci_disable_swapping(struct pci_dev *dev)
>  	bridge->b_widget.w_tflush;	/* Flush */
>  }
>  
> -static inline void pci_enable_swapping(struct pci_dev *dev)
> -{
> -	struct bridge_controller *bc = BRIDGE_CONTROLLER(dev->bus);
> -	bridge_t *bridge = bc->base;
> -	int slot = PCI_SLOT(dev->devfn);
> -
> -	/* Turn on byte swapping */
> -	bridge->b_device[slot].reg |= BRIDGE_DEV_SWAP_DIR;
> -	bridge->b_widget.w_tflush;	/* Flush */
> -}
> -
>  static void pci_fixup_ioc3(struct pci_dev *d)
>  {
>  	pci_disable_swapping(d);
> -- 
> 1.7.10.4
> 

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

end of thread, other threads:[~2015-01-01 16:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-01 15:32 [PATCH] arch: mips: pci: pci-ip27.c: Remove unused function Rickard Strandqvist
2015-01-01 16:16 ` Paul Gortmaker
2015-01-01 16:16   ` Paul Gortmaker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.