From: Thomas Meyer <thomas@m3y3r.de>
To: Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@suse.de>,
"open list:USB OHCI DRIVER" <linux-usb@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: [PATCH] usb: OHCI/EHCI Use resource_size function
Date: Tue, 08 Nov 2011 19:50:28 +0100 [thread overview]
Message-ID: <1320778228.8062.135.camel@localhost.localdomain> (raw)
From: Thomas Meyer <thomas@m3y3r.de>
Use resource_size function on resource object
instead of explicit computation.
The semantic patch that makes this change is available
in scripts/coccinelle/api/resource_size.cocci.
More information about semantic patching is available at
http://coccinelle.lip6.fr/
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
diff -u -p a/drivers/usb/host/ohci-xls.c b/drivers/usb/host/ohci-xls.c
--- a/drivers/usb/host/ohci-xls.c 2011-11-07 19:38:15.467036480 +0100
+++ b/drivers/usb/host/ohci-xls.c 2011-11-08 12:13:16.922398086 +0100
@@ -40,7 +40,7 @@ static int ohci_xls_probe_internal(const
goto err1;
}
hcd->rsrc_start = res->start;
- hcd->rsrc_len = res->end - res->start + 1;
+ hcd->rsrc_len = resource_size(res);
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
driver->description)) {
next reply other threads:[~2011-11-08 19:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-08 18:50 Thomas Meyer [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-11-08 18:49 Thomas Meyer
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=1320778228.8062.135.camel@localhost.localdomain \
--to=thomas@m3y3r.de \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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
Powered by JetHome