summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorKrzysztof Wilczyński <kw@linux.com>2020-09-26 00:45:55 +0200
committerBjorn Helgaas <bhelgaas@google.com>2020-09-30 23:51:32 +0200
commit0a98bb98f2c7a47563f71770e458902ec211a6cf (patch)
tree9d228c0b437375d9d803137162b00d52883979c2 /drivers/pci/pci.c
parentPCI: endpoint: Use "NULL" instead of "0" as a NULL pointer (diff)
downloadlinux-0a98bb98f2c7a47563f71770e458902ec211a6cf.tar.xz
linux-0a98bb98f2c7a47563f71770e458902ec211a6cf.zip
PCI: Simplify bool comparisons
Take care about Coccinelle warnings: drivers/pci/pci.c:6008:6-12: WARNING: Comparison to bool drivers/pci/pci.c:6024:7-13: WARNING: Comparison to bool No change to functionality intended. Link: https://lore.kernel.org/r/20200925224555.1752460-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński <kw@linux.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index b630d53e998a..42364a1a7cb7 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -5996,7 +5996,7 @@ int pci_set_vga_state(struct pci_dev *dev, bool decode,
if (flags & PCI_VGA_STATE_CHANGE_DECODES) {
pci_read_config_word(dev, PCI_COMMAND, &cmd);
- if (decode == true)
+ if (decode)
cmd |= command_bits;
else
cmd &= ~command_bits;
@@ -6012,7 +6012,7 @@ int pci_set_vga_state(struct pci_dev *dev, bool decode,
if (bridge) {
pci_read_config_word(bridge, PCI_BRIDGE_CONTROL,
&cmd);
- if (decode == true)
+ if (decode)
cmd |= PCI_BRIDGE_CTL_VGA;
else
cmd &= ~PCI_BRIDGE_CTL_VGA;