From: holger@eitzenberger.org
To: Jay Vosburgh <fubar@us.ibm.com>
Cc: netdev@vger.kernel.org
Subject: [patch 7/7] bonding: turn all bond_parm_tbls const
Date: Tue, 09 Dec 2008 21:07:57 +0100 [thread overview]
Message-ID: <20081209201452.354289223@eitzenberger.org> (raw)
In-Reply-To: 20081209200750.490739902@eitzenberger.org
[-- Attachment #1: bonding-make-bond_parm_tbls-const.diff --]
[-- Type: text/plain, Size: 2591 bytes --]
Turn all bond_parm_tbls const.
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Index: bonding-2.6-out/drivers/net/bonding/bond_main.c
===================================================================
--- bonding-2.6-out.orig/drivers/net/bonding/bond_main.c 2008-12-09 20:56:11.000000000 +0100
+++ bonding-2.6-out/drivers/net/bonding/bond_main.c 2008-12-09 20:57:14.000000000 +0100
@@ -162,13 +162,13 @@
static int lacp_fast = 0;
-struct bond_parm_tbl bond_lacp_tbl[] = {
+const struct bond_parm_tbl bond_lacp_tbl[] = {
{ "slow", AD_LACP_SLOW},
{ "fast", AD_LACP_FAST},
{ NULL, -1},
};
-struct bond_parm_tbl bond_mode_tbl[] = {
+const struct bond_parm_tbl bond_mode_tbl[] = {
{ "balance-rr", BOND_MODE_ROUNDROBIN},
{ "active-backup", BOND_MODE_ACTIVEBACKUP},
{ "balance-xor", BOND_MODE_XOR},
@@ -179,14 +179,14 @@
{ NULL, -1},
};
-struct bond_parm_tbl xmit_hashtype_tbl[] = {
+const struct bond_parm_tbl xmit_hashtype_tbl[] = {
{ "layer2", BOND_XMIT_POLICY_LAYER2},
{ "layer3+4", BOND_XMIT_POLICY_LAYER34},
{ "layer2+3", BOND_XMIT_POLICY_LAYER23},
{ NULL, -1},
};
-struct bond_parm_tbl arp_validate_tbl[] = {
+const struct bond_parm_tbl arp_validate_tbl[] = {
{ "none", BOND_ARP_VALIDATE_NONE},
{ "active", BOND_ARP_VALIDATE_ACTIVE},
{ "backup", BOND_ARP_VALIDATE_BACKUP},
@@ -194,7 +194,7 @@
{ NULL, -1},
};
-struct bond_parm_tbl fail_over_mac_tbl[] = {
+const struct bond_parm_tbl fail_over_mac_tbl[] = {
{ "none", BOND_FOM_NONE},
{ "active", BOND_FOM_ACTIVE},
{ "follow", BOND_FOM_FOLLOW},
Index: bonding-2.6-out/drivers/net/bonding/bonding.h
===================================================================
--- bonding-2.6-out.orig/drivers/net/bonding/bonding.h 2008-12-09 20:56:11.000000000 +0100
+++ bonding-2.6-out/drivers/net/bonding/bonding.h 2008-12-09 20:57:14.000000000 +0100
@@ -345,11 +345,11 @@
/* exported from bond_main.c */
extern struct list_head bond_dev_list;
-extern struct bond_parm_tbl bond_lacp_tbl[];
-extern struct bond_parm_tbl bond_mode_tbl[];
-extern struct bond_parm_tbl xmit_hashtype_tbl[];
-extern struct bond_parm_tbl arp_validate_tbl[];
-extern struct bond_parm_tbl fail_over_mac_tbl[];
+extern const struct bond_parm_tbl bond_lacp_tbl[];
+extern const struct bond_parm_tbl bond_mode_tbl[];
+extern const struct bond_parm_tbl xmit_hashtype_tbl[];
+extern const struct bond_parm_tbl arp_validate_tbl[];
+extern const struct bond_parm_tbl fail_over_mac_tbl[];
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
void bond_send_unsolicited_na(struct bonding *bond);
--
next prev parent reply other threads:[~2008-12-09 20:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 20:07 [patch 0/7] [RFC] bonding updates to net-next-2.6 holger
2008-12-09 20:07 ` [patch 1/7] bonding: add and use bond_is_lb() holger
2008-12-10 7:07 ` David Miller
2008-12-09 20:07 ` [patch 2/7] bonding: use table for mode names holger
2008-12-10 7:08 ` David Miller
2008-12-09 20:07 ` [patch 3/7] bonding: fix compile error if debug enabled holger
2008-12-10 7:09 ` David Miller
2008-12-09 20:07 ` [patch 4/7] bonding: use pr_debug instead of own macros holger
2008-12-10 7:09 ` David Miller
2008-12-09 20:07 ` [patch 5/7] bonding: remove duplicate declarations holger
2008-12-10 7:09 ` David Miller
2008-12-09 20:07 ` [patch 6/7] bonding: make tbl argument to bond_parse_parm() const holger
2008-12-10 7:10 ` David Miller
2008-12-09 20:07 ` holger [this message]
2008-12-10 7:10 ` [patch 7/7] bonding: turn all bond_parm_tbls const David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081209201452.354289223@eitzenberger.org \
--to=holger@eitzenberger.org \
--cc=fubar@us.ibm.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).