* [PATCH 2/3] net: snmp: fix the wrong ICMP_MIB_MAX value
@ 2010-11-29 6:53 Shan Wei
2010-12-01 20:35 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Shan Wei @ 2010-11-29 6:53 UTC (permalink / raw)
To: David Miller; +Cc: Network-Maillist, Shan Wei
__ICMP_MIB_MAX is equal to the total number of icmp mib,
So no need to add 1. This wastes 4/8 bytes memory.
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
---
include/net/snmp.h | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/include/net/snmp.h b/include/net/snmp.h
index 835c587..762e2ab 100644
--- a/include/net/snmp.h
+++ b/include/net/snmp.h
@@ -60,8 +60,7 @@ struct ipstats_mib {
};
/* ICMP */
-#define ICMP_MIB_MAX (__ICMP_MIB_MAX + 1)
-
+#define ICMP_MIB_MAX __ICMP_MIB_MAX
struct icmp_mib {
unsigned long mibs[ICMP_MIB_MAX];
};
--
1.6.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/3] net: snmp: fix the wrong ICMP_MIB_MAX value
2010-11-29 6:53 [PATCH 2/3] net: snmp: fix the wrong ICMP_MIB_MAX value Shan Wei
@ 2010-12-01 20:35 ` David Miller
2010-12-01 20:36 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2010-12-01 20:35 UTC (permalink / raw)
To: shanwei; +Cc: netdev
From: Shan Wei <shanwei@cn.fujitsu.com>
Date: Mon, 29 Nov 2010 14:53:55 +0800
> @@ -60,8 +60,7 @@ struct ipstats_mib {
> };
>
> /* ICMP */
> -#define ICMP_MIB_MAX (__ICMP_MIB_MAX + 1)
> -
> +#define ICMP_MIB_MAX __ICMP_MIB_MAX
> struct icmp_mib {
In all of my trees there is an "ICMP_MIB_DUMMY" define here, and it's
been there forever, I have no idea what you are patching against.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/3] net: snmp: fix the wrong ICMP_MIB_MAX value
2010-12-01 20:35 ` David Miller
@ 2010-12-01 20:36 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2010-12-01 20:36 UTC (permalink / raw)
To: shanwei; +Cc: netdev
From: David Miller <davem@davemloft.net>
Date: Wed, 01 Dec 2010 12:35:50 -0800 (PST)
> From: Shan Wei <shanwei@cn.fujitsu.com>
> Date: Mon, 29 Nov 2010 14:53:55 +0800
>
>> @@ -60,8 +60,7 @@ struct ipstats_mib {
>> };
>>
>> /* ICMP */
>> -#define ICMP_MIB_MAX (__ICMP_MIB_MAX + 1)
>> -
>> +#define ICMP_MIB_MAX __ICMP_MIB_MAX
>> struct icmp_mib {
>
> In all of my trees there is an "ICMP_MIB_DUMMY" define here, and it's
> been there forever, I have no idea what you are patching against.
Nevermind I see that this depends upon your first patch.
Please resubmit all 3 patches once you've addressed the
feedback for patch #1.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-01 20:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-29 6:53 [PATCH 2/3] net: snmp: fix the wrong ICMP_MIB_MAX value Shan Wei
2010-12-01 20:35 ` David Miller
2010-12-01 20:36 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.