2023-11-23 05:14:15

by Liu Ying

[permalink] [raw]
Subject: [PATCH v2] drm/bridge: imx93-mipi-dsi: Fix a couple of building warnings

Fix a couple of building warnings on used uninitialized 'best_m' and
'best_n' local variables by initializing 'best_m' to zero and 'best_n'
to UINT_MAX. This makes compiler happy only. No functional change.

Fixes: ce62f8ea7e3f ("drm/bridge: imx: Add i.MX93 MIPI DSI support")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Liu Ying <[email protected]>
---
v2:
* Initialize 'best_n' to UINT_MAX instead of zero. (Maxime)

drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c b/drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c
index 3ff30ce80c5b..2347f8dd632f 100644
--- a/drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c
+++ b/drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c
@@ -226,8 +226,8 @@ dphy_pll_get_configure_from_opts(struct imx93_dsi *dsi,
unsigned long fout;
unsigned long best_fout = 0;
unsigned int fvco_div;
- unsigned int min_n, max_n, n, best_n;
- unsigned long m, best_m;
+ unsigned int min_n, max_n, n, best_n = UINT_MAX;
+ unsigned long m, best_m = 0;
unsigned long min_delta = ULONG_MAX;
unsigned long delta;
u64 tmp;
--
2.37.1


2023-11-28 16:41:18

by Robert Foss

[permalink] [raw]
Subject: Re: [PATCH v2] drm/bridge: imx93-mipi-dsi: Fix a couple of building warnings

On Thu, 23 Nov 2023 13:18:07 +0800, Liu Ying wrote:
> Fix a couple of building warnings on used uninitialized 'best_m' and
> 'best_n' local variables by initializing 'best_m' to zero and 'best_n'
> to UINT_MAX. This makes compiler happy only. No functional change.
>
>

Applied, thanks!

[1/1] drm/bridge: imx93-mipi-dsi: Fix a couple of building warnings
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=9f83f37ca76d



Rob