Received: by 10.223.176.5 with SMTP id f5csp1172707wra; Fri, 9 Feb 2018 13:57:07 -0800 (PST) X-Google-Smtp-Source: AH8x224gcCqVbLx1s6iDmgawKDoEuxKRFlHKAdwoTqfiRnHMPN9tQaYqZ2Cwv3syOmOA89vCcC+k X-Received: by 10.98.75.206 with SMTP id d75mr416893pfj.77.1518213427243; Fri, 09 Feb 2018 13:57:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518213427; cv=none; d=google.com; s=arc-20160816; b=Grlojq7DVWsq3Cua8k4hO0JX0eHKukyaPrc6T//FHpBMzKz/SS3fQ4I19OjCmkThko qxxHCptNOcDQgjb7UNYh8XkYEsuoH/E6ITHsxPQ+6+P3O7cBVNwa/4MosRWjJEra3oCu HrT1ohKj4ARdqPaFh3SshkQCbCAwGQUFXJ5E0Fo50j4AX28zkWPNcd1oKGIauK1uqDAb 31B7g/7YJ3kNPH0MUvv+e5a/ckGedETpVFRg/OxUSjQJBD91VJc11jFiZr0vXyGyw3aA 3ZHrina96q1c2bP9j+eS0XaBvO0J7DKVin/bpmlk1sYgrH9qCZt4Pxojjw3Dxv+dJEhy cHnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=6ClMN/Z14pntrgaIPi8C6D5Gs3REYzbHMCi5UKbk/u0=; b=PPDXzUGAFqU6wIm3+6syA0S581PZotHI+/l7G3X+f45zUzZqdxv2+FdLTFj/86te1r sUrkCYw86cEY52gynIeCFru/R3DAUWGYEKh0bnMvE3cRbHlEeZ7ygMxu/xvwRiU2+sDH 8GT9XZ8lINPKu286YAgc2n1oFq+oi571t8RUmY3AQ24WGOXZwNKh2kzn1mZH9SGlIz3s yAb4P4QJA+eE9EsJUGIxLUWOYHypyRJtbWwuR5Yq7JtCLWZaVTN+Au4GJJWMIOITtIOP XsJLarwjW57M5MoXOmQAn7fE1Q6BkuDQIJK4f3cfrlURLHDtuXMk/MUVZS2JJn/p5CVf H0Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=on/TkQYR; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6-v6si2095723plo.702.2018.02.09.13.56.53; Fri, 09 Feb 2018 13:57:07 -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=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=on/TkQYR; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753053AbeBIV4I (ORCPT + 99 others); Fri, 9 Feb 2018 16:56:08 -0500 Received: from mail-cys01nam02on0046.outbound.protection.outlook.com ([104.47.37.46]:65078 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752953AbeBIV4F (ORCPT ); Fri, 9 Feb 2018 16:56:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=6ClMN/Z14pntrgaIPi8C6D5Gs3REYzbHMCi5UKbk/u0=; b=on/TkQYREL+HI/eyHnE6XPr4lm0XsFJ9TZhV8xvMPmmHIQneNIO5US0SrInyf8nKSxCXAThzQX1GAoga0DZV2OLChOynXwoFWlc8diQo2O6IE2gCvMcjpTKks9Z9Ey6vWWZmylLVKFdBauoUNzwt4uzo5HTeUIXTWqTa61wNuNc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Harry.Wentland@amd.com; Received: from [172.29.157.161] (165.204.55.250) by DM5PR1201MB2474.namprd12.prod.outlook.com (10.172.87.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Fri, 9 Feb 2018 21:56:02 +0000 Subject: Re: [PATCH] amdgpu/dc: Add missing cast in dce_clock_set_min_clocks_state() To: Matthias Kaehlcke , Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , David Zhou , David Airlie , 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 References: <20180209212834.72129-1-mka@chromium.org> From: Harry Wentland Message-ID: <95c4b316-ee97-d7c9-a9d8-f2a7e0daa9e3@amd.com> Date: Fri, 9 Feb 2018 16:55:57 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180209212834.72129-1-mka@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.55.250] X-ClientProxiedBy: MWHPR0201CA0054.namprd02.prod.outlook.com (10.167.160.31) To DM5PR1201MB2474.namprd12.prod.outlook.com (10.172.87.136) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a06a2df5-82db-4998-48ef-08d57007ea45 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060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FCJkM836NYbwzQ1nc72AnD9KNQbjrk46Z/MWTVRaTu9r1jjmHr3/3gOfY7VlvRWpYxf3Yv4KAh6KSETp2Vvew+eB/jtr8GfiHUYxkIOyz6Sqtfit8LgBwNjYBZYO0CArrdnScaO3afOK4Un233LD3t9vL1fjxsvNDd4/AMLQQIRjpcMmL3o2Tj69Od8Ta1CQAhBR7tX/Ua7h8NdJ+sJyhtdWpQdJjhrwIi0dbXTdHM6tsLI2atJGasTSdx8dlNUMUElJI9lPh5cBWu8Cn7BYOScYNrkxxThrjXJo2QXHNxyTKzEBtM84OLlGhiwGNlVWdO+0WvVf/pIdyvA3z3f+TfR+RXIU9/WfsmsdglcuoAbARQe9c6ptIjSGODgX9j0W2+90/ekdMNQfVJWk1nOebz2yEN+7QhH4gvm;4:z+Ze9Ed2Qb+eYZ53PCscJplqTfrVUz9v/DnD5+q6byhpNHFIGg8osijiIkJd/ab2wjXm4tfpvVGsuBsloIGrHw7peyS8Tk9Nk+QIrlITxaFn/4pVunxOkNcxjD6YvzyAY1GgCPWxBtoWCl25rfXpcE0ESaiVfJT/tRQpetty45hKe8vct98CddeUBnFktFlTiMRQ1yg4GFZI0mpH90cpWawGPHm9vqFGJpPPBo8/QMGQ9HG6Yi43n8eFZ5zKK0td1ynVjjkzDY8kMZkf7gJzsA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3231101)(2400082)(944501161)(3002001)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR1201MB2474;BCL:0;PCL:0;RULEID:;SRVR:DM5PR1201MB2474; X-Forefront-PRVS: 057859F9C5 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(346002)(39860400002)(39380400002)(376002)(396003)(366004)(189003)(199004)(377424004)(105586002)(50466002)(97736004)(106356001)(7736002)(2486003)(23676004)(31696002)(52146003)(52116002)(59450400001)(53546011)(229853002)(305945005)(64126003)(25786009)(386003)(5660300001)(53936002)(90366009)(6486002)(186003)(4326008)(478600001)(86362001)(6116002)(16526019)(77096007)(6246003)(72206003)(230700001)(65826007)(3846002)(26005)(76176011)(66066001)(65956001)(65806001)(31686004)(47776003)(81156014)(2950100002)(68736007)(83506002)(2906002)(6636002)(8676002)(6666003)(58126008)(8936002)(36756003)(316002)(81166006)(110136005)(54906003)(16576012);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR1201MB2474;H:[172.29.157.161];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyMDFNQjI0NzQ7MjM6TDJrZmlpeHF3UmlWTzZhWWxLZ0tHby9r?= =?utf-8?B?ZEdsSnhISEdVSzQ4cE92NmFIaVZsYmQ3b0U5eDVmbTdGV29OZXlwVU9KZ0Nj?= =?utf-8?B?UGpSeXZ6dVA3b3hIYUtBZnJmR0l1cUN6bnhnQ3VYUFN5NVpKOWFZQWlOMkd5?= =?utf-8?B?YmF0WFZjRUc4YkRaSi95czNQZWZzSkR6cS9pVjdnWHJWY2FLYnBJSUgyRnJO?= =?utf-8?B?MElqSmVydGRvSkRlWFg4T0RWWE52WTFMNmUrbjZpbGpGanM1VmlPQXgvMkRy?= =?utf-8?B?bGsyc1dwaDRIUzZ5RVZZUVRtVEhnclZkWmQzeWFOTk4wT3g3V1l1SXI5YWdl?= =?utf-8?B?Y0ZxeXNnYzRxeVVOZ2RuUzR2ZHp3YUVPWEZVcENOZ2s2Q0R6TjVCRjVPY0tk?= =?utf-8?B?aU9ZbmxWVG5ld2pFd2FyY25TeVdXa2ZzZm5YR1JoV1EvL1YrbWgzUHdpTVNU?= =?utf-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mWsI1+doXiHrOCDwHKEEkKhAAxN6vQuo6Iwq54EldQmj4xRQsQjv6lMawau2m5rNzFKVp7rQctab7hTPDfn8pm3IO/ix9TFCDo0oLiBy4LqF6ubXflMMP8Q=;5:nwMcCSy2LLbUVuwc3mlVue9701PhD+7LHimkGC8p5uXNZb4c4Ii29nGRGmONl4OQ6DtHMWyzzShBEdtx+rsmxUbaN2rRDprNfa9GHbIg3wUgQldCscMM7+/UbM3973sRORqMnU8z0BeoHqe2mmnZpNGxjZCvpFrcMVM+aZeG4D4=;24:mPORZKtsDX3H8dfG0GpVZkdPDtjn/DkTj0sVLe2IZLMfvp3GphqEGVTDVWEM8bJjcsFUuCuKvqn3DvgLKTbiu2zwHRpdKH7baGRo2AYakqw=;7:vWhcEkUkIXRiJ3JjOQrVi7wKx5gy74zO3VkpWfcNfT1moMDoig6G6WovaYuI1Ycm0lCgV2ovCx1f92BK4FfSuAcpH+4a/JHsTBz3yazw5D8qTy68GULJ8f8qXIgGsEzbwklfuMAwIOFr3gV8N0EdjBHJ78hsq87ffIHgb8G0lu16kx6zm7mDNLCy6FumimQ5pljycbH8fiQM4/d6lKpy8fjvNwE7VFvm2bsRoKX1YD2p7JOkJYzGsx4DOVoNr29L SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR1201MB2474;20:Vu4G0peQStyyHwuHUcQUyh7qwxQiCnX39zkQdoFPrXfVXwvx4p5I+8OXlk8IPUH4z5DfM5EuRUxyl3UWsrfOX8eX+9uKOSQ8yhdRVKUpplMsxHrxLXx5b4XRh0LudktvMnldEkaeWjSZMBDZ6J8D6Gu2SmlHoBtDcauDHWKoc0JcW26M8fDU++oaUAG/EG1MWMEdU77+x2N8WRjilSVKOI0KpaACE1DQyE84UAZ+Z1YKibt5AKvpj3/cWtAwMYRt X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2018 21:56:02.4973 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a06a2df5-82db-4998-48ef-08d57007ea45 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB2474 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Harry > + }; > > if (clocks_state > clk->max_clks_state) { > /*Requested state exceeds max supported state.*/ >