From: Julia Lawall <julia@diku.dk>
To: Karsten Keil <isdn@linux-pingi.de>
Cc: 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:44:41 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0908091444020.16252@ask.diku.dk> (raw)
In-Reply-To: <200908091420.33935.isdn@linux-pingi.de>
From: Julia Lawall <julia@diku.dk>
request_mem_region should be used when ioremap is used subsequently.
In this case, release_mem_region was already used where needed.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression start,E;
@@
- request_region
+ request_mem_region
(start,...)
... when != request_mem_region(start,...)
when != start = E
ioremap(start,...)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
drivers/isdn/hisax/isurf.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/isdn/hisax/isurf.c b/drivers/isdn/hisax/isurf.c
index ca41617..e1c3434 100644
--- a/drivers/isdn/hisax/isurf.c
+++ b/drivers/isdn/hisax/isurf.c
@@ -259,7 +259,8 @@ setup_isurf(struct IsdnCard *card)
cs->hw.isurf.reset);
return (0);
}
- if (!request_region(cs->hw.isurf.phymem, ISURF_IOMEM_SIZE, "isurf iomem")) {
+ if (!request_mem_region(cs->hw.isurf.phymem, ISURF_IOMEM_SIZE,
+ "isurf iomem")) {
printk(KERN_WARNING "HiSax: Siemens I-Surf memory region "
"%lx-%lx already in use\n",
cs->hw.isurf.phymem,
prev parent reply other threads:[~2009-08-09 12:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-09 7:43 Julia Lawall
2009-08-09 9:51 ` Julia Lawall
2009-08-09 12:20 ` Karsten Keil
2009-08-09 12:28 ` Julia Lawall
2009-08-09 12:44 ` Julia Lawall [this message]
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=Pine.LNX.4.64.0908091444020.16252@ask.diku.dk \
--to=julia@diku.dk \
--cc=isdn4linux@listserv.isdn4linux.de \
--cc=isdn@linux-pingi.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®