diff mbox series

PCI/AER: fix boolreturn.cocci warnings

Message ID 20180719235417.GA7720@athens
State Accepted
Delegated to: Bjorn Helgaas
Headers show
Series PCI/AER: fix boolreturn.cocci warnings | expand

Commit Message

kbuild test robot July 19, 2018, 11:54 p.m. UTC
From: kbuild test robot <fengguang.wu@intel.com>

drivers/pci/pcie/aer.c:349:9-10: WARNING: return of 0/1 in function 'aer_acpi_firmware_first' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

Fixes: 69c7f453d545 ("PCI/AER: Honor "pcie_ports=native" even if HEST sets FIRMWARE_FIRST")
CC: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
---

 aer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bjorn Helgaas July 20, 2018, 8:30 p.m. UTC | #1
On Fri, Jul 20, 2018 at 07:54:17AM +0800, kbuild test robot wrote:
> From: kbuild test robot <fengguang.wu@intel.com>
> 
> drivers/pci/pcie/aer.c:349:9-10: WARNING: return of 0/1 in function 'aer_acpi_firmware_first' with return type bool
> 
>  Return statements in functions returning bool should use
>  true/false instead of 1/0.
> Generated by: scripts/coccinelle/misc/boolreturn.cocci
> 
> Fixes: 69c7f453d545 ("PCI/AER: Honor "pcie_ports=native" even if HEST sets FIRMWARE_FIRST")
> CC: Alexandru Gagniuc <mr.nuke.me@gmail.com>
> Signed-off-by: kbuild test robot <fengguang.wu@intel.com>

I folded this into the original patch.

> ---
> 
>  aer.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/pci/pcie/aer.c
> +++ b/drivers/pci/pcie/aer.c
> @@ -346,7 +346,7 @@ bool aer_acpi_firmware_first(void)
>  	};
>  
>  	if (pcie_ports_native)
> -		return 0;
> +		return false;
>  
>  	if (!parsed) {
>  		apei_hest_parse(aer_hest_parse, &info);
diff mbox series

Patch

--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -346,7 +346,7 @@  bool aer_acpi_firmware_first(void)
 	};
 
 	if (pcie_ports_native)
-		return 0;
+		return false;
 
 	if (!parsed) {
 		apei_hest_parse(aer_hest_parse, &info);