lkml.org 
[lkml]   [2007]   [Aug]   [1]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 31 Jul 2007 21:52:26 -0700
FromAndrew Morton <>
SubjectRe: [PATCH]: sound: ioremap/iounmap function balancing audit
On Wed, 01 Aug 2007 00:05:59 -0400 "Scott Thompson" <postfail@hushmail.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----> Hash: SHA1

You might want to consider losing that stuff when sending patches - it just
makes things harder.

> This patch, along with previously submitted dmasound_awacs.c patch,
> completes an audit of the 'sound' tree for ioremap/iounmap
> balancing and return code checking on ioremap calls.  ioremap()
> must be balanced by an iounmap() (else this causes a memory leak).
> > i810_audio.c had a 'fixme' issue regarding ioremap fail that was
> addressed as well.> > Signed-off-by: Scott Thompson <postfail <at> hushmail.com>
> - ---
> 
> diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c
> index f5e31f1..407958c 100644
> - --- a/sound/oss/i810_audio.c
> +++ b/sound/oss/i810_audio.c
> @@ -3362,7 +3362,7 @@ static int __devinit i810_probe(struct
> pci_dev *pci_dev, const struct pci_device
> 
>  	if (card->use_mmio) {
>  		if (request_mem_region(card->ac97base_mmio_phys, 512, "ich_audio
> MMBAR")) {
> - -			if ((card->ac97base_mmio = ioremap(card->ac97base_mmio_phys,
> 512))) { /*@FIXME can ioremap fail? don't know (jsaw) */
> +			if ((card->ac97base_mmio = ioremap(card->ac97base_mmio_phys,
> 512))) {
>  				if (request_mem_region(card->iobase_mmio_phys, 256, "ich_audio
> MBBAR")) {
>  					if ((card->iobase_mmio = ioremap(card->iobase_mmio_phys,
> 256))) {
>  						printk(KERN_INFO "i810: %s mmio at 0x%04lx and 0x%04lx\n",

The patch is terribly wordwrapped.

I suspect a lot of the code which you're fixing is about to be removed. 
But I suppose we should fix it before removing it anwyay.  Still, please
split this patch into at least one for sound/oss and one for sound/soc and
sound/pci, thanks.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-08-01 06:55    [from the cache]
©2003-2008