diff mbox series

[v3] PCI: Remove functions not called in include/linux/pci.h

Message ID 20190715203416.37547-1-skunberg.kelsey@gmail.com (mailing list archive)
State Mainlined, archived
Commit 4f77e0956bd99901af2bfc6641437ff8bff8d4a4
Headers show
Series [v3] PCI: Remove functions not called in include/linux/pci.h | expand

Commit Message

Kelsey July 15, 2019, 8:34 p.m. UTC
Remove the following uncalled functions from include/linux/pci.h:

        pci_block_cfg_access()
        pci_block_cfg_access_in_atomic()
        pci_unblock_cfg_access()

Functions were added in commit fb51ccbf217c ("PCI: Rework config space
blocking services"), though no callers were added. Code continues to be
unused and should be removed.

Signed-off-by: Kelsey Skunberg <skunberg.kelsey@gmail.com>
---

Changes since v1:
  - Fixed Signed-off-by line to show full name

Changes since v2:
  - Change commit message to reference prior commit properly with the
    following format:
	commit <12-character sha prefix> ("<commit message>")

 include/linux/pci.h | 5 -----
 1 file changed, 5 deletions(-)

Comments

Lukas Bulwahn July 16, 2019, 4:58 a.m. UTC | #1
On Mon, 15 Jul 2019, Kelsey Skunberg wrote:

> Remove the following uncalled functions from include/linux/pci.h:
> 
>         pci_block_cfg_access()
>         pci_block_cfg_access_in_atomic()
>         pci_unblock_cfg_access()
> 
> Functions were added in commit fb51ccbf217c ("PCI: Rework config space
> blocking services"), though no callers were added. Code continues to be
> unused and should be removed.
> 
> Signed-off-by: Kelsey Skunberg <skunberg.kelsey@gmail.com>
> ---
> 
> Changes since v1:
>   - Fixed Signed-off-by line to show full name
> 
> Changes since v2:
>   - Change commit message to reference prior commit properly with the
>     following format:
> 	commit <12-character sha prefix> ("<commit message>")
> 
>  include/linux/pci.h | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index cf380544c700..3c9ba6133bea 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -1656,11 +1656,6 @@ static inline void pci_release_regions(struct pci_dev *dev) { }
>  
>  static inline unsigned long pci_address_to_pio(phys_addr_t addr) { return -1; }
>  
> -static inline void pci_block_cfg_access(struct pci_dev *dev) { }
> -static inline int pci_block_cfg_access_in_atomic(struct pci_dev *dev)
> -{ return 0; }
> -static inline void pci_unblock_cfg_access(struct pci_dev *dev) { }
> -
>  static inline struct pci_bus *pci_find_next_bus(const struct pci_bus *from)
>  { return NULL; }
>  static inline struct pci_dev *pci_get_slot(struct pci_bus *bus,
> -- 
> 2.20.1

I just checked with elixir on v5.2 that all three identifiers are never 
referenced beyond its definition in pci.h:

https://elixir.bootlin.com/linux/v5.2/ident/pci_block_cfg_access
https://elixir.bootlin.com/linux/v5.2/ident/pci_block_cfg_access_in_atomic
https://elixir.bootlin.com/linux/v5.2/ident/pci_unblock_cfg_access

So, what it is worth:

Reviewed-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>

Lukas

> 
> _______________________________________________
> Linux-kernel-mentees mailing list
> Linux-kernel-mentees@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
>
Bjorn Helgaas July 23, 2019, 11:34 p.m. UTC | #2
On Mon, Jul 15, 2019 at 02:34:16PM -0600, Kelsey Skunberg wrote:
> Remove the following uncalled functions from include/linux/pci.h:
> 
>         pci_block_cfg_access()
>         pci_block_cfg_access_in_atomic()
>         pci_unblock_cfg_access()
> 
> Functions were added in commit fb51ccbf217c ("PCI: Rework config space
> blocking services"), though no callers were added. Code continues to be
> unused and should be removed.
> 
> Signed-off-by: Kelsey Skunberg <skunberg.kelsey@gmail.com>

Applied with Lukas' reviewed-by (thank you!) to pci/hide for v5.4,
thanks!

> ---
> 
> Changes since v1:
>   - Fixed Signed-off-by line to show full name
> 
> Changes since v2:
>   - Change commit message to reference prior commit properly with the
>     following format:
> 	commit <12-character sha prefix> ("<commit message>")
> 
>  include/linux/pci.h | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index cf380544c700..3c9ba6133bea 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -1656,11 +1656,6 @@ static inline void pci_release_regions(struct pci_dev *dev) { }
>  
>  static inline unsigned long pci_address_to_pio(phys_addr_t addr) { return -1; }
>  
> -static inline void pci_block_cfg_access(struct pci_dev *dev) { }
> -static inline int pci_block_cfg_access_in_atomic(struct pci_dev *dev)
> -{ return 0; }
> -static inline void pci_unblock_cfg_access(struct pci_dev *dev) { }
> -
>  static inline struct pci_bus *pci_find_next_bus(const struct pci_bus *from)
>  { return NULL; }
>  static inline struct pci_dev *pci_get_slot(struct pci_bus *bus,
> -- 
> 2.20.1
> 
> _______________________________________________
> Linux-kernel-mentees mailing list
> Linux-kernel-mentees@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
diff mbox series

Patch

diff --git a/include/linux/pci.h b/include/linux/pci.h
index cf380544c700..3c9ba6133bea 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1656,11 +1656,6 @@  static inline void pci_release_regions(struct pci_dev *dev) { }
 
 static inline unsigned long pci_address_to_pio(phys_addr_t addr) { return -1; }
 
-static inline void pci_block_cfg_access(struct pci_dev *dev) { }
-static inline int pci_block_cfg_access_in_atomic(struct pci_dev *dev)
-{ return 0; }
-static inline void pci_unblock_cfg_access(struct pci_dev *dev) { }
-
 static inline struct pci_bus *pci_find_next_bus(const struct pci_bus *from)
 { return NULL; }
 static inline struct pci_dev *pci_get_slot(struct pci_bus *bus,