From: Bernard Zhao <bernard@vivo.com>
To: "Bartlomiej Zolnierkiewicz" <b.zolnierkie@samsung.com>,
"Uma Shankar" <uma.shankar@intel.com>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Shashank Sharma" <shashank.sharma@intel.com>,
"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
"Daniel Vetter" <daniel.vetter@ffwll.ch>,
"Bernard Zhao" <bernard@vivo.com>,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com
Subject: [PATCH] drivers/video: cleanup coding style in video a bit
Date: Mon, 27 Apr 2020 01:05:23 -0700 [thread overview]
Message-ID: <20200427080530.3234-1-bernard@vivo.com> (raw)
Eliminate the magic numbers, add vender infoframe size macro
like other hdmi modules.
Signed-off-by: Bernard Zhao <bernard@vivo.com>
---
drivers/video/hdmi.c | 2 +-
include/linux/hdmi.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c
index 856a8c4e84a2..f693076f2e5f 100644
--- a/drivers/video/hdmi.c
+++ b/drivers/video/hdmi.c
@@ -495,7 +495,7 @@ int hdmi_vendor_infoframe_init(struct hdmi_vendor_infoframe *frame)
* value
*/
frame->s3d_struct = HDMI_3D_STRUCTURE_INVALID;
- frame->length = 4;
+ frame->length = HDMI_VENDOR_INFOFRAME_SIZE;
return 0;
}
diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
index 9613d796cfb1..ff25aeb95ee4 100644
--- a/include/linux/hdmi.h
+++ b/include/linux/hdmi.h
@@ -57,6 +57,7 @@ enum hdmi_infoframe_type {
#define HDMI_SPD_INFOFRAME_SIZE 25
#define HDMI_AUDIO_INFOFRAME_SIZE 10
#define HDMI_DRM_INFOFRAME_SIZE 26
+#define HDMI_VENDOR_INFOFRAME_SIZE 4
#define HDMI_INFOFRAME_SIZE(type) \
(HDMI_INFOFRAME_HEADER_SIZE + HDMI_ ## type ## _INFOFRAME_SIZE)
--
2.26.2
next reply other threads:[~2020-04-27 8:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200427080542eucas1p172bdcfd22affc288ec1ceaadf0dad2b0@eucas1p1.samsung.com>
2020-04-27 8:05 ` Bernard Zhao [this message]
2020-05-08 1:53 ` Re:[PATCH] drivers/video: cleanup coding style in video a bit Bernard
2020-06-01 13:25 ` [PATCH] " Bartlomiej Zolnierkiewicz
2020-04-27 8:36 Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200427080530.3234-1-bernard@vivo.com \
--to=bernard@vivo.com \
--cc=b.zolnierkie@samsung.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=opensource.kernel@vivo.com \
--cc=shashank.sharma@intel.com \
--cc=uma.shankar@intel.com \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).