Re: [PATCH] PCI: altera: Fix bool initialization in tlp_read_packet

From: Ley Foon Tan
Date: Mon Jan 22 2018 - 02:28:18 EST


On Fri, 2018-01-19 at 21:26 -0600, Gustavo A. R. Silva wrote:
> Bool initializations should use true and false.
>
> This issue was detected with the help of Coccinelle.
>
> Fixes: eaa6111b70a7 ("PCI: altera: Add Altera PCIe host controller
> driver")
> Signed-off-by: Gustavo A. R. Silva <gustavo@xxxxxxxxxxxxxx>
> ---
> Âdrivers/pci/host/pcie-altera.c | 2 +-
> Â1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-
> altera.c
> index 5cc4f59..f9ee090 100644
> --- a/drivers/pci/host/pcie-altera.c
> +++ b/drivers/pci/host/pcie-altera.c
> @@ -156,7 +156,7 @@ static bool altera_pcie_valid_device(struct
> altera_pcie *pcie,
> Âstatic int tlp_read_packet(struct altera_pcie *pcie, u32 *value)
> Â{
> ÂÂÂÂÂÂÂÂint i;
> -ÂÂÂÂÂÂÂbool sop = 0;
> +ÂÂÂÂÂÂÂbool sop = false;
> ÂÂÂÂÂÂÂÂu32 ctrl;
> ÂÂÂÂÂÂÂÂu32 reg0, reg1;
> ÂÂÂÂÂÂÂÂu32 comp_status = 1;
> --
> 2.7.4

Acked-by: Ley Foon Tan <ley.foon.tan@xxxxxxxxx>