From: Gustavo A. R. Silva Date: Sat, 20 Jan 2018 03:26:51 +0000 (-0600) Subject: PCI: altera: Fix bool initialization in tlp_read_packet() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=db89ed14a2f2fcaa157a57fe3dd32cdb48459e2b;p=openwrt%2Fstaging%2Fblogic.git PCI: altera: Fix bool initialization in tlp_read_packet() Bool variables should be initialized only through true and false values; update tlp_read_packet() code to comply. Detected using the Coccinelle tool. Fixes: eaa6111b70a7 ("PCI: altera: Add Altera PCIe host controller driver") Signed-off-by: Gustavo A. R. Silva [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Ley Foon Tan --- diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c index 2235f4760951..a6af62e0256d 100644 --- a/drivers/pci/host/pcie-altera.c +++ b/drivers/pci/host/pcie-altera.c @@ -145,7 +145,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;