Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae5fc987 authored by Andrey Vagin's avatar Andrey Vagin Committed by David S. Miller
Browse files

net: fix *_DIAG_MAX constants



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: default avatarThomas Graf <tgraf@suug.ch>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b37391e6
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -33,9 +33,11 @@ enum {
	PACKET_DIAG_TX_RING,
	PACKET_DIAG_FANOUT,

	PACKET_DIAG_MAX,
	__PACKET_DIAG_MAX,
};

#define PACKET_DIAG_MAX (__PACKET_DIAG_MAX - 1)

struct packet_diag_info {
	__u32	pdi_index;
	__u32	pdi_version;
+3 −1
Original line number Diff line number Diff line
@@ -39,9 +39,11 @@ enum {
	UNIX_DIAG_MEMINFO,
	UNIX_DIAG_SHUTDOWN,

	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;