Skip to contentSkip to conversation

r8169.c : fix misleading comment

PATCH In review Emmanuel Colbus 2 participants 3 messages May 21, 2008 – May 22, 2008 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 r8169.c : fix misleading comment

Calling "PCI base addr 1" something that can actually lie at PCI_BASE_ADDR_2 is misleading. Patch follows.

---

net/r8169.c 2008-05-21 15:22:16.000000000 +0200 renamed from net/r8169.c.old 2008-05-21 15:20:46.000000000 +0200 +2 -1
diff -Naur drivers/net/r8169.c.old drivers/net/r8169.c
@@ -1632,7 +1632,8 @@
       if (rc < 0)
               goto err_out_disable_2;
 
-       /* make sure PCI base addr 1 is MMIO */
+       /* make sure PCI base addr 1 (or 2, or whatever the second nonzero
+        * pci base addr is) is MMIO */
       if (!(pci_resource_flags(pdev, region) & IORESOURCE_MEM)) {
               if (netif_msg_probe(tp)) {
                       dev_err(&pdev->dev,
#1 lore raw

Emmanuel Colbus <[email protected]> :

Quoted 4 lines

Calling "PCI base addr 1" something that can actually lie at PCI_BASE_ADDR_2 is misleading. Patch follows.

I do not approve:
- the patch does not follow the comment style of the driver
- the comment should be removed, not silly augmented

Signature · 1 line
Ueimor
#2 lore raw
Quoted 12 lines · Francois Romieu

Emmanuel Colbus <[email protected]> :

Quoted 4 lines

Calling "PCI base addr 1" something that can actually lie at PCI_BASE_ADDR_2 is misleading. Patch follows.

I do not approve:
- the patch does not follow the comment style of the driver
- the comment should be removed, not silly augmented

OK, makes sense. Second version :

This comment is misleading, since the region it refers to can actually be PCI_BASE_ADDR_2. Remove it.

---

net/r8169.c 2008-05-22 09:55:59.000000000 +0200 renamed from net/r8169.c.old 2008-05-22 09:55:51.000000000 +0200 +0 -1
diff -Naur drivers/net/r8169.c.old drivers/net/r8169.c
@@ -1632,7 +1632,6 @@
       if (rc < 0)
               goto err_out_disable_2;
 
-       /* make sure PCI base addr 1 is MMIO */
       if (!(pci_resource_flags(pdev, region) & IORESOURCE_MEM)) {
               if (netif_msg_probe(tp)) {
                       dev_err(&pdev->dev,