drm/vkms: Fix cpu_to_le16()/le16_to_cpu() warnings
authorJosé Expósito <jose.exposito89@gmail.com>
Tue, 16 Jul 2024 16:17:26 +0000 (18:17 +0200)
committerJosé Expósito <jose.exposito89@gmail.com>
Thu, 8 Aug 2024 08:04:13 +0000 (10:04 +0200)
commit17419a5c8c75e1f9de01b094f763ec1c6ad02979
tree1ee942bf8177949422d39c799939d4ff76735c67
parentf7f3ddb6e5c8dc7b621fd8c0903ea42190d67452
drm/vkms: Fix cpu_to_le16()/le16_to_cpu() warnings

Building with Sparse enabled prints this warning for cpu_to_le16()
calls:

    warning: incorrect type in assignment (different base types)
        expected unsigned short [usertype]
        got restricted __le16 [usertype]

And this warning for le16_to_cpu() calls:

    warning: cast to restricted __le16

Declare the target buffer as __le16 to fix both warnings.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Acked-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240716161725.41408-2-jose.exposito89@gmail.com
drivers/gpu/drm/vkms/vkms_formats.c