Received: by 10.223.176.5 with SMTP id f5csp1191875wra; Fri, 9 Feb 2018 14:21:08 -0800 (PST) X-Google-Smtp-Source: AH8x225lIvj1OupcnSPZkqPZ98GyEhYWBzMPnJabJSGXzUFCaxC5fjpPQ8lJerbrK4uUQTmVE3q5 X-Received: by 2002:a17:902:221:: with SMTP id 30-v6mr3921892plc.134.1518214868753; Fri, 09 Feb 2018 14:21:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518214868; cv=none; d=google.com; s=arc-20160816; b=zwOOTcclUxFHGeYDpW5Oj/RofJLSC55072k/2gjoESMpBNhO3FIh0oLxB9gF4TqKXl Gctxk9saiPvFs/RApm3iZxggsq98RO4xKh5O/8wcD1V5LPS01Hd9iz2PeQuQeIuE8/uK 5Yl5VESIJLbN6ULt7n21nALRexyNE1Tk7CqAHyajLjAhfdTNUaJWyCkske1gYoX57E5H ph+hWvChLJmnoLqwMi2D8J9kE1EDTDMDsZw/RONhgRDvwPGPjor7IUh8PHjIRFh7xW90 D3e3iQV+Wnmyh/fQUqBpo+iPXD/YVCtVPWYMfVtsc8dSobrs6YHNCSbfIVRfijb8goZn 5jwA== 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:arc-authentication-results; bh=D6DVzRXpPrMaC5klooSjH+mKOCm4gEOsZtZ1x06uYdQ=; b=teuoUpXyNZdg15FHfzDpW8WeqKPtNmapz/zu1SYzKDW1aBiOD0DFmbhBqhuMFLLSfK zbXTvYlLEaK6XEJzxzLhCTSAodfxDVjnOvEi3a8aDKLcNMR7kYuDXTP7F3uQZlNJGOSN e4EFjGBAkLH14VhNidSSo6PQbUsnKdRwk3RQfMfQPGgs2OvdXZVEhEy6v4QHw9awTmU1 d16oPUthvnLRYPEYPkYtedSFQ8a14uXtuNfNwRaOKCesTu2Jqmln/J3Sb3WYQPWMeHkK UuTIe00hMNgRVbUlI0BbSntoQ4I4Lt8s33HevEhm6ygpDaJBKWo5AybDYSbXQh0wJl8m OmrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nZyHbGSi; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q123si1701041pga.94.2018.02.09.14.20.44; Fri, 09 Feb 2018 14:21:08 -0800 (PST) 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=@chromium.org header.s=google header.b=nZyHbGSi; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753081AbeBIWTp (ORCPT + 99 others); Fri, 9 Feb 2018 17:19:45 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:37879 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753006AbeBIWTn (ORCPT ); Fri, 9 Feb 2018 17:19:43 -0500 Received: by mail-pl0-f68.google.com with SMTP id ay8so2090755plb.4 for ; Fri, 09 Feb 2018 14:19:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=D6DVzRXpPrMaC5klooSjH+mKOCm4gEOsZtZ1x06uYdQ=; b=nZyHbGSi/54vdAfOzwNk6uXOc0QB2f+QBzq1ofiyYktk/WsMTqKlz8QxnpryfYmLOS XLz/aThogNVILZDIiWM58Own332hXYRClmSbqiwwhD/nlSMw+k7tcOKMgzqrlDnQ6vSM s5TpMCai/pOZwsyEZBnTIAfwe2925tcXHsEyw= 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=D6DVzRXpPrMaC5klooSjH+mKOCm4gEOsZtZ1x06uYdQ=; b=fvfqmJOtPQsXArsvE0M65mBJDaiVrM7fdckrGqsmccsgdRULq38+8+TnNrGt2iTEk9 TcBqDXB2tklDQOWxzAj/SmgDqkRgV+Qstea+hfmndD0h8LikM6FqVpTfg7Tz0mRpRdz7 5X3wDBOdba2x30UWPrdbf9Cys2/7jzVbukcyqbOdmso5tI1LPi4L+d9+l5nhBJXTcroj TzE5qK9nv8+HJrNSK95pvEo0W8AHfwgREWX9EAZmoK7TwJIwQ6PkcLJCqZvXcV92s2ny j5WCJ0HOLciUYBhUKyRY+incKGHC0w4QG+Kj/VPrpb7tinmDoU8RFKE/GUmE/RSYhSD1 iDHw== X-Gm-Message-State: APf1xPAoP7EU8KLOy1dyl05Cr5AA/w8u/FbCzHLUavV9hmBLJPGJjP0T YDgpzag3VSbTvAu/0thykriJOQ== X-Received: by 2002:a17:902:a5c5:: with SMTP id t5-v6mr3914468plq.160.1518214783154; Fri, 09 Feb 2018 14:19:43 -0800 (PST) Received: from localhost ([2620:0:1000:1600:5ff4:666d:2881:a60]) by smtp.gmail.com with ESMTPSA id k3sm6982667pff.41.2018.02.09.14.19.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Feb 2018 14:19:42 -0800 (PST) Date: Fri, 9 Feb 2018 14:19:41 -0800 From: Matthias Kaehlcke To: Harry Wentland Cc: Alex Deucher , Christian =?utf-8?B?S8O2bmln?= , David Zhou , David Airlie , Tony Cheng , Dmytro Laktyushkin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Guenter Roeck , Justin TerAvest , Craig Bergstrom Subject: Re: [PATCH] amdgpu/dc: Add missing cast in dce_clock_set_min_clocks_state() Message-ID: <20180209221941.GA79106@google.com> References: <20180209212834.72129-1-mka@chromium.org> <95c4b316-ee97-d7c9-a9d8-f2a7e0daa9e3@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <95c4b316-ee97-d7c9-a9d8-f2a7e0daa9e3@amd.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org El Fri, Feb 09, 2018 at 04:55:57PM -0500 Harry Wentland ha dit: > On 2018-02-09 04:28 PM, Matthias Kaehlcke wrote: > > dce_clock_set_min_clocks_state() assigns (intentionally) a value of type > > 'enum dm_pp_clocks_state' to a variable of type 'enum dm_pp_power_level' > > without an explicit cast. This causes clang to raise the following > > warning: > > > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clocks.c:308:4: error: > > implicit conversion from enumeration type 'enum dm_pp_clocks_state' > > to different enumeration type 'enum dm_pp_power_level' [-Werror,-Wenum-conversion] > > clocks_state }; > > > > Make the cast explicit. > > > > Signed-off-by: Matthias Kaehlcke > > --- > > drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c b/drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c > > index 9e98a5f39a6d..db3ceb283255 100644 > > --- a/drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c > > +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c > > @@ -304,7 +304,8 @@ static bool dce_clock_set_min_clocks_state( > > enum dm_pp_clocks_state clocks_state) > > { > > struct dm_pp_power_level_change_request level_change_req = { > > - clocks_state }; > > + .power_level = (enum dm_pp_power_level)clocks_state > > Thanks for spotting this. Looks like both enums are exactly the same so no need to keep both. I sent a patch to remove the dm_pp_power_level enum to amd-gfx and CC'd you on it. Even better, thanks!