linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adam Belay <ambx1@neo.rr.com>
To: Daniele Bellucci <bellucda@tiscali.it>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Fwd: Re: [PATCH] Get rid of __check_region in drivers/pnp/resource.c [2.6.0-test1][2.5.75-kj1]
Date: Sat, 26 Jul 2003 20:29:23 +0000	[thread overview]
Message-ID: <20030726202923.GA6160@neo.rr.com> (raw)
In-Reply-To: <200307261806.41091.bellucda@tiscali.it>

On Sat, Jul 26, 2003 at 06:06:41PM +0200, Daniele Bellucci wrote:
> 
> Hi Adam,
> could you double check this patch?
> 
> tnx.
> 
> 
> diff -urN 1.0/drivers/pnp/resource.c 1.1/drivers/pnp/resource.c
> --- 1.0/drivers/pnp/resource.c	2003-07-26 13:56:18.000000000 +0200
> +++ 1.1/drivers/pnp/resource.c	2003-07-26 14:05:30.000000000 +0200
> @@ -258,7 +258,9 @@
>  	/* check if the resource is already in use, skip if the
>  	 * device is active because it itself may be in use */
>  	if(!dev->active) {
> -		if (__check_region(&ioport_resource, *port, length(port,end)))
> +
> +		if (__request_region(&ioport_resource, *port, length(port,end),
> +				     dev->dev.name))
>  			return 0;
>  	}
>  
> 
> 
> 
> ----------  Forwarded Message  ----------
> 
> Subject: Re: [PATCH] Get rid of __check_region in drivers/pnp/resource.c 
[2.6.0-test1][2.5.75-kj1]> Date: Sat, 26 Jul 2003 11:50:40 -0400
> From: Greg KH <greg@kroah.com>
> To: Daniele Bellucci <bellucda@tiscali.it>
> Cc: kernel-janitor-discuss@lists.sourceforge.net
> 
> On Sat, Jul 26, 2003 at 02:10:15PM +0200, Daniele Bellucci wrote:
> > Hi all,
> > the following patch  compile and boot fine but i'm not sure if this is the
> > right fix.
> >
> > Please tellme if correct.
> 
> It doesn't look correct.  You should also cc: the pnp maintainer about
> this.
> 
> thanks,
> 
> greg k-h
> 
> -------------------------------------------------------
>

We only want to check if the resource is in use, not reserve it.  Therefore I 
see __check_region as being appropriate.  As long as it isn't printing a compile
warning, I'd prefer to leave it.  In this particular case it is not creating a 
race condition but for most cases it should be removed.

Also simply requesting the resource without releasing it will cause many of the
drivers that actually call request_region to fail.

Thanks,
Adam

           reply	other threads:[~2003-07-27  0:44 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200307261806.41091.bellucda@tiscali.it>]

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=20030726202923.GA6160@neo.rr.com \
    --to=ambx1@neo.rr.com \
    --cc=bellucda@tiscali.it \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).