Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2339825imm; Thu, 27 Sep 2018 11:09:22 -0700 (PDT) X-Google-Smtp-Source: ACcGV62KuDZ3UyXDHxuNWwslBLYmG9DbBChi0Nv1qeNVbXLDy0GEIhD1mgdowRSmoDKoWLPui3gC X-Received: by 2002:a63:30c8:: with SMTP id w191-v6mr11175509pgw.447.1538071762570; Thu, 27 Sep 2018 11:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538071762; cv=none; d=google.com; s=arc-20160816; b=Y7y2lclFf55Y/VVZFf/mOG58VMloIVVQZXcpKBoHCwXgnavkVkbJF2VNZYY4afbAGf 7zLYLBY8JzwcJD6xbobCf0QZVAsZlGlewq2/WuorbhCLMu9mRI6h3lEpAXiXDcI94BEI J6XJzDoHfAQnzzgky4fzPT8tn7QPvOgoBpMV8XmECMC2p5vbHLC3/zTNJX/a5CNSUHIH zHsT7A5VcSDYEDynFC3gJ9hyRd0W9Prc8B9b0SW1qplHfbzoZt5VLKVg3nZECVSiQezV ZqhuL4U5Lmgsk/JSDQbL56ZsEWsnt7zOt9e1C7AXWJPvHg4omqqFrW73OAs7WSLF5vbZ 2B6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=flRR8F8OTkIYxE6BzPRv1OhgkiIEInLPjiA3JO1lvWo=; b=Gh3/v9JKIImZWIjUCTTSlAnM1GvQv/J2L/qBE9fm8BNzS84oFYvyb0owoK6pNn2v0L OGH5Gip05aiHRtIzejy4txKus9azptCgjtwpdAMybQ9DcpeH980+u+Jjx5QeLKvM+IlQ D7GB8Wx2iy7BxWhdQMComPe4ppnXtRsxTV1o3TrPVcos9m69r7nRCga39p15unhQs/ws RYyTpqwmmIGrZytmrsZkuPy12hW36ZD9NxjC0gXSLzlEAtSIVABv+HktVX8flgqWlAw4 j6l9ZyeepSudYZRPmh0tA71SFdLBURBxNIxJwnHS0zaBoSkdTFE12Mw0QY+v555h38nO YiVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XW6P1xw+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s26-v6si2545527pge.339.2018.09.27.11.08.58; Thu, 27 Sep 2018 11:09:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XW6P1xw+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728427AbeI1A1w (ORCPT + 99 others); Thu, 27 Sep 2018 20:27:52 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43231 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727404AbeI1A1w (ORCPT ); Thu, 27 Sep 2018 20:27:52 -0400 Received: by mail-wr1-f65.google.com with SMTP id z14-v6so3599873wrs.10 for ; Thu, 27 Sep 2018 11:08:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=flRR8F8OTkIYxE6BzPRv1OhgkiIEInLPjiA3JO1lvWo=; b=XW6P1xw++wewyLQcaRWr5E29CjWVT5J9cDQ+bKO5vKxmBn4+bpuW17VUUQR2pgwYZs Oq9nbzouyo9xeOSTDnAXsRIYqh+kh8LMB43mbHGwYR9YT71AgMf5h72qT2cr7PKYV3qs SXhiFEiF6eiaX8uJkDMPgWHJ5nj5is3eELOWtMHI5Z0YksnVo5jjIDUvZBvXRFt8J79S hN0Mh4zOWeZfhIjvZojBXcWCbf6TXjU0yo9+oRlgwY5ExPInYji3mQceq81j4gof9Ki4 PvD5MvJBW6bEgXitzEgZjuBc5Mvuf9dq4+3vbjFuBTjOX+LUl7zfiOSlHT1RWKEvp892 qqsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=flRR8F8OTkIYxE6BzPRv1OhgkiIEInLPjiA3JO1lvWo=; b=EtrdCVfAk/Jg0qYKqrhOXV0o8osUCUuj+tM94le4Xxbp8JJlAwSVCn7ophIuEBEGBH mJIDOMYXImDyLW5uWs77lKuNyA4HCpVdtEqT+NEec0KWkLHSiTr21gszXUDaiGjPaoRG xoXQbAPQmr1gixhno185MpxtVgbetG6axd/WNkchvvjzdijaxAuNcPf9UmNR1UUHBaiq J1lM8nb/AgoeAOKiQcAgIxwMDpSeVEasmTS1DUbg/evVWESQvze5SlCtKpkjcFMbUoHf 5Vg+p5rBICSPIWamZdTe62HtKNiHYWCSl3eyUNEe3b7HB/hOv0H8ZfLL++cUEDUu1XPN 1IYQ== X-Gm-Message-State: ABuFfoiLqvSk0n3i8rD7r2Wo51Xzaog/uFCToBtC7w9Oed3cneLQSeZj i4UMwHwInka5bWq78Mf+aTo= X-Received: by 2002:adf:fccc:: with SMTP id f12-v6mr2538914wrs.166.1538071698177; Thu, 27 Sep 2018 11:08:18 -0700 (PDT) Received: from flashbox ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id u23-v6sm3731846wrc.42.2018.09.27.11.08.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Sep 2018 11:08:17 -0700 (PDT) Date: Thu, 27 Sep 2018 11:08:16 -0700 From: Nathan Chancellor To: Harry Wentland , Leo Li , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , "David (ChunMing) Zhou" Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Nick Desaulniers Subject: Re: [PATCH v2] drm/amd/display: Use proper enums in process_channel_reply Message-ID: <20180927180816.GA12545@flashbox> References: <20180921215505.14634-1-natechancellor@gmail.com> <20180927180632.11520-1-natechancellor@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180927180632.11520-1-natechancellor@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Suggested-by: Nick Desaulniers > Signed-off-by: Nathan Chancellor > --- > > 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... > > 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 >