From: Julia Lawall Date: Wed, 23 Sep 2009 22:57:36 +0000 (-0700) Subject: drivers/vlynq/vlynq.c: fix resource size off by 1 error X-Git-Tag: v2.6.32-rc1~68 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3354f73b24c6d392ed7fd5583cfcc7604c1934ae;p=pandora-kernel.git drivers/vlynq/vlynq.c: fix resource size off by 1 error In this case, the calls to request_mem_region, ioremap, and release_mem_region all have a consistent length argument, len, but since in other files (res->end - res->start) + 1, equivalent to resource_size(res), is used for a resource-typed structure res, one could consider whether the same should be done here. The problem was found using the following semantic patch: (http://www.emn.fr/x-info/coccinelle/) // @@ struct resource *res; @@ - (res->end - res->start) + 1 + resource_size(res) @@ struct resource *res; @@ - res->end - res->start + BAD(resource_size(res)) // Signed-off-by: Julia Lawall Acked-by: Florian Fainelli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed