Skip to contentSkip to conversation

pci.h: Fix typo, remove unnecessary !!

PATCH Applied Joe Perches 2 participants 2 messages Sep 3, 2013 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci.h: Fix typo, remove unnecessary !!

Use normal kernel-doc "Returns:" instead of retruns Assignment to bool is always 1 or 0 so the !! isn't necessary.

---
 include/linux/pci.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/pci.h +2 -2
index da172f9..ee0f3b6 100644
@@ -1749,11 +1749,11 @@ static inline int pci_pcie_cap(struct pci_dev *dev)
  * pci_is_pcie - check if the PCI device is PCI Express capable
  * @dev: PCI device
  *
- * Retrun true if the PCI device is PCI Express capable, false otherwise.
+ * Returns: true if the PCI device is PCI Express capable, false otherwise.
  */
 static inline bool pci_is_pcie(struct pci_dev *dev)
 {
-	return !!pci_pcie_cap(dev);
+	return pci_pcie_cap(dev);
 }
 
 /**
maintainer Applied
#1 lore raw
Quoted 4 lines · Joe Perches

Use normal kernel-doc "Returns:" instead of retruns Assignment to bool is always 1 or 0 so the !! isn't necessary.

Applied to pci/misc, thanks. This branch will be rebased and will not appear in -next until after v3.12-rc1.

Quoted 24 lines
---
 include/linux/pci.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/pci.h +2 -2
index da172f9..ee0f3b6 100644
@@ -1749,11 +1749,11 @@ static inline int pci_pcie_cap(struct pci_dev *dev)
  * pci_is_pcie - check if the PCI device is PCI Express capable
  * @dev: PCI device
  *
- * Retrun true if the PCI device is PCI Express capable, false otherwise.
+ * Returns: true if the PCI device is PCI Express capable, false otherwise.
  */
 static inline bool pci_is_pcie(struct pci_dev *dev)
 {
-	return !!pci_pcie_cap(dev);
+	return pci_pcie_cap(dev);
 }
 
 /**