* [PATCH] drm/amd/display: don't initialize result
@ 2018-06-17 8:53 Stefan Agner
[not found] ` <20180617085343.10760-1-stefan-XLVq0VzYD2Y@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Agner @ 2018-06-17 8:53 UTC (permalink / raw)
To: Alex Deucher
Cc: David Airlie, linux-kernel, dri-devel, amd-gfx,
Christian König
The wrong enum type is used to initialize the result, leading to a
warning when using clang:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:1998:26: warning:
implicit conversion from enumeration type 'enum ddc_result' to different
enumeration type 'enum dc_status' [-Wenum-conversion]
enum dc_status result = DDC_RESULT_UNKNOWN;
~~~~~~ ^~~~~~~~~~~~~~~~~~
1 warning generated.
Initialization of result is unnecessary anyway, just drop the
initialization.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index 7857cb42b3e6..1dbfbfc0fd45 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -1995,7 +1995,7 @@ bool dc_link_handle_hpd_rx_irq(struct dc_link *link, union hpd_irq_data *out_hpd
{
union hpd_irq_data hpd_irq_dpcd_data = {{{{0}}}};
union device_service_irq device_service_clear = { { 0 } };
- enum dc_status result = DDC_RESULT_UNKNOWN;
+ enum dc_status result;
bool status = false;
/* For use cases related to down stream connection status change,
* PSR and device auto test, refer to function handle_sst_hpd_irq
--
2.17.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amd/display: don't initialize result
[not found] ` <20180617085343.10760-1-stefan-XLVq0VzYD2Y@public.gmane.org>
@ 2018-06-26 14:23 ` Harry Wentland
0 siblings, 0 replies; 2+ messages in thread
From: Harry Wentland @ 2018-06-26 14:23 UTC (permalink / raw)
To: Stefan Agner, Alex Deucher
Cc: David Airlie, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Christian König
On 2018-06-17 04:53 AM, Stefan Agner wrote:
> The wrong enum type is used to initialize the result, leading to a
> warning when using clang:
> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:1998:26: warning:
> implicit conversion from enumeration type 'enum ddc_result' to different
> enumeration type 'enum dc_status' [-Wenum-conversion]
> enum dc_status result = DDC_RESULT_UNKNOWN;
> ~~~~~~ ^~~~~~~~~~~~~~~~~~
> 1 warning generated.
>
> Initialization of result is unnecessary anyway, just drop the
> initialization.
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
Thanks for the patch.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Ill merge this today.
Harry
> ---
> drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> index 7857cb42b3e6..1dbfbfc0fd45 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> @@ -1995,7 +1995,7 @@ bool dc_link_handle_hpd_rx_irq(struct dc_link *link, union hpd_irq_data *out_hpd
> {
> union hpd_irq_data hpd_irq_dpcd_data = {{{{0}}}};
> union device_service_irq device_service_clear = { { 0 } };
> - enum dc_status result = DDC_RESULT_UNKNOWN;
> + enum dc_status result;
> bool status = false;
> /* For use cases related to down stream connection status change,
> * PSR and device auto test, refer to function handle_sst_hpd_irq
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-26 14:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-17 8:53 [PATCH] drm/amd/display: don't initialize result Stefan Agner
[not found] ` <20180617085343.10760-1-stefan-XLVq0VzYD2Y@public.gmane.org>
2018-06-26 14:23 ` Harry Wentland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox