* [PATCH] bridge: make port attributes const
@ 2012-07-30 18:55 Stephen Hemminger
2012-07-30 21:56 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2012-07-30 18:55 UTC (permalink / raw)
To: David Miller; +Cc: netdev
Simple table that can be marked const.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
net/bridge/br_sysfs_br.c | 136 +++++++++++++++++++++++------------------------
net/bridge/br_sysfs_if.c | 6 +-
3 files changed, 73 insertions(+), 71 deletions(-)
--- a/net/bridge/br_sysfs_if.c 2012-07-19 15:35:29.062250368 -0700
+++ b/net/bridge/br_sysfs_if.c 2012-07-19 15:36:10.843427691 -0700
@@ -27,7 +27,7 @@ struct brport_attribute {
};
#define BRPORT_ATTR(_name,_mode,_show,_store) \
-struct brport_attribute brport_attr_##_name = { \
+const struct brport_attribute brport_attr_##_name = { \
.attr = {.name = __stringify(_name), \
.mode = _mode }, \
.show = _show, \
@@ -164,7 +164,7 @@ static BRPORT_ATTR(multicast_router, S_I
store_multicast_router);
#endif
-static struct brport_attribute *brport_attrs[] = {
+static const struct brport_attribute *brport_attrs[] = {
&brport_attr_path_cost,
&brport_attr_priority,
&brport_attr_port_id,
@@ -241,7 +241,7 @@ const struct sysfs_ops brport_sysfs_ops
int br_sysfs_addif(struct net_bridge_port *p)
{
struct net_bridge *br = p->br;
- struct brport_attribute **a;
+ const struct brport_attribute **a;
int err;
err = sysfs_create_link(&p->kobj, &br->dev->dev.kobj,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] bridge: make port attributes const
2012-07-30 18:55 [PATCH] bridge: make port attributes const Stephen Hemminger
@ 2012-07-30 21:56 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-07-30 21:56 UTC (permalink / raw)
To: shemminger; +Cc: netdev
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Mon, 30 Jul 2012 11:55:49 -0700
> Simple table that can be marked const.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-30 21:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-30 18:55 [PATCH] bridge: make port attributes const Stephen Hemminger
2012-07-30 21:56 ` David Miller
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).