Skip to content

Commit

Permalink
[NET_SCHED]: mark classifier ops __read_mostly
Browse files Browse the repository at this point in the history
Additionally remove unnecessary NULL initilizations of the next pointer.

Signed-off-by: Patrick McHardy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
kaber authored and davem330 committed Jan 28, 2008
1 parent 62e3ba1 commit 2eb9d75
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion net/sched/cls_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

/* The list of all installed classifier types */

static struct tcf_proto_ops *tcf_proto_base;
static struct tcf_proto_ops *tcf_proto_base __read_mostly;

/* Protects list of registered TC modules. It is pure SMP lock. */
static DEFINE_RWLOCK(cls_mod_lock);
Expand Down
2 changes: 1 addition & 1 deletion net/sched/cls_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ static int basic_dump(struct tcf_proto *tp, unsigned long fh,
return -1;
}

static struct tcf_proto_ops cls_basic_ops = {
static struct tcf_proto_ops cls_basic_ops __read_mostly = {
.kind = "basic",
.classify = basic_classify,
.init = basic_init,
Expand Down
3 changes: 1 addition & 2 deletions net/sched/cls_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,7 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh,
return -1;
}

static struct tcf_proto_ops cls_fw_ops = {
.next = NULL,
static struct tcf_proto_ops cls_fw_ops __read_mostly = {
.kind = "fw",
.classify = fw_classify,
.init = fw_init,
Expand Down
3 changes: 1 addition & 2 deletions net/sched/cls_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,7 @@ static int route4_dump(struct tcf_proto *tp, unsigned long fh,
return -1;
}

static struct tcf_proto_ops cls_route4_ops = {
.next = NULL,
static struct tcf_proto_ops cls_route4_ops __read_mostly = {
.kind = "route",
.classify = route4_classify,
.init = route4_init,
Expand Down
3 changes: 1 addition & 2 deletions net/sched/cls_tcindex.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,7 @@ static int tcindex_dump(struct tcf_proto *tp, unsigned long fh,
return -1;
}

static struct tcf_proto_ops cls_tcindex_ops = {
.next = NULL,
static struct tcf_proto_ops cls_tcindex_ops __read_mostly = {
.kind = "tcindex",
.classify = tcindex_classify,
.init = tcindex_init,
Expand Down
3 changes: 1 addition & 2 deletions net/sched/cls_u32.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,8 +751,7 @@ static int u32_dump(struct tcf_proto *tp, unsigned long fh,
return -1;
}

static struct tcf_proto_ops cls_u32_ops = {
.next = NULL,
static struct tcf_proto_ops cls_u32_ops __read_mostly = {
.kind = "u32",
.classify = u32_classify,
.init = u32_init,
Expand Down

0 comments on commit 2eb9d75

Please sign in to comment.