Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964865Ab3DHKDz (ORCPT ); Mon, 8 Apr 2013 06:03:55 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:42948 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935837Ab3DHJwa (ORCPT ); Mon, 8 Apr 2013 05:52:30 -0400 From: Luis Henriques To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: "David S. Miller" , Pavel Emelyanov , Eric Dumazet , "Paul E. McKenney" , David Howells , Andrey Vagin , Luis Henriques Subject: [PATCH 071/102] net: fix *_DIAG_MAX constants Date: Mon, 8 Apr 2013 10:50:26 +0100 Message-Id: <1365414657-29191-72-git-send-email-luis.henriques@canonical.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1365414657-29191-1-git-send-email-luis.henriques@canonical.com> References: <1365414657-29191-1-git-send-email-luis.henriques@canonical.com> X-Extended-Stable: 3.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1665 Lines: 61 3.5.7.10 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Andrey Vagin commit ae5fc98728c8bbbd6d7cab0b9781671fc4419c1b upstream. 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 [ luis: backport to 3.5: - fix unix_diag.h path - packet_diag.h does not exist ] Signed-off-by: Luis Henriques --- include/linux/unix_diag.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/