gpio: virtio: Fix sparse warnings

Fix warnings reported by sparse, related to type mismatch between u16
and __le16.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 3a29355a22 ("gpio: Add virtio-gpio driver")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
Viresh Kumar
2021-08-31 10:59:25 +05:30
committed by Bartosz Golaszewski
parent 37cba6432d
commit 17395d7742
2 changed files with 25 additions and 26 deletions

View File

@@ -22,16 +22,16 @@
#define VIRTIO_GPIO_DIRECTION_IN 0x02
struct virtio_gpio_config {
__u16 ngpio;
__le16 ngpio;
__u8 padding[2];
__u32 gpio_names_size;
__le32 gpio_names_size;
} __packed;
/* Virtio GPIO Request / Response */
struct virtio_gpio_request {
__u16 type;
__u16 gpio;
__u32 value;
__le16 type;
__le16 gpio;
__le32 value;
};
struct virtio_gpio_response {