All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasiliy Kulikov <segooon@gmail.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Dan Carpenter <error27@gmail.com>,
	kernel-janitors@vger.kernel.org,
	Andrew Veliath <andrewtv@usa.net>,
	Jaroslav Kysela <perex@perex.cz>, Arnd Bergmann <arnd@arndb.de>,
	Tejun Heo <tj@kernel.org>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 09/10] oss: msnd: check request_region() return value
Date: Thu, 29 Jul 2010 14:40:06 +0400	[thread overview]
Message-ID: <20100729104006.GA28465@albatros> (raw)
In-Reply-To: <s5h8w4utwod.wl%tiwai@suse.de>

On Thu, Jul 29, 2010 at 12:22 +0200, Takashi Iwai wrote:
> At Wed, 28 Jul 2010 23:20:31 +0200,
> Dan Carpenter wrote:
> > 
> > On Wed, Jul 28, 2010 at 10:00:02PM +0200, Dan Carpenter wrote:
> > > This should be -EBUSY as well.  The same for "[PATCH 06/10] ALSA: msnd: 
> > > check request_region() return value"
> > > 
> > > Another way to write that would be:
> > > 
> > 
> > Gar.  I was thinking of request_resource().  request_region() returns a
> > pointer of course.
> > 
> > But still the return code should probably be -EBUSY.  Resource
> > conflicts are more likely than allocation failures.
> 
> Agreed.
> 
> Kulikov, could you rewrite the patches with -EBUSY?
No problem, patches are coming.

> 
> 
> thanks,
> 
> Takashi
> 
> > 
> > regards,
> > dan carpenter
> > 
> > > -	request_region(dev.io, dev.numio, dev.name);
> > > +	err = request_region(dev.io, dev.numio, dev.name);
> > > +	if (err) {
> > > +		free_irq(dev.irq, &dev);
> > > +		return err;
> > > +	}
> > > 
> > > regards,
> > > dan carpenter
> > > 
> > > > +	if (request_region(dev.io, dev.numio, dev.name) == NULL) {
> > > > +		free_irq(dev.irq, &dev);
> > > > +		return -ENOMEM;
> > > > +	}
> > 

WARNING: multiple messages have this Message-ID (diff)
From: Vasiliy Kulikov <segooon@gmail.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Dan Carpenter <error27@gmail.com>,
	kernel-janitors@vger.kernel.org,
	Andrew Veliath <andrewtv@usa.net>,
	Jaroslav Kysela <perex@perex.cz>, Arnd Bergmann <arnd@arndb.de>,
	Tejun Heo <tj@kernel.org>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 09/10] oss: msnd: check request_region() return value
Date: Thu, 29 Jul 2010 10:40:06 +0000	[thread overview]
Message-ID: <20100729104006.GA28465@albatros> (raw)
In-Reply-To: <s5h8w4utwod.wl%tiwai@suse.de>

On Thu, Jul 29, 2010 at 12:22 +0200, Takashi Iwai wrote:
> At Wed, 28 Jul 2010 23:20:31 +0200,
> Dan Carpenter wrote:
> > 
> > On Wed, Jul 28, 2010 at 10:00:02PM +0200, Dan Carpenter wrote:
> > > This should be -EBUSY as well.  The same for "[PATCH 06/10] ALSA: msnd: 
> > > check request_region() return value"
> > > 
> > > Another way to write that would be:
> > > 
> > 
> > Gar.  I was thinking of request_resource().  request_region() returns a
> > pointer of course.
> > 
> > But still the return code should probably be -EBUSY.  Resource
> > conflicts are more likely than allocation failures.
> 
> Agreed.
> 
> Kulikov, could you rewrite the patches with -EBUSY?
No problem, patches are coming.

> 
> 
> thanks,
> 
> Takashi
> 
> > 
> > regards,
> > dan carpenter
> > 
> > > -	request_region(dev.io, dev.numio, dev.name);
> > > +	err = request_region(dev.io, dev.numio, dev.name);
> > > +	if (err) {
> > > +		free_irq(dev.irq, &dev);
> > > +		return err;
> > > +	}
> > > 
> > > regards,
> > > dan carpenter
> > > 
> > > > +	if (request_region(dev.io, dev.numio, dev.name) = NULL) {
> > > > +		free_irq(dev.irq, &dev);
> > > > +		return -ENOMEM;
> > > > +	}
> > 

  reply	other threads:[~2010-07-29 10:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-28 16:41 [PATCH 09/10] oss: msnd: check request_region() return value Kulikov Vasiliy
2010-07-28 16:41 ` Kulikov Vasiliy
2010-07-28 20:00 ` Dan Carpenter
2010-07-28 20:00   ` Dan Carpenter
2010-07-28 21:20   ` Dan Carpenter
2010-07-28 21:20     ` Dan Carpenter
2010-07-29 10:22     ` Takashi Iwai
2010-07-29 10:22       ` Takashi Iwai
2010-07-29 10:22       ` Takashi Iwai
2010-07-29 10:40       ` Vasiliy Kulikov [this message]
2010-07-29 10:40         ` Vasiliy Kulikov

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=20100729104006.GA28465@albatros \
    --to=segooon@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andrewtv@usa.net \
    --cc=arnd@arndb.de \
    --cc=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    --cc=tj@kernel.org \
    /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 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.