qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 17/25] hw/virtio: Use correct type sizes


From: Richard Henderson
Subject: Re: [RFC PATCH 17/25] hw/virtio: Use correct type sizes
Date: Thu, 20 May 2021 11:27:42 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 5/18/21 1:36 PM, Philippe Mathieu-Daudé wrote:
-static inline int virtio_lduw_p(VirtIODevice *vdev, const void *ptr)
+static inline uint16_t virtio_lduw_p(VirtIODevice *vdev, const void *ptr)

While this one looks obviously correct,

-static inline int virtio_ldl_p(VirtIODevice *vdev, const void *ptr)
+static inline uint32_t virtio_ldl_p(VirtIODevice *vdev, const void *ptr)
  {
      if (virtio_access_is_big_endian(vdev)) {
          return ldl_be_p(ptr);

this one isn't so obvious.

Are all of the users unsigned?  If so, should we rename it ldul?


r~




reply via email to

[Prev in Thread] Current Thread [Next in Thread]