[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200908091420.33935.isdn@linux-pingi.de>
Date: Sun, 9 Aug 2009 14:20:33 +0200
From: Karsten Keil <isdn@...ux-pingi.de>
To: Julia Lawall <julia@...u.dk>, isdn4linux@...tserv.isdn4linux.de,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 1/3] drivers/isdn/hisax: Correct use of request_region/request_mem_region
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@...u.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@...u.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists