* - sound-core-memallocc-add-missing-pci_dev_put.patch removed from -mm tree
@ 2007-12-04 22:11 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2007-12-04 22:11 UTC (permalink / raw)
To: julia, perex, tiwai, mm-commits
The patch titled
sound/core/memalloc.c: Add missing pci_dev_put
has been removed from the -mm tree. Its filename was
sound-core-memallocc-add-missing-pci_dev_put.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
Subject: sound/core/memalloc.c: Add missing pci_dev_put
From: Julia Lawall <julia@diku.dk>
There should be a pci_dev_put when breaking out of a loop that iterates
over calls to pci_get_device and similar functions.
In this case, the return under the initial if needs a pci_dev_put in the
same way that the return under the subsequent for loop has a pci_dev_put.
This was fixed using the following semantic patch.
// <smpl>
@@
type T;
identifier d;
expression e;
@@
T *d;
...
while ((d = \(pci_get_device\|pci_get_device_reverse\|pci_get_subsys\|pci_get_class\)(..., d)) != NULL)
{... when != pci_dev_put(d)
when != e = d
(
return d;
|
+ pci_dev_put(d);
? return ...;
)
...}
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
sound/core/memalloc.c | 1 +
1 file changed, 1 insertion(+)
diff -puN sound/core/memalloc.c~sound-core-memallocc-add-missing-pci_dev_put sound/core/memalloc.c
--- a/sound/core/memalloc.c~sound-core-memallocc-add-missing-pci_dev_put
+++ a/sound/core/memalloc.c
@@ -568,6 +568,7 @@ static ssize_t snd_mem_proc_write(struct
if (pci_set_dma_mask(pci, mask) < 0 ||
pci_set_consistent_dma_mask(pci, mask) < 0) {
printk(KERN_ERR "snd-page-alloc: cannot set DMA mask %lx for pci %04x:%04x\n", mask, vendor, device);
+ pci_dev_put(pci);
return count;
}
}
_
Patches currently in -mm which might be from julia@diku.dk are
git-alsa.patch
drivers-char-remove-unnecessary-pci_dev_put.patch
arch-ppc-remove-an-unnecessary-pci_dev_put.patch
git-input.patch
git-sparc64.patch
drivers-video-remove-unnecessary-pci_dev_put.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-04 22:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-04 22:11 - sound-core-memallocc-add-missing-pci_dev_put.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.