Received: by 10.223.176.5 with SMTP id f5csp1153880wra; Fri, 9 Feb 2018 13:30:57 -0800 (PST) X-Google-Smtp-Source: AH8x22491SZnEmkvvsC5D16RLMBBiEhYICp29mrz18kCqZRpeA+sdE3x69k+PNgZ3xkiu4Fkd528 X-Received: by 2002:a17:902:bd4b:: with SMTP id b11-v6mr3806399plx.313.1518211857633; Fri, 09 Feb 2018 13:30:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518211857; cv=none; d=google.com; s=arc-20160816; b=CrlCm5lC2OCoVHJO+N4edKkTQRpwIPzTr9moPX22MtdNjSvGrMNnh4tL1mSju1qKh3 uLyiN49vMIJk4Ngp2cETe9lhw9J+Xq37jrtYtY/8poDZakN6bRlDr9DL0COU1TsdW0Y+ AK2J5jDlMIey4I5HLnhVRv2sYvp5zsvD5Pa6TpjcMSxnxNclleHkB6Rs7ILFFZcBZZpT /zjT7UikHR8LtODpuSRAHeWvWedPsWhm/v8UF9OIIjFnLzT31K2T52bEhLZULIL1pQNG KucAJtXPNLBw3TQRrd5X42CHl4eT9v3Ap1+p0MO+bx1jIsd3L7pXMOKSyh2F900W9cMi m0iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=gPhvn8Xzg43MdjStperCDcfgc+be3XIEPjylXwS5JOM=; b=VcBfMDDP+SEXlWCBj/XcsP849qvO0wA7vg1glTQVLpCTzrrrXLOmDtplipKocqjAIt dUnMYqUJjXqhJCXv9vl5KioVfinIwu1z1pEmYttiJRKwSBjy1h4NNQan1N2OfadcBm1I oaGBgUVoAKaLIyPjMgyOWW2JZCCn0HOu3DV4D58fjyKjtKADutZJve6pOqpayoe9aCDT eitA7CaKp9DjBRtni/y32VJj/wAj+t+Ng4UQia/eNJ92apezTb9U6crC/NT0RKP3zjTN T/iXaWuhQAjPqspTr1UtU9Ox4ZLo7a/5Kjk+9KUVctES3ZnD1JPObhueO2GQunO/psSk DpKA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 f21si1823458pgn.212.2018.02.09.13.30.42; Fri, 09 Feb 2018 13:30:57 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752932AbeBIV3S (ORCPT + 99 others); Fri, 9 Feb 2018 16:29:18 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:46430 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752776AbeBIV3R (ORCPT ); Fri, 9 Feb 2018 16:29:17 -0500 Received: by mail-pl0-f66.google.com with SMTP id 36so2028899ple.13 for ; Fri, 09 Feb 2018 13:29:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=gPhvn8Xzg43MdjStperCDcfgc+be3XIEPjylXwS5JOM=; b=BspXRONN6Oj2qwpIgc+MoZQxOItWuOPvUD950dNh9RSpcx24ncxQ1gnge6EKim4yaZ IABoUPjsG6ZVLBK8uxmHv9waYVyZdEAv+snDJqN3BsjUFwh67RUSN3tCxzqJxUxXTNJz iPWlC0vvz9z1ORCTIsEbPm1XLAdbknewoiavdDMCMhy4OMf45PgMl0NsPd14XciCBZ9D ckWlhcLXNkZ3rvHUEq4QP0BdEFIZDy/9ip5E+h6ctTi5z4nzo7h6JozinbgIe3nEVzRi YaObXE/wEj9Ee1x86kAaYIkQJoknKSt55JqyrsOc9I1366uT1MK4z0HsVD1ylke5fX4o 8zaA== X-Gm-Message-State: APf1xPCBXuIl4J6T1uwxS5pYc23qkVdKZmfxzZJ/8rmH5kvcPT7maJUz /wZPI+tgll6bEfXIm26AKDD7uA== X-Received: by 2002:a17:902:424:: with SMTP id 33-v6mr3681406ple.57.1518211756727; Fri, 09 Feb 2018 13:29:16 -0800 (PST) Received: from mka.mtv.corp.google.com ([2620:0:1000:1600:5ff4:666d:2881:a60]) by smtp.gmail.com with ESMTPSA id o63sm9779546pfa.101.2018.02.09.13.29.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Feb 2018 13:29:16 -0800 (PST) From: Matthias Kaehlcke To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Zhou , David Airlie , Harry Wentland , Tony Cheng , Dmytro Laktyushkin Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Guenter Roeck , Justin TerAvest , Craig Bergstrom , Matthias Kaehlcke Subject: [PATCH] amdgpu/dc: Add missing cast in dce_clock_set_min_clocks_state() Date: Fri, 9 Feb 2018 13:28:34 -0800 Message-Id: <20180209212834.72129-1-mka@chromium.org> X-Mailer: git-send-email 2.16.0.rc1.238.g530d649a79-goog Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 + }; if (clocks_state > clk->max_clks_state) { /*Requested state exceeds max supported state.*/ -- 2.16.0.rc1.238.g530d649a79-goog