All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karsten Keil <isdn@linux-pingi.de>
To: Julia Lawall <julia@diku.dk>,
	isdn4linux@listserv.isdn4linux.de, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/3] drivers/isdn/hisax: Correct use of request_region/request_mem_region
Date: Sun, 09 Aug 2009 12:20:33 +0000	[thread overview]
Message-ID: <200908091420.33935.isdn@linux-pingi.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0908091150310.13271@ask.diku.dk>

On Sonntag, 9. August 2009 11:51:14 you wrote:
> Or perhaps it is the request_region that is incorrect, since the same
> value is later used with ioremap?

Yes this is the real error, these cards have one IO port (hw.isurf.reset) and 
one memory mapped IO area (
hw.isurf.phymem).


>
> julia
>
> On Sun, 9 Aug 2009, Julia Lawall wrote:
> > From: Julia Lawall <julia@diku.dk>
> >
> > request_region should be used with release_region, not
> > request_mem_region.
> >
> > The semantic patch that fixes this problem is as follows:
> > (http://coccinelle.lip6.fr/)
> >
> > // <smpl>
> > @r1@
> > expression start;
> > @@
> >
> > request_region(start,...)
> >
> > @b1@
> > expression r1.start;
> > @@
> >
> > request_mem_region(start,...)
> >
> > @depends on !b1@
> > expression r1.start;
> > expression E;
> > @@
> >
> > - release_mem_region
> > + release_region
> >   (start,E)
> > // </smpl>
> >
> > Signed-off-by: Julia Lawall <julia@diku.dk>
> >
> > ---
> >  drivers/isdn/hisax/isurf.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff -u -p a/drivers/isdn/hisax/isurf.c b/drivers/isdn/hisax/isurf.c
> > --- a/drivers/isdn/hisax/isurf.c
> > +++ b/drivers/isdn/hisax/isurf.c
> > @@ -125,7 +125,7 @@ release_io_isurf(struct IsdnCardState *c
> >  {
> >  	release_region(cs->hw.isurf.reset, 1);
> >  	iounmap(cs->hw.isurf.isar);
> > -	release_mem_region(cs->hw.isurf.phymem, ISURF_IOMEM_SIZE);
> > +	release_region(cs->hw.isurf.phymem, ISURF_IOMEM_SIZE);
> >  }
> >
> >  static void


WARNING: multiple messages have this Message-ID (diff)
From: Karsten Keil <isdn@linux-pingi.de>
To: Julia Lawall <julia@diku.dk>,
	isdn4linux@listserv.isdn4linux.de, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/3] drivers/isdn/hisax: Correct use of request_region/request_mem_region
Date: Sun, 9 Aug 2009 14:20:33 +0200	[thread overview]
Message-ID: <200908091420.33935.isdn@linux-pingi.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0908091150310.13271@ask.diku.dk>

On Sonntag, 9. August 2009 11:51:14 you wrote:
> Or perhaps it is the request_region that is incorrect, since the same
> value is later used with ioremap?

Yes this is the real error, these cards have one IO port (hw.isurf.reset) and 
one memory mapped IO area (
hw.isurf.phymem).


>
> julia
>
> On Sun, 9 Aug 2009, Julia Lawall wrote:
> > From: Julia Lawall <julia@diku.dk>
> >
> > request_region should be used with release_region, not
> > request_mem_region.
> >
> > The semantic patch that fixes this problem is as follows:
> > (http://coccinelle.lip6.fr/)
> >
> > // <smpl>
> > @r1@
> > expression start;
> > @@
> >
> > request_region(start,...)
> >
> > @b1@
> > expression r1.start;
> > @@
> >
> > request_mem_region(start,...)
> >
> > @depends on !b1@
> > expression r1.start;
> > expression E;
> > @@
> >
> > - release_mem_region
> > + release_region
> >   (start,E)
> > // </smpl>
> >
> > Signed-off-by: Julia Lawall <julia@diku.dk>
> >
> > ---
> >  drivers/isdn/hisax/isurf.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff -u -p a/drivers/isdn/hisax/isurf.c b/drivers/isdn/hisax/isurf.c
> > --- a/drivers/isdn/hisax/isurf.c
> > +++ b/drivers/isdn/hisax/isurf.c
> > @@ -125,7 +125,7 @@ release_io_isurf(struct IsdnCardState *c
> >  {
> >  	release_region(cs->hw.isurf.reset, 1);
> >  	iounmap(cs->hw.isurf.isar);
> > -	release_mem_region(cs->hw.isurf.phymem, ISURF_IOMEM_SIZE);
> > +	release_region(cs->hw.isurf.phymem, ISURF_IOMEM_SIZE);
> >  }
> >
> >  static void


  reply	other threads:[~2009-08-09 12:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-09  7:43 [PATCH 1/3] drivers/isdn/hisax: Correct use of request_region/request_mem_region Julia Lawall
2009-08-09  7:43 ` Julia Lawall
2009-08-09  9:51 ` [PATCH 1/3] drivers/isdn/hisax: Correct use of Julia Lawall
2009-08-09  9:51   ` [PATCH 1/3] drivers/isdn/hisax: Correct use of request_region/request_mem_region Julia Lawall
2009-08-09 12:20   ` Karsten Keil [this message]
2009-08-09 12:20     ` Karsten Keil
2009-08-09 12:28     ` [PATCH 1/3] drivers/isdn/hisax: Correct use of Julia Lawall
2009-08-09 12:28       ` [PATCH 1/3] drivers/isdn/hisax: Correct use of request_region/request_mem_region Julia Lawall
2009-08-09 12:44     ` [PATCH 1/3] drivers/isdn/hisax: Correct use of Julia Lawall
2009-08-09 12:44       ` [PATCH 1/3] drivers/isdn/hisax: Correct use of request_region/request_mem_region Julia Lawall

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=200908091420.33935.isdn@linux-pingi.de \
    --to=isdn@linux-pingi.de \
    --cc=isdn4linux@listserv.isdn4linux.de \
    --cc=julia@diku.dk \
    --cc=kernel-janitors@vger.kernel.org \
    --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 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.