Merge branches 'clk-range', 'clk-uniphier', 'clk-apple' and 'clk-qcom' into clk-next
[linux-2.6-microblaze.git] / net / mpls / af_mpls.c
index 0c7bde1..d6fdc57 100644 (file)
@@ -230,8 +230,8 @@ static struct mpls_nh *mpls_get_nexthop(struct mpls_route *rt, u8 index)
  * Since those fields can change at any moment, use READ_ONCE to
  * access both.
  */
-static struct mpls_nh *mpls_select_multipath(struct mpls_route *rt,
-                                            struct sk_buff *skb)
+static const struct mpls_nh *mpls_select_multipath(struct mpls_route *rt,
+                                                  struct sk_buff *skb)
 {
        u32 hash = 0;
        int nh_index = 0;
@@ -343,8 +343,8 @@ static int mpls_forward(struct sk_buff *skb, struct net_device *dev,
 {
        struct net *net = dev_net(dev);
        struct mpls_shim_hdr *hdr;
+       const struct mpls_nh *nh;
        struct mpls_route *rt;
-       struct mpls_nh *nh;
        struct mpls_entry_decoded dec;
        struct net_device *out_dev;
        struct mpls_dev *out_mdev;
@@ -1607,6 +1607,7 @@ static int mpls_dev_notify(struct notifier_block *this, unsigned long event,
        struct net_device *dev = netdev_notifier_info_to_dev(ptr);
        struct mpls_dev *mdev;
        unsigned int flags;
+       int err;
 
        if (event == NETDEV_REGISTER) {
                mdev = mpls_add_dev(dev);
@@ -1621,7 +1622,6 @@ static int mpls_dev_notify(struct notifier_block *this, unsigned long event,
                return NOTIFY_OK;
 
        switch (event) {
-               int err;
 
        case NETDEV_DOWN:
                err = mpls_ifdown(dev, event);
@@ -2360,12 +2360,12 @@ static int mpls_getroute(struct sk_buff *in_skb, struct nlmsghdr *in_nlh,
        u32 labels[MAX_NEW_LABELS];
        struct mpls_shim_hdr *hdr;
        unsigned int hdr_size = 0;
+       const struct mpls_nh *nh;
        struct net_device *dev;
        struct mpls_route *rt;
        struct rtmsg *rtm, *r;
        struct nlmsghdr *nlh;
        struct sk_buff *skb;
-       struct mpls_nh *nh;
        u8 n_labels;
        int err;