diff options
Diffstat (limited to 'sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-bridge-set_via_phys_dev_state.patch')
-rw-r--r-- | sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-bridge-set_via_phys_dev_state.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-bridge-set_via_phys_dev_state.patch b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-bridge-set_via_phys_dev_state.patch new file mode 100644 index 000000000000..de6d70522188 --- /dev/null +++ b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-bridge-set_via_phys_dev_state.patch @@ -0,0 +1,39 @@ +From: Cyrill Gorcunov <gorcunov@openvz.org> +Date: Tue, 7 Apr 2009 17:59:25 +0000 (+0400) +Subject: net: bridge - set_via_phys_dev_state should return int value +X-Git-Url: http://git.openvz.org/?p=linux-2.6.27-openvz;a=commitdiff_plain;h=649958ef9120ebea8ed3d216e02a9218e9acad8d + +net: bridge - set_via_phys_dev_state should return int value + +While playing with bridge code I found the following +compiler warning + +| CC net/bridge/br_sysfs_br.o +|net/bridge/br_sysfs_br.c: In function âstore_via_phys_dev_stateâ: +|net/bridge/br_sysfs_br.c:199: warning: passing argument 4 of +|âstore_bridge_parmâ from incompatible pointer type + +This is due to store_bridge_parm uses int returning callback. +Fix it. + +Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> +Signed-off-by: Pavel Emelyanov <xemul@openvz.org> +--- + +diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c +index 5b6f301..b33cf32 100644 +--- a/net/bridge/br_sysfs_br.c ++++ b/net/bridge/br_sysfs_br.c +@@ -188,9 +188,10 @@ static ssize_t show_via_phys_dev_state(struct device *cd, + return sprintf(buf, "%d\n", br->via_phys_dev); + } + +-static void set_via_phys_dev_state(struct net_bridge *br, unsigned long val) ++static int set_via_phys_dev_state(struct net_bridge *br, unsigned long val) + { +- br->via_phys_dev = val; ++ br->via_phys_dev = val ? 1 : 0; ++ return 0; + } + + static ssize_t store_via_phys_dev_state(struct device *cd, |