Re: [PATCH] x86: The return type of the function could be void

From: Rafael J. Wysocki
Date: Wed May 11 2022 - 13:30:24 EST


On Wed, May 11, 2022 at 7:16 AM Li kunyu <kunyu@xxxxxxxxxxxx> wrote:
>
> perhaps the return value of the function is not used.
> it may be possible to optimize the execution instructions.
>
> Signed-off-by: Li kunyu <kunyu@xxxxxxxxxxxx>
> ---
> arch/x86/kernel/acpi/boot.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
> index 0d01e7f5078c..7e32e33d52fa 100644
> --- a/arch/x86/kernel/acpi/boot.c
> +++ b/arch/x86/kernel/acpi/boot.c
> @@ -375,7 +375,7 @@ static void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger,
> isa_irq_to_gsi[bus_irq] = gsi;
> }
>
> -static int mp_config_acpi_gsi(struct device *dev, u32 gsi, int trigger,
> +static void mp_config_acpi_gsi(struct device *dev, u32 gsi, int trigger,
> int polarity)
> {
> #ifdef CONFIG_X86_MPPARSE
> @@ -387,9 +387,9 @@ static int mp_config_acpi_gsi(struct device *dev, u32 gsi, int trigger,
> u8 pin;
>
> if (!acpi_ioapic)
> - return 0;
> + return;
> if (!dev || !dev_is_pci(dev))
> - return 0;
> + return;
>
> pdev = to_pci_dev(dev);
> number = pdev->bus->number;
> @@ -408,7 +408,6 @@ static int mp_config_acpi_gsi(struct device *dev, u32 gsi, int trigger,
>
> mp_save_irq(&mp_irq);
> #endif
> - return 0;
> }
>
> static int __init mp_register_ioapic_irq(u8 bus_irq, u8 polarity,
> --

Applied as 5.19 material with rewritten subject and changelog, thanks!