* + cpm_uart-use-resource_size.patch added to -mm tree
@ 2010-02-22 21:00 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2010-02-22 21:00 UTC (permalink / raw)
To: mm-commits; +Cc: tklauser, alan, galak, greg
The patch titled
cpm_uart: use resource_size()
has been added to the -mm tree. Its filename is
cpm_uart-use-resource_size.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: cpm_uart: use resource_size()
From: Tobias Klauser <tklauser@distanz.ch>
Use the resource_size function instead of manually calculating the
resource size. This reduces the chance of introducing off-by-one errors.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg KH <greg@kroah.com>
Cc: Kumar Gala <galak@gate.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/serial/cpm_uart/cpm_uart_cpm2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -puN drivers/serial/cpm_uart/cpm_uart_cpm2.c~cpm_uart-use-resource_size drivers/serial/cpm_uart/cpm_uart_cpm2.c
--- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c~cpm_uart-use-resource_size
+++ a/drivers/serial/cpm_uart/cpm_uart_cpm2.c
@@ -61,7 +61,7 @@ void __iomem *cpm_uart_map_pram(struct u
void __iomem *pram;
unsigned long offset;
struct resource res;
- unsigned long len;
+ resource_size_t len;
/* Don't remap parameter RAM if it has already been initialized
* during console setup.
@@ -74,7 +74,7 @@ void __iomem *cpm_uart_map_pram(struct u
if (of_address_to_resource(np, 1, &res))
return NULL;
- len = 1 + res.end - res.start;
+ len = resource_size(&res);
pram = ioremap(res.start, len);
if (!pram)
return NULL;
_
Patches currently in -mm which might be from tklauser@distanz.ch are
linux-next.patch
cpm_uart-use-resource_size.patch
rtc-twl-storage-class-should-be-before-const-qualifier.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-22 21:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-22 21:00 + cpm_uart-use-resource_size.patch added to -mm tree akpm
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.