public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: postfail@hushmail.com
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-sound@vger.kernel.org
Subject: Re: [PATCH]:  sound: ioremap/iounmap function balancing audit
Date: Wed, 01 Aug 2007 04:52:26 +0000	[thread overview]
Message-ID: <20070731215226.e456560d.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070801040601.009F3DA820@mailserver8.hushmail.com>

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.


  reply	other threads:[~2007-08-01  4:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-01  4:05 [PATCH]: sound: ioremap/iounmap function balancing audit Scott Thompson
2007-08-01  4:52 ` Andrew Morton [this message]
2007-08-01  5:45 ` Scott Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070731215226.e456560d.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=postfail@hushmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox