Skip to contentSkip to conversation

PCI: altera: Fix bool initialization in tlp_read_packet

PATCH Applied Gustavo A. R. Silva 3 participants 3 messages Jan 20, 2018 – Feb 28, 2018 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: altera: Fix bool initialization in tlp_read_packet

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")
---
 drivers/pci/host/pcie-altera.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/host/pcie-altera.c +1 -1
index 5cc4f59..f9ee090 100644
@@ -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;
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 25 lines · Gustavo A. R. Silva

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")

---
 drivers/pci/host/pcie-altera.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/host/pcie- renamed from drivers/pci/host/pcie-altera.c +0 -0

altera.c
index 5cc4f59..f9ee090 100644

drivers/pci/host/pcie-altera.c +1 -1
@@ -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;
Quoted 3 lines

        u32 comp_status = 1;
--
2.7.4

#2 lore raw
In reply to Gustavo A. R. Silva
Quoted 9 lines · Gustavo A. R. Silva

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")
---
 drivers/pci/host/pcie-altera.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to pci/altera for v4.17, thanks.

Lorenzo

Quoted 16 lines
drivers/pci/host/pcie-altera.c +1 -1
index 5cc4f59..f9ee090 100644
@@ -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;
Signature · 1 line
2.7.4