# \[PATCH 1/1\] video: exynos\_dp: Fix compilation warning

- Subsystems: FRAMEBUFFER LAYER, THE REST
- Maintainers: Helge Deller, Linus Torvalds
- List: linux-fbdev
- 2 messages, 2 authors
- Page: https://ratatoskr.run/linux-fbdev/2012/06/13463300/t

## \[PATCH 1/1\] video: exynos\_dp: Fix compilation warning

- From: Sachin Kamat \<hidden\>
- Date: 2012-06-18 05:07:17 
- Message: https://ratatoskr.run/linux-fbdev/2012/06/13463300.md

```text
Fixes the following warning:
drivers/video/exynos/exynos_dp_core.c: In function ‘exynos_dp_set_link_train’:
drivers/video/exynos/exynos_dp_core.c:529:18: warning: ‘reg’ may be used uninitialized in this function [-Wuninitialized]
drivers/video/exynos/exynos_dp_core.c:395:6: note: ‘reg’ was declared here

Signed-off-by: Sachin Kamat <redacted>
---
 drivers/video/exynos/exynos_dp_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c
index a36b2d2..017c727 100644
--- a/drivers/video/exynos/exynos_dp_core.c
+++ b/drivers/video/exynos/exynos_dp_core.c
@@ -392,7 +392,7 @@ static unsigned int exynos_dp_get_lane_link_training(
 				struct exynos_dp_device *dp,
 				int lane)
 {
-	u32 reg;
+	u32 reg = 0;
 
 	switch (lane) {
 	case 0:
-- 
1.7.4.1

```

## RE: \[PATCH 1/1\] video: exynos\_dp: Fix compilation warning

- From: Jingoo Han \<hidden\>
- Date: 2012-06-18 05:22:01 
- Message: https://ratatoskr.run/linux-fbdev/2012/06/13463301.md

```text

On Mon, June 18, 2012 at 1:55 PM, Sachin Kamat wrote:

> Fixes the following warning:
> drivers/video/exynos/exynos_dp_core.c: In function ‘exynos_dp_set_link_train’:
> drivers/video/exynos/exynos_dp_core.c:529:18: warning: ‘reg’ may be used uninitialized in this function
> [-Wuninitialized]
> drivers/video/exynos/exynos_dp_core.c:395:6: note: ‘reg’ was declared here

This warning was already reported and patch was submitted by Olof Johansson.
I will check and fix it later.

Thank you.

> 
> Signed-off-by: Sachin Kamat <redacted>
> ---
>  drivers/video/exynos/exynos_dp_core.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c
> index a36b2d2..017c727 100644
> --- a/drivers/video/exynos/exynos_dp_core.c
> +++ b/drivers/video/exynos/exynos_dp_core.c
> @@ -392,7 +392,7 @@ static unsigned int exynos_dp_get_lane_link_training(
>  				struct exynos_dp_device *dp,
>  				int lane)
>  {
> -	u32 reg;
> +	u32 reg = 0;
> 
>  	switch (lane) {
>  	case 0:
> --
> 1.7.4.1

```
