From: Harry Wentland <harry.wentland@amd.com>
To: Nick Desaulniers <ndesaulniers@google.com>,
Nathan Chancellor <natechancellor@gmail.com>
Cc: sunpeng.li@amd.com, alexander.deucher@amd.com,
christian.koenig@amd.com, David1.Zhou@amd.com,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] drm/amd/display: Use proper enums in process_channel_reply
Date: Tue, 2 Oct 2018 10:55:18 -0400 [thread overview]
Message-ID: <1188b75c-9e4f-1c0b-f014-cfd958640caf@amd.com> (raw)
In-Reply-To: <CAKwvOdk1AM9K=GQtFb2dWOor8Py5O-t7Q6g-rYbygJtF_DpjbA@mail.gmail.com>
On 2018-09-27 02:11 PM, Nick Desaulniers wrote:
> On Thu, Sep 27, 2018 at 11:08 AM Nathan Chancellor
> <natechancellor@gmail.com> wrote:
>>
>> On Thu, Sep 27, 2018 at 11:06:33AM -0700, Nathan Chancellor wrote:
>>> Clang warns when one enumerated type is implicitly converted to another.
>>>
>>> drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:315:19: warning:
>>> implicit conversion from enumeration type 'enum
>>> aux_channel_operation_result' to different enumeration type 'enum
>>> aux_transaction_reply' [-Wenum-conversion]
>>> reply->status = AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON;
>>> ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> drivers/gpu/drm/amd/amdgpu/../display/dc/i2caux/dce110/aux_engine_dce110.c:349:19:
>>> warning: implicit conversion from enumeration type 'enum
>>> aux_channel_operation_result' to different enumeration type 'enum
>>> aux_transaction_reply' [-Wenum-conversion]
>>> reply->status = AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON;
>>> ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>> The current enum is incorrect, it should be from aux_transaction_reply,
>>> so use AUX_TRANSACTION_REPLY_HPD_DISCON.
>>>
>>> Reported-by: Nick Desaulniers <ndesaulniers@google.com>
>>> Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
>>> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Pulling it in through amd-staging-drm-next.
>
>>> ---
>>>
>>> v1 -> v2:
>>>
>>> * Rather than change status to an integer, use the proper enumerated
>>> type from aux_transaction reply as suggested by Nick and confirmed
>>> by Henry.
>>
>> Sigh Harry, sorry...
>
No worries. You're not the first to get that wrong. :)
Harry
> Thanks for the patch, Nathan. Don't worry about sending a v3 over
> this; its below the commit line so this detail wont get committed.
>
>>
>>>
>>> drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 2 +-
>>> .../gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c | 2 +-
>>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
>>> index 3f5b2e6f7553..aaeb7faac0c4 100644
>>> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
>>> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
>>> @@ -312,7 +312,7 @@ static void process_channel_reply(
>>>
>>> /* in case HPD is LOW, exit AUX transaction */
>>> if ((sw_status & AUX_SW_STATUS__AUX_SW_HPD_DISCON_MASK)) {
>>> - reply->status = AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON;
>>> + reply->status = AUX_TRANSACTION_REPLY_HPD_DISCON;
>>> return;
>>> }
>>>
>>> diff --git a/drivers/gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c b/drivers/gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c
>>> index 8eee8ace1259..59c3ed43d609 100644
>>> --- a/drivers/gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c
>>> +++ b/drivers/gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c
>>> @@ -346,7 +346,7 @@ static void process_channel_reply(
>>>
>>> /* in case HPD is LOW, exit AUX transaction */
>>> if ((sw_status & AUX_SW_STATUS__AUX_SW_HPD_DISCON_MASK)) {
>>> - reply->status = AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON;
>>> + reply->status = AUX_TRANSACTION_REPLY_HPD_DISCON;
>>> return;
>>> }
>>>
>>> --
>>> 2.19.0
>>>
>
>
>
prev parent reply other threads:[~2018-10-02 14:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-21 21:55 [PATCH] drm/amd/display: Change status's type in aux_reply_transaction_data Nathan Chancellor
2018-09-24 22:07 ` Nick Desaulniers
2018-09-24 22:22 ` Nathan Chancellor
2018-09-27 10:03 ` Harry Wentland
2018-09-27 18:06 ` [PATCH v2] drm/amd/display: Use proper enums in process_channel_reply Nathan Chancellor
2018-09-27 18:08 ` Nathan Chancellor
2018-09-27 18:11 ` Nick Desaulniers
2018-10-02 14:55 ` 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=1188b75c-9e4f-1c0b-f014-cfd958640caf@amd.com \
--to=harry.wentland@amd.com \
--cc=David1.Zhou@amd.com \
--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=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=sunpeng.li@amd.com \
/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®