PCI: aerdrv: trivial cleanup for aerdrv_core.c
authorHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Thu, 15 Apr 2010 04:23:17 +0000 (13:23 +0900)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 11 May 2010 19:01:40 +0000 (12:01 -0700)
Style cleanup for pci_{en,dis}able_pcie_error_reporting().

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pcie/aer/aerdrv_core.c

index ce42cac99dd37b6a97ff5cb84c276464e4d2689c..df2d686fe3ddd5b8bb6f3e6b149480a3ff9c8d6a 100644 (file)
@@ -47,13 +47,12 @@ int pci_enable_pcie_error_reporting(struct pci_dev *dev)
        if (!pos)
                return -EIO;
 
-       pci_read_config_word(dev, pos+PCI_EXP_DEVCTL, &reg16);
-       reg16 = reg16 |
-               PCI_EXP_DEVCTL_CERE |
+       pci_read_config_word(dev, pos + PCI_EXP_DEVCTL, &reg16);
+       reg16 |= (PCI_EXP_DEVCTL_CERE |
                PCI_EXP_DEVCTL_NFERE |
                PCI_EXP_DEVCTL_FERE |
-               PCI_EXP_DEVCTL_URRE;
-       pci_write_config_word(dev, pos+PCI_EXP_DEVCTL, reg16);
+               PCI_EXP_DEVCTL_URRE);
+       pci_write_config_word(dev, pos + PCI_EXP_DEVCTL, reg16);
 
        return 0;
 }
@@ -71,12 +70,12 @@ int pci_disable_pcie_error_reporting(struct pci_dev *dev)
        if (!pos)
                return -EIO;
 
-       pci_read_config_word(dev, pos+PCI_EXP_DEVCTL, &reg16);
-       reg16 = reg16 & ~(PCI_EXP_DEVCTL_CERE |
-                       PCI_EXP_DEVCTL_NFERE |
-                       PCI_EXP_DEVCTL_FERE |
-                       PCI_EXP_DEVCTL_URRE);
-       pci_write_config_word(dev, pos+PCI_EXP_DEVCTL, reg16);
+       pci_read_config_word(dev, pos + PCI_EXP_DEVCTL, &reg16);
+       reg16 &= ~(PCI_EXP_DEVCTL_CERE |
+               PCI_EXP_DEVCTL_NFERE |
+               PCI_EXP_DEVCTL_FERE |
+               PCI_EXP_DEVCTL_URRE);
+       pci_write_config_word(dev, pos + PCI_EXP_DEVCTL, reg16);
 
        return 0;
 }