For this series, we do some clean-up and fix a build warning.
This series is based on linux-next-20220915.
Changes for v2:
1. Update commit message in "drm/mediatek: dp: Reduce indentation in mtk_dp_bdg_detect()".
2. Add fix tag for "drm/mediatek: dp: Fix warning in mtk_dp_video_mute()".
Bo-Chen Chen (3):
drm/mediatek: dp: Reduce indentation in mtk_dp_bdg_detect()
drm/mediatek: dp: Remove unused register definitions
drm/mediatek: dp: Fix warning in mtk_dp_video_mute()
drivers/gpu/drm/mediatek/mtk_dp.c | 70 ++++++++++++++-------------
drivers/gpu/drm/mediatek/mtk_dp_reg.h | 6 ---
2 files changed, 36 insertions(+), 40 deletions(-)
--
2.18.0
Warning:
../drivers/gpu/drm/mediatek/mtk_dp.c: In function ‘mtk_dp_video_mute’:
../drivers/gpu/drm/mediatek/mtk_dp.c:947:23: warning: format ‘%x’
expects argument of type ‘unsigned int’, but argument 4 has type ‘long
unsigned int’ [-Wformat=]
947 | dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: 0x%x, ret: 0x%lx-0x%lx\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/dev_printk.h:129:27: note: in definition of macro ‘dev_printk’
129 | _dev_printk(level, dev, fmt, ##__VA_ARGS__); \
| ^~~
../include/linux/dev_printk.h:163:31: note: in expansion of macro ‘dev_fmt’
163 | dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
| ^~~~~~~
../drivers/gpu/drm/mediatek/mtk_dp.c:947:2: note: in expansion of
macro ‘dev_dbg’
947 | dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: 0x%x, ret: 0x%lx-0x%lx\n",
| ^~~~~~~
../drivers/gpu/drm/mediatek/mtk_dp.c:947:36: note: format string is defined here
947 | dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: 0x%x, ret: 0x%lx-0x%lx\n",
| ~^
| |
| unsigned int
| %lx
To fix this issue, we use %s to replace 0x%x.
Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver")
Reported-by: Chun-Kuang Hu <[email protected]>
Signed-off-by: Bo-Chen Chen <[email protected]>
Reviewed-by: Matthias Brugger <[email protected]>
---
drivers/gpu/drm/mediatek/mtk_dp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c
index c72c646e25e9..d58e98b2f83a 100644
--- a/drivers/gpu/drm/mediatek/mtk_dp.c
+++ b/drivers/gpu/drm/mediatek/mtk_dp.c
@@ -1222,8 +1222,8 @@ static void mtk_dp_video_mute(struct mtk_dp *mtk_dp, bool enable)
mtk_dp->data->smc_cmd, enable,
0, 0, 0, 0, 0, &res);
- dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: 0x%x, ret: 0x%lx-0x%lx\n",
- mtk_dp->data->smc_cmd, enable, res.a0, res.a1);
+ dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: %s, ret: 0x%lx-0x%lx\n",
+ mtk_dp->data->smc_cmd, enable ? "enable" : "disable", res.a0, res.a1);
}
static void mtk_dp_audio_mute(struct mtk_dp *mtk_dp, bool mute)
--
2.18.0
Hi, Bo-Chen:
Bo-Chen Chen <[email protected]> 於 2022年9月16日 週五 晚上9:38寫道:
>
> Warning:
> ../drivers/gpu/drm/mediatek/mtk_dp.c: In function ‘mtk_dp_video_mute’:
> ../drivers/gpu/drm/mediatek/mtk_dp.c:947:23: warning: format ‘%x’
> expects argument of type ‘unsigned int’, but argument 4 has type ‘long
> unsigned int’ [-Wformat=]
> 947 | dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: 0x%x, ret: 0x%lx-0x%lx\n",
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../include/linux/dev_printk.h:129:27: note: in definition of macro ‘dev_printk’
> 129 | _dev_printk(level, dev, fmt, ##__VA_ARGS__); \
> | ^~~
> ../include/linux/dev_printk.h:163:31: note: in expansion of macro ‘dev_fmt’
> 163 | dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
> | ^~~~~~~
> ../drivers/gpu/drm/mediatek/mtk_dp.c:947:2: note: in expansion of
> macro ‘dev_dbg’
> 947 | dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: 0x%x, ret: 0x%lx-0x%lx\n",
> | ^~~~~~~
> ../drivers/gpu/drm/mediatek/mtk_dp.c:947:36: note: format string is defined here
> 947 | dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: 0x%x, ret: 0x%lx-0x%lx\n",
> | ~^
> | |
> | unsigned int
> | %lx
>
> To fix this issue, we use %s to replace 0x%x.
Acked-by: Chun-Kuang Hu <[email protected]>
>
> Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver")
> Reported-by: Chun-Kuang Hu <[email protected]>
> Signed-off-by: Bo-Chen Chen <[email protected]>
> Reviewed-by: Matthias Brugger <[email protected]>
> ---
> drivers/gpu/drm/mediatek/mtk_dp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c
> index c72c646e25e9..d58e98b2f83a 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dp.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dp.c
> @@ -1222,8 +1222,8 @@ static void mtk_dp_video_mute(struct mtk_dp *mtk_dp, bool enable)
> mtk_dp->data->smc_cmd, enable,
> 0, 0, 0, 0, 0, &res);
>
> - dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: 0x%x, ret: 0x%lx-0x%lx\n",
> - mtk_dp->data->smc_cmd, enable, res.a0, res.a1);
> + dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: %s, ret: 0x%lx-0x%lx\n",
> + mtk_dp->data->smc_cmd, enable ? "enable" : "disable", res.a0, res.a1);
> }
>
> static void mtk_dp_audio_mute(struct mtk_dp *mtk_dp, bool mute)
> --
> 2.18.0
>
Hi, Dmitry:
My tree has no mtk-dp driver yet. Would you like to pick this series?
Regards,
Chun-Kuang.
Bo-Chen Chen <[email protected]> 於 2022年9月16日 週五 晚上9:38寫道:
>
> For this series, we do some clean-up and fix a build warning.
> This series is based on linux-next-20220915.
>
> Changes for v2:
> 1. Update commit message in "drm/mediatek: dp: Reduce indentation in mtk_dp_bdg_detect()".
> 2. Add fix tag for "drm/mediatek: dp: Fix warning in mtk_dp_video_mute()".
>
> Bo-Chen Chen (3):
> drm/mediatek: dp: Reduce indentation in mtk_dp_bdg_detect()
> drm/mediatek: dp: Remove unused register definitions
> drm/mediatek: dp: Fix warning in mtk_dp_video_mute()
>
> drivers/gpu/drm/mediatek/mtk_dp.c | 70 ++++++++++++++-------------
> drivers/gpu/drm/mediatek/mtk_dp_reg.h | 6 ---
> 2 files changed, 36 insertions(+), 40 deletions(-)
>
> --
> 2.18.0
>
Il 16/09/22 15:38, Bo-Chen Chen ha scritto:
> Warning:
> ../drivers/gpu/drm/mediatek/mtk_dp.c: In function ‘mtk_dp_video_mute’:
> ../drivers/gpu/drm/mediatek/mtk_dp.c:947:23: warning: format ‘%x’
> expects argument of type ‘unsigned int’, but argument 4 has type ‘long
> unsigned int’ [-Wformat=]
> 947 | dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: 0x%x, ret: 0x%lx-0x%lx\n",
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../include/linux/dev_printk.h:129:27: note: in definition of macro ‘dev_printk’
> 129 | _dev_printk(level, dev, fmt, ##__VA_ARGS__); \
> | ^~~
> ../include/linux/dev_printk.h:163:31: note: in expansion of macro ‘dev_fmt’
> 163 | dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
> | ^~~~~~~
> ../drivers/gpu/drm/mediatek/mtk_dp.c:947:2: note: in expansion of
> macro ‘dev_dbg’
> 947 | dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: 0x%x, ret: 0x%lx-0x%lx\n",
> | ^~~~~~~
> ../drivers/gpu/drm/mediatek/mtk_dp.c:947:36: note: format string is defined here
> 947 | dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: 0x%x, ret: 0x%lx-0x%lx\n",
> | ~^
> | |
> | unsigned int
> | %lx
>
> To fix this issue, we use %s to replace 0x%x.
>
> Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver")
> Reported-by: Chun-Kuang Hu <[email protected]>
> Signed-off-by: Bo-Chen Chen <[email protected]>
> Reviewed-by: Matthias Brugger <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Hello Chun-Kuang,
18.09.2022 06:17, Chun-Kuang Hu пишет:
> Hi, Dmitry:
>
> My tree has no mtk-dp driver yet. Would you like to pick this series?
>
> Regards,
> Chun-Kuang.
>
> Bo-Chen Chen <[email protected]> 於 2022年9月16日 週五 晚上9:38寫道:
>>
>> For this series, we do some clean-up and fix a build warning.
>> This series is based on linux-next-20220915.
>>
>> Changes for v2:
>> 1. Update commit message in "drm/mediatek: dp: Reduce indentation in mtk_dp_bdg_detect()".
>> 2. Add fix tag for "drm/mediatek: dp: Fix warning in mtk_dp_video_mute()".
I changed commit message of the "Fix warning in mtk_dp_video_mute()"
patch to make it less noisy and applied all the patches to drm-misc-next.