From patchwork Fri Sep 21 21:55:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10611679 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 29C365A4 for ; Sun, 23 Sep 2018 12:31:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 196722A1E0 for ; Sun, 23 Sep 2018 12:31:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0CACF2A1F9; Sun, 23 Sep 2018 12:31:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C1B952A1E0 for ; Sun, 23 Sep 2018 12:31:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F80A6E18B; Sun, 23 Sep 2018 12:31:03 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id 425768920F; Fri, 21 Sep 2018 21:55:12 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id t25-v6so4702601wmi.3; Fri, 21 Sep 2018 14:55:12 -0700 (PDT) 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=INLn29Iiq9Snt0yTPq2Nlh+nTXxuBeaG9qL05OtBvURd2fMJoFr53MXJVRRc4iqClk 8+B7ZZBxLC6lfMefYRJKk0f8WdJinVd6jT9PF8yoWJ4Uf/T+lG1Up8IHffReAzvVjd09 5R0jNbvcd3VnbVepc8CN7h6OYtXlkbH//TfsFnmPy/NZ2/jvh3kADQnH08nHy+E6kOKV 2XUcsydAv+VB+qly7n0jX/rGQN//1Slmu7IUDFoNvrgB28YMxHxo5L55zQXrb8AYTTLK sfVTb+ozK8Pfci6op3UFwU+IkvFap+vgvOddbt4y8b6A5SkkQTxORMGD8x7KSYsG8xR/ 8Hew== X-Gm-Message-State: APzg51B+QrRmVw/kAlvU4Vtp/oDmB0zVPONPaOgLY+OeBjQka+2P021z vyiwdsrOMHN++BkNarQGdvk= X-Google-Smtp-Source: ANB0Vda7tD+L7P8VLVhfXPNiRg0IlynxjKS9Xb92NaeFfBIMZg6WF58ek0HloEl9ZzHTiL88OzC3Rw== 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_K=C3=B6nig?= , "David (ChunMing) Zhou" 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 X-Mailman-Approved-At: Sun, 23 Sep 2018 12:30:38 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nathan Chancellor , Nick Desaulniers , dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Nick Desaulniers Reviewed-by: Harry Wentland --- 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; };