From: Andrey Vagin Date: Thu, 21 Mar 2013 16:33:46 +0000 (+0400) Subject: net: fix *_DIAG_MAX constants X-Git-Tag: v3.4.39~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a9304844277ca08288b54df5ee9201c5ce3e4cbf;p=platform%2Fkernel%2Flinux-stable.git net: fix *_DIAG_MAX constants [ Upstream commit ae5fc98728c8bbbd6d7cab0b9781671fc4419c1b ] Follow the common pattern and define *_DIAG_MAX like: [...] __XXX_DIAG_MAX, }; Because everyone is used to do: struct nlattr *attrs[XXX_DIAG_MAX+1]; nla_parse([...], XXX_DIAG_MAX, [...] Reported-by: Thomas Graf Cc: "David S. Miller" Cc: Pavel Emelyanov Cc: Eric Dumazet Cc: "Paul E. McKenney" Cc: David Howells Signed-off-by: Andrey Vagin Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/unix_diag.h b/include/linux/unix_diag.h index b1d2bf1..0ff4d32 100644 --- a/include/linux/unix_diag.h +++ b/include/linux/unix_diag.h @@ -38,9 +38,11 @@ enum { UNIX_DIAG_RQLEN, UNIX_DIAG_MEMINFO, - UNIX_DIAG_MAX, + __UNIX_DIAG_MAX, }; +#define UNIX_DIAG_MAX (__UNIX_DIAG_MAX - 1) + struct unix_diag_vfs { __u32 udiag_vfs_ino; __u32 udiag_vfs_dev;