diff mbox series

x86: The return type of the function could be void

Message ID 20220511051605.103574-1-kunyu@nfschina.com
State New
Headers show
Series x86: The return type of the function could be void | expand

Commit Message

Li kunyu May 11, 2022, 5:16 a.m. UTC
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@nfschina.com>
---
 arch/x86/kernel/acpi/boot.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Rafael J. Wysocki May 11, 2022, 5:30 p.m. UTC | #1
On Wed, May 11, 2022 at 7:16 AM Li kunyu <kunyu@nfschina.com> 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@nfschina.com>
> ---
>  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!
diff mbox series

Patch

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,