2021-02-16 02:43:06

by Chen Lin

[permalink] [raw]
Subject: [PATCH] PCI: hotplug: Remove unused function pointer typedef acpiphp_callback

From: Chen Lin <[email protected]>

Remove the 'acpiphp_callback' typedef as it is not used.

Signed-off-by: Chen Lin <[email protected]>
---
drivers/pci/hotplug/acpiphp.h | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h
index a2094c0..a74b274 100644
--- a/drivers/pci/hotplug/acpiphp.h
+++ b/drivers/pci/hotplug/acpiphp.h
@@ -176,9 +176,6 @@ struct acpiphp_attention_info
int acpiphp_register_hotplug_slot(struct acpiphp_slot *slot, unsigned int sun);
void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *slot);

-/* acpiphp_glue.c */
-typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data);
-
int acpiphp_enable_slot(struct acpiphp_slot *slot);
int acpiphp_disable_slot(struct acpiphp_slot *slot);
u8 acpiphp_get_power_status(struct acpiphp_slot *slot);
--
1.7.9.5



2021-02-16 03:02:39

by Krzysztof Wilczyński

[permalink] [raw]
Subject: Re: [PATCH] PCI: hotplug: Remove unused function pointer typedef acpiphp_callback

Hi Chen,

> Remove the 'acpiphp_callback' typedef as it is not used.
[...]

Good catch!

This typedef was initially added in 2005, and then it stopped being used
around the Kernel version 3.7 release, which is also when the sole user
of this typedef called acpiphp_for_each_slot() has also been retired.

Reviewed-by: Krzysztof Wilczyński <[email protected]>

Krzysztof

2021-02-16 14:43:12

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH] PCI: hotplug: Remove unused function pointer typedef acpiphp_callback

On Tue, Feb 16, 2021 at 3:40 AM Chen Lin <[email protected]> wrote:
>
> From: Chen Lin <[email protected]>
>
> Remove the 'acpiphp_callback' typedef as it is not used.
>
> Signed-off-by: Chen Lin <[email protected]>

Reviewed-by: Rafael J. Wysocki <[email protected]>

> ---
> drivers/pci/hotplug/acpiphp.h | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h
> index a2094c0..a74b274 100644
> --- a/drivers/pci/hotplug/acpiphp.h
> +++ b/drivers/pci/hotplug/acpiphp.h
> @@ -176,9 +176,6 @@ struct acpiphp_attention_info
> int acpiphp_register_hotplug_slot(struct acpiphp_slot *slot, unsigned int sun);
> void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *slot);
>
> -/* acpiphp_glue.c */
> -typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data);
> -
> int acpiphp_enable_slot(struct acpiphp_slot *slot);
> int acpiphp_disable_slot(struct acpiphp_slot *slot);
> u8 acpiphp_get_power_status(struct acpiphp_slot *slot);
> --
> 1.7.9.5
>
>

2021-02-18 23:36:58

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [PATCH] PCI: hotplug: Remove unused function pointer typedef acpiphp_callback

On Tue, Feb 16, 2021 at 10:38:40AM +0800, Chen Lin wrote:
> From: Chen Lin <[email protected]>
>
> Remove the 'acpiphp_callback' typedef as it is not used.
>
> Signed-off-by: Chen Lin <[email protected]>

Applied to pci/hotplug for v5.12, thanks!

> ---
> drivers/pci/hotplug/acpiphp.h | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h
> index a2094c0..a74b274 100644
> --- a/drivers/pci/hotplug/acpiphp.h
> +++ b/drivers/pci/hotplug/acpiphp.h
> @@ -176,9 +176,6 @@ struct acpiphp_attention_info
> int acpiphp_register_hotplug_slot(struct acpiphp_slot *slot, unsigned int sun);
> void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *slot);
>
> -/* acpiphp_glue.c */
> -typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data);
> -
> int acpiphp_enable_slot(struct acpiphp_slot *slot);
> int acpiphp_disable_slot(struct acpiphp_slot *slot);
> u8 acpiphp_get_power_status(struct acpiphp_slot *slot);
> --
> 1.7.9.5
>
>