On Sun, 30 Sep 2018 13:02:52 +0800
Li RongQing <lirongq...@baidu.com> wrote:

> we can save container_of computation and return dst directly,
> since dst is always first member of struct rt6_info
> 
> Add a BUILD_BUG_ON() to catch any change that could break this
> assertion.
> 
> Signed-off-by: Li RongQing <lirongq...@baidu.com>

I don't understand why you are doing this? It is not going to be
faster (or safer) than container_of. container_of provides the
same functionality and is safe against position of the member
in the structure.

Reply via email to