Commit 0a98bb98 authored by Krzysztof Wilczyński's avatar Krzysztof Wilczyński Committed by Bjorn Helgaas

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.comSigned-off-by: default avatarKrzysztof Wilczyński <kw@linux.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 32b313ce
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment