Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp305108imm; Fri, 21 Sep 2018 14:56:32 -0700 (PDT) X-Google-Smtp-Source: ANB0VdazZWXDudEc0pVbIO/amhT0lZQluxhFFuhQ/2MavUiVWvEJSnKWnk2oZmdnCJkrUAKhA6p6 X-Received: by 2002:a63:1d22:: with SMTP id d34-v6mr43928894pgd.133.1537566992632; Fri, 21 Sep 2018 14:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537566992; cv=none; d=google.com; s=arc-20160816; b=0vHoK5h7O+Qj7Bf2NKKQNKLJEdAo1y502fR9WNATdyEf3xbdyhy/U+cWjLvOW0jI/w XIT1fdxY8E/5bJkSgzWsrTy3oRyAhWEwPzKeQlealfvfb++aFiVWXalvkc2Blk4Ejs6j B3r8WfBBfpBSCs9KxULydficWNEjvyo8XymKzj2aEhtbjxhePifnrE1DYGhGc9bJb5Wf Knb7UIDvo7rH4CJRndKWZkYxHBSz37yNV/tZyhxjWFr2g23QVOe4YzI8W5/IlN9ZthiC 9C6dMUpGaimy9RVROiKDv0zxULCarblJFo5u13hNcCPDeLt59plKelBYdqiErA4IVVTP SF4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=e6D/UcS5N1o2MjDIEppwnTslPGvHZVt+WncviFuTnyM=; b=g+xKvSRhDr/XlNL4y7tUiSNq6Ix6ALhFCgXhgLEIYlTpFg0BqrFrhsx99banFBgS7f yPHc0vREi701nEIFdMTDE3LPcBB7KDNWGMssurk04Y5Gb89r51GAhX+G8hEhLS+hfS2P txAaQ7D9EmyfSploffOxB3KcRQvGbzS8PYzRwW0OOUrWadKnEocTv8SMsgW5zk5dU0pa 8j9aL1Xt+2+xaNuIAi5dBzLZBRNvFmsI61oHKFYc471461UrpwLSbp+K9bw6BRYK5i7+ oSTqmRbHPfJ4OCHycWto5ThHZtsvFDhFBL22VhYfxohI/9EWOTaRHxZa+ciPzSl65hNB +NmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KcVh5ZHF; 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 f8-v6si27135210pgl.383.2018.09.21.14.56.16; Fri, 21 Sep 2018 14:56:32 -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=KcVh5ZHF; 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 S2391549AbeIVDp7 (ORCPT + 99 others); Fri, 21 Sep 2018 23:45:59 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:39619 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390726AbeIVDp7 (ORCPT ); Fri, 21 Sep 2018 23:45:59 -0400 Received: by mail-wm1-f66.google.com with SMTP id q8-v6so4711838wmq.4 for ; Fri, 21 Sep 2018 14:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=e6D/UcS5N1o2MjDIEppwnTslPGvHZVt+WncviFuTnyM=; b=KcVh5ZHFHcmsF2GQN7laPZuBBDd3SCei7V0gMroNXAwu7V1qEYhSGJwkwXXZfeF4mj dxgnbhSQr04FTKMRFjjb6oLkKH9KgrukTILSOuA1zswThkHANALf79oAUT9ZbzQD/ay3 KR3/hDrddC5ujO8zbMXPT4cl0DBJq/Q3l5zXCet6Yz7RLaQCsliZvqjT9cM9Yim+ai7M XgT0h3EcTJG7X/qoIjkVeqjCaNnHpJx6n42ZucuP4JJGGCOJjO4EPP+HZM8W8jla/jTl SZh8wRwE7OyPxn0eKAjPip38KJsVfHWwSn9Ybo+IZkmhltih1M6uN+I180Wi0HmIQ7gf q8xQ== 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:mime-version :content-transfer-encoding; bh=e6D/UcS5N1o2MjDIEppwnTslPGvHZVt+WncviFuTnyM=; b=euVrwsAfkW8fDeTxHF1VJZSGIWhOL4tPCQQrerixdph/4PQon6pXUJpiP9FXi+Ksbt kvdnfX1bXeXeI6NzDISxIYZi43fOzRYGJuHLESwzpgXlMGHs322j8+uWDbfBpFcAP6FC e8Knb7PXVzGukLIR5fiu9Mc4obOERCxvGf42TtXXhDZ1XK9x0I2w3Gu1pa2gbzu+Vmve zSVvAtsf5RQ/UzrBoRUxd3MmXOYEMCcaSB0yz6JkX8fz8/pPTCl9N+WWXPvtTh7n/mQv T69rP3Y9KRjWdZDuixg3nWnM9WFPYw30Nbk33lCG4J0MDRcy+L0C+69k0M6Xb+1xFkWs 1vxA== X-Gm-Message-State: APzg51ATm+DuzL9tph+7Euc0rGF3uf5hJh4frDq8kMfNB9rteIt4oo5k NH8AX4Sa7qSWZp0h8Ggl6Us= X-Received: by 2002:a1c:357:: with SMTP id 84-v6mr8970940wmd.8.1537566910502; Fri, 21 Sep 2018 14:55:10 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id f12-v6sm7270860wrj.55.2018.09.21.14.55.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Sep 2018 14:55:09 -0700 (PDT) From: Nathan Chancellor To: Harry Wentland , Leo Li , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "David (ChunMing) Zhou" Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Nick Desaulniers , Nathan Chancellor Subject: [PATCH] drm/amd/display: Change status's type in aux_reply_transaction_data Date: Fri, 21 Sep 2018 14:55:05 -0700 Message-Id: <20180921215505.14634-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Instead of implicitly or explicitly converting between types, just change status to type uint8_t (since its max size is 255) which avoids this construct altogether. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/dc/dc_ddc_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc_ddc_types.h b/drivers/gpu/drm/amd/display/dc/dc_ddc_types.h index 05c8c31d8b31..97e1d4d19263 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_ddc_types.h +++ b/drivers/gpu/drm/amd/display/dc/dc_ddc_types.h @@ -79,7 +79,7 @@ enum aux_transaction_reply { }; struct aux_reply_transaction_data { - enum aux_transaction_reply status; + uint8_t status; uint32_t length; uint8_t *data; }; -- 2.19.0