From: Nicolas Palix Date: Mon, 7 Dec 2009 09:38:55 +0000 (+0100) Subject: sh: Replace an explicit computation by the use of the container_of macro X-Git-Tag: v2.6.33-rc1~63^2~32 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f701b3999890b867f87733c146d4cdf9319ead05;p=pandora-kernel.git sh: Replace an explicit computation by the use of the container_of macro The macro container_of from kernel.h performs the same pointer arithmetic operation. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ type T; expression mptr; expression member; @@ - (void *)((char *)mptr - offsetof(T, member)) + container_of(mptr, T, member) // Signed-off-by: Nicolas Palix Signed-off-by: Paul Mundt --- Reading git-diff-tree failed