Merge tag 'sched-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / drivers / net / virtio_net.c
index 6fa8fe5..263b005 100644 (file)
@@ -724,7 +724,7 @@ static struct sk_buff *receive_small(struct net_device *dev,
                        goto xdp_xmit;
                default:
                        bpf_warn_invalid_xdp_action(act);
-                       /* fall through */
+                       fallthrough;
                case XDP_ABORTED:
                        trace_xdp_exception(vi->dev, xdp_prog, act);
                case XDP_DROP:
@@ -922,10 +922,10 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
                        goto xdp_xmit;
                default:
                        bpf_warn_invalid_xdp_action(act);
-                       /* fall through */
+                       fallthrough;
                case XDP_ABORTED:
                        trace_xdp_exception(vi->dev, xdp_prog, act);
-                       /* fall through */
+                       fallthrough;
                case XDP_DROP:
                        if (unlikely(xdp_page != page))
                                __free_pages(xdp_page, 0);
@@ -2264,12 +2264,13 @@ static void virtnet_update_settings(struct virtnet_info *vi)
        if (!virtio_has_feature(vi->vdev, VIRTIO_NET_F_SPEED_DUPLEX))
                return;
 
-       speed = virtio_cread32(vi->vdev, offsetof(struct virtio_net_config,
-                                                 speed));
+       virtio_cread_le(vi->vdev, struct virtio_net_config, speed, &speed);
+
        if (ethtool_validate_speed(speed))
                vi->speed = speed;
-       duplex = virtio_cread8(vi->vdev, offsetof(struct virtio_net_config,
-                                                 duplex));
+
+       virtio_cread_le(vi->vdev, struct virtio_net_config, duplex, &duplex);
+
        if (ethtool_validate_duplex(duplex))
                vi->duplex = duplex;
 }