public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesper Juhl <jesper.juhl@gmail.com>
To: Stephane Wirtel <stephane.wirtel@belgacom.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linux-2.6.13 : __check_region is deprecated
Date: Tue, 30 Aug 2005 01:25:21 +0200	[thread overview]
Message-ID: <9a8748490508291625321e4e3b@mail.gmail.com> (raw)
In-Reply-To: <20050829231417.GB2736@localhost.localdomain>

On 8/30/05, Stephane Wirtel <stephane.wirtel@belgacom.net> wrote:
> Hi,
> 
> By compiling my kernel, I can see that the __check_region function (in
> kernel/resource.c) is deprecated.
> 
[snip]
> 
> Is there a function to replace this deprecated function ?
> 
Yes, you just call request_region() and check its return value.


> Why is it deprecated ?
> 
In the past you first called check_region() followed by
request_region() if the region was available. That is not safe as you
could get interrupted between the two calls and something else might
have already grabbed the region you thought was free by the time you
get to calling request_region().  So, request_region() was rewritten
to do the checking internally and let the caller know via its return
value if
acquiring the region failed or succeded. 
So these days check_region should no longer be used. It's a historic
relic. request_region() should be used directly instead. That's why it
is deprecated.


-- 
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

  parent reply	other threads:[~2005-08-29 23:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-29 23:14 Linux-2.6.13 : __check_region is deprecated Stephane Wirtel
2005-08-29 23:21 ` Randy.Dunlap
2005-08-29 23:25 ` Jesper Juhl [this message]
2005-08-29 23:28 ` Diego Calleja
2005-08-29 23:34   ` Jesper Juhl
2005-08-29 23:55     ` Diego Calleja
2005-08-29 23:59       ` Jesper Juhl
2005-08-30 14:28       ` David Hollis
2005-08-30 14:50         ` Adrian Bunk
2005-08-30 15:09         ` Randy.Dunlap
2005-08-30  6:10 ` Stephane Wirtel

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=9a8748490508291625321e4e3b@mail.gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stephane.wirtel@belgacom.net \
    /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