Message ID | 20200506123356.9147-1-bernard@vivo.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 3cda3d31c50cb03d41880d8c5d83ed16e16b3a9d |
Headers | show |
Series | [v2] drm/mediatek: cleanup coding style in mediatek a bit | expand |
Hi, Bernard: Bernard Zhao <bernard@vivo.com> 於 2020年5月6日 週三 下午8:34寫道: > > This code change is to make code bit more readable. > Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> > Signed-off-by: Bernard Zhao <bernard@vivo.com> > --- > drivers/gpu/drm/mediatek/mtk_hdmi.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c > index ff43a3d80410..43e9876fd50c 100644 > --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c > +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c > @@ -311,14 +311,10 @@ static void mtk_hdmi_hw_send_info_frame(struct mtk_hdmi *hdmi, u8 *buffer, > u8 checksum; > int ctrl_frame_en = 0; > > - frame_type = *buffer; > - buffer += 1; > - frame_ver = *buffer; > - buffer += 1; > - frame_len = *buffer; > - buffer += 1; > - checksum = *buffer; > - buffer += 1; > + frame_type = *buffer++; > + frame_ver = *buffer++; > + frame_len = *buffer++; > + checksum = *buffer++; > frame_data = buffer; > > dev_dbg(hdmi->dev, > -- > 2.26.2 >
Hi, Bernard: Bernard Zhao <bernard@vivo.com> 於 2020年5月6日 週三 下午8:34寫道: > > This code change is to make code bit more readable. > Applied to mediatek-drm-next [1], thanks. [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next Regards, Chun-Kuang > Signed-off-by: Bernard Zhao <bernard@vivo.com> > --- > drivers/gpu/drm/mediatek/mtk_hdmi.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c > index ff43a3d80410..43e9876fd50c 100644 > --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c > +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c > @@ -311,14 +311,10 @@ static void mtk_hdmi_hw_send_info_frame(struct mtk_hdmi *hdmi, u8 *buffer, > u8 checksum; > int ctrl_frame_en = 0; > > - frame_type = *buffer; > - buffer += 1; > - frame_ver = *buffer; > - buffer += 1; > - frame_len = *buffer; > - buffer += 1; > - checksum = *buffer; > - buffer += 1; > + frame_type = *buffer++; > + frame_ver = *buffer++; > + frame_len = *buffer++; > + checksum = *buffer++; > frame_data = buffer; > > dev_dbg(hdmi->dev, > -- > 2.26.2 >
diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c index ff43a3d80410..43e9876fd50c 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c @@ -311,14 +311,10 @@ static void mtk_hdmi_hw_send_info_frame(struct mtk_hdmi *hdmi, u8 *buffer, u8 checksum; int ctrl_frame_en = 0; - frame_type = *buffer; - buffer += 1; - frame_ver = *buffer; - buffer += 1; - frame_len = *buffer; - buffer += 1; - checksum = *buffer; - buffer += 1; + frame_type = *buffer++; + frame_ver = *buffer++; + frame_len = *buffer++; + checksum = *buffer++; frame_data = buffer; dev_dbg(hdmi->dev,
This code change is to make code bit more readable. Signed-off-by: Bernard Zhao <bernard@vivo.com> --- drivers/gpu/drm/mediatek/mtk_hdmi.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)