Re: [PATCH] arch/sh: Replace an explicit computation by the use of the container_of macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 07, 2009 at 10:46:26AM +0100, Nicolas Palix wrote:
> From 945e75c0e3202ab4cd0b8f185ea4be5609806edb Mon Sep 17 00:00:00 2001
> From: Nicolas Palix <npalix@xxxxxxx>
> Date: Mon, 7 Dec 2009 10:38:55 +0100
> 
> 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/)
> 
> // <smpl>
> @@
> type T;
> expression mptr;
> expression member;
> @@
> 
> - (void *)((char *)mptr - offsetof(T, member))
> + container_of(mptr, T, member)
> // </smpl>
> 
> Signed-off-by: Nicolas Palix <npalix@xxxxxxx>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux