The patch titled
drivers/char: remove unnecessary pci_dev_put
has been added to the -mm tree. Its filename is
drivers-char-remove-unnecessary-pci_dev_put.patch
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this
------------------------------------------------------
Subject: drivers/char: remove unnecessary pci_dev_put
From: Julia Lawall <[EMAIL PROTECTED]>
pci_get_class implicitly does a pci_dev_put on its second argument, so
pci_dev_put is only needed if there is a break out of the loop.
The semantic match detecting this problem is as follows:
// <smpl>
@@
expression dev;
expression E;
@@
* pci_dev_put(dev)
... when != dev = E
(
* pci_get_device(...,dev)
|
* pci_get_device_reverse(...,dev)
|
* pci_get_subsys(...,dev)
|
* pci_get_class(...,dev)
)
// </smpl>
Signed-off-by: Julia Lawall <[EMAIL PROTECTED]>
Cc: Dave Airlie <[EMAIL PROTECTED]>
Cc: Dave Jones <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
drivers/char/agp/amd-k7-agp.c | 4 ----
1 file changed, 4 deletions(-)
diff -puN
drivers/char/agp/amd-k7-agp.c~drivers-char-remove-unnecessary-pci_dev_put
drivers/char/agp/amd-k7-agp.c
--- a/drivers/char/agp/amd-k7-agp.c~drivers-char-remove-unnecessary-pci_dev_put
+++ a/drivers/char/agp/amd-k7-agp.c
@@ -436,10 +436,6 @@ static int __devinit agp_amdk7_probe(str
return -ENODEV;
}
cap_ptr = pci_find_capability(gfxcard, PCI_CAP_ID_AGP);
- if (!cap_ptr) {
- pci_dev_put(gfxcard);
- continue;
- }
}
/* With so many variants of NVidia cards, it's simpler just
_
Patches currently in -mm which might be from [EMAIL PROTECTED] are
git-alsa.patch
drivers-char-remove-unnecessary-pci_dev_put.patch
arch-ppc-remove-an-unnecessary-pci_dev_put.patch
git-sparc64.patch
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html