mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Harry Wentland <harry.wentland@amd.com>
To: Stefan Agner <stefan@agner.ch>, Alex Deucher <alexander.deucher@amd.com>
Cc: "David Airlie" <airlied@linux.ie>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	amd-gfx@lists.freedesktop.org,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH] drm/amd/display: don't initialize result
Date: Tue, 26 Jun 2018 10:23:51 -0400	[thread overview]
Message-ID: <341abd6c-0ace-11fd-733d-d7d4eb4c71c2@amd.com> (raw)
In-Reply-To: <20180617085343.10760-1-stefan@agner.ch>

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
> 

      reply	other threads:[~2018-06-26 14:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-17  8:53 Stefan Agner
2018-06-26 14:23 ` Harry Wentland [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=341abd6c-0ace-11fd-733d-d7d4eb4c71c2@amd.com \
    --to=harry.wentland@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefan@agner.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®