]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
video: hdmi: Change return type of hdmi_avi_infoframe_init() to void
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 26 Feb 2020 11:24:21 +0000 (13:24 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 26 Feb 2020 11:31:18 +0000 (13:31 +0200)
The hdmi_avi_infoframe_init() never needs to return an error, change its
return type to void.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200226112514.12455-2-laurent.pinchart@ideasonboard.com
drivers/gpu/drm/drm_edid.c
drivers/video/hdmi.c
include/linux/hdmi.h

index ec10dc3e859c9f4a0fa4de5981d5e834d84d0427..5f3bc3486fde106a6d2c2988f2e9e6a2b10caef5 100644 (file)
@@ -5449,14 +5449,11 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
 {
        enum hdmi_picture_aspect picture_aspect;
        u8 vic, hdmi_vic;
-       int err;
 
        if (!frame || !mode)
                return -EINVAL;
 
-       err = hdmi_avi_infoframe_init(frame);
-       if (err < 0)
-               return err;
+       hdmi_avi_infoframe_init(frame);
 
        if (mode->flags & DRM_MODE_FLAG_DBLCLK)
                frame->pixel_repeat = 1;
index 9c82e2a0a41117aab8b1051dfae76f1917b0aaa9..856a8c4e84a25a895d355ace01da87dbe201edfb 100644 (file)
@@ -53,18 +53,14 @@ static void hdmi_infoframe_set_checksum(void *buffer, size_t size)
 /**
  * hdmi_avi_infoframe_init() - initialize an HDMI AVI infoframe
  * @frame: HDMI AVI infoframe
- *
- * Returns 0 on success or a negative error code on failure.
  */
-int hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame)
+void hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame)
 {
        memset(frame, 0, sizeof(*frame));
 
        frame->type = HDMI_INFOFRAME_TYPE_AVI;
        frame->version = 2;
        frame->length = HDMI_AVI_INFOFRAME_SIZE;
-
-       return 0;
 }
 EXPORT_SYMBOL(hdmi_avi_infoframe_init);
 
@@ -1553,7 +1549,6 @@ static int hdmi_avi_infoframe_unpack(struct hdmi_avi_infoframe *frame,
                                     const void *buffer, size_t size)
 {
        const u8 *ptr = buffer;
-       int ret;
 
        if (size < HDMI_INFOFRAME_SIZE(AVI))
                return -EINVAL;
@@ -1566,9 +1561,7 @@ static int hdmi_avi_infoframe_unpack(struct hdmi_avi_infoframe *frame,
        if (hdmi_infoframe_checksum(buffer, HDMI_INFOFRAME_SIZE(AVI)) != 0)
                return -EINVAL;
 
-       ret = hdmi_avi_infoframe_init(frame);
-       if (ret)
-               return ret;
+       hdmi_avi_infoframe_init(frame);
 
        ptr += HDMI_INFOFRAME_HEADER_SIZE;
 
index 9918a6c910c55f5d03a166e301d9890013529fa8..9613d796cfb1772a97f225e79936fe21a68e224b 100644 (file)
@@ -207,7 +207,7 @@ struct hdmi_drm_infoframe {
        u16 max_fall;
 };
 
-int hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame);
+void hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame);
 ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_infoframe *frame, void *buffer,
                                size_t size);
 ssize_t hdmi_avi_infoframe_pack_only(const struct hdmi_avi_infoframe *frame,