Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp61666img; Tue, 19 Mar 2019 17:55:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbYaKY1Hv8w309qBwI1I5+MSfV3MZ/9/iDa/cP7jXsktMWTXp0/UH5mUN+Djua2VdjwpaE X-Received: by 2002:a17:902:b181:: with SMTP id s1mr4982425plr.321.1553043359381; Tue, 19 Mar 2019 17:55:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553043359; cv=none; d=google.com; s=arc-20160816; b=ldFRMQNij/g5gT8S1HwWu7WRitZMU4FJ5BN0A163KotbYXw9N8M/k/Wu7rnF88x7n9 nNJZSYxt4ej0BJIPpmVMjuajRmWXy4ehyHhrhh3HGq9RJZUA2Jml5DA47vqqawV+4p+T z92TaqTNErPNy9XJV7anezVHG0hu2Ey1arns25T9mn2CSZWdxvOq2tjWR4zIzctqgiAF liWDQw0tqxi0Na7cW8llL38lmoED1rWV8+e6h6oLtJWEVXTAUJIQM7AWg4dbUhBc9XvC P0MSSERQXHi1baUEAVNMRqWirkq/LqCUsj1ANeOtoO606iB+5OLLOBt30GS4/E5x+mce rjWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=SIu1f/sjw06XHj4pPICcBegeKBWN4+eHSsg+jniAAUk=; b=mCT+7ZSjEymie44afTs/UZTCZ6ry+yhT3Qa7V0Iu55TY4Ll4GIUBXawGUk/8rqgq5a u0p3ZAn0k55zsyMzdSfrbINQtNUgrTi16CuB7WsQiiFUcAHEKK1LAkG5oSH9qoDYOINe HwNa/bTWpGuCb7tjRsoz11N//T7iUgCSpWKDMXm7CnVix/7iKNBVQ2meNL/Y2MNpEm3+ OnjdzGWhX9clFk3AAMsDyTkfVQseWjbsIlLBoiA1WYkxKKN+7mvqoy19iMfJXrfOzjFZ VSOCLcPXmCMZVtV5tOT0EAX5W7BqYrJZ51XQlOhzkroa3b6FYV255FAUiqZyT50lXhZJ /1/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q8AAoeR4; 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 h11si486466plb.38.2019.03.19.17.55.43; Tue, 19 Mar 2019 17:55:59 -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=q8AAoeR4; 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 S1727538AbfCTAyL (ORCPT + 99 others); Tue, 19 Mar 2019 20:54:11 -0400 Received: from mail-ed1-f54.google.com ([209.85.208.54]:37304 "EHLO mail-ed1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727047AbfCTAyK (ORCPT ); Tue, 19 Mar 2019 20:54:10 -0400 Received: by mail-ed1-f54.google.com with SMTP id v21so511197edq.4 for ; Tue, 19 Mar 2019 17:54:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=SIu1f/sjw06XHj4pPICcBegeKBWN4+eHSsg+jniAAUk=; b=q8AAoeR4h8TsrN4Y+jSwUb95HGe10gEyKV28DsjZHhYhhd/aSE1upt1HLKzGFUZvPq VvucMBs2pwdG29cCgBMKKtd81BguHPCw845RGI2hM5FOxFYf36kJuoXd7OKM3KhdkhVm p5Y2qZ53TDrh3YkS7fN36ae9Jn/7h1RETp5N1gwYMXeP9/58D80ajG72P0A3WDt3/wln bz/PK0cHMvEf8fo8qKyc+HgKzjpn64niJ7bLExmHIwqsc5mIkK90dIdU/y21d8jiOZhO vL9sB0zLkju8w6NtJztz/YDIPGJvs5Wh2YXDmN0HwSM2dkwI0u8tyaJQ+nUVGP/jAO3f Ez7Q== 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:mime-version :content-disposition:user-agent; bh=SIu1f/sjw06XHj4pPICcBegeKBWN4+eHSsg+jniAAUk=; b=Fvx2a5Ld4ns9YY3xK4+q14HvNUlL99nrlCDGt73SKVaVlxOt9fxCGikE0BF0e76Blm oOO5HHCmuSeU2uuQn1Vdiil7SYpi4yOQ0Wc+YCD3o/4sCo5BfLDMrWwtRPzQfa3ptDu3 k7lEOAeI1BGNvfAhr9ATKNh21K9D6SoVR1T47wDznOmzRky0eEe+Z0s40FZCBSoq0Zb+ 50TVZkHgHp8rsk5h+Mfrp4QK59ga9QUrMinRPpHZtX5SpGODVT2k8pUzVJZEZvPPFhP8 Khb+9REVHbi1cO7KdZMwAz8KYEn80EnOhvrUT2lffbcyq/mWLho0i4hsoWi4qnqR0jMH jEDw== X-Gm-Message-State: APjAAAXVjvm+T3NbtP4BnBE2LzSxpV5wSuTA/oOwbB1Yp0kx0APKipH1 MG5+8X0qZEJJQiV6gnrmckM= X-Received: by 2002:a50:97d5:: with SMTP id f21mr18125379edb.293.1553043249031; Tue, 19 Mar 2019 17:54:09 -0700 (PDT) Received: from archlinux-ryzen ([2a01:4f9:2a:1fae::2]) by smtp.gmail.com with ESMTPSA id j34sm169742edb.30.2019.03.19.17.54.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 19 Mar 2019 17:54:08 -0700 (PDT) Date: Tue, 19 Mar 2019 17:54:06 -0700 From: Nathan Chancellor To: Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , "David (ChunMing) Zhou" , xinhui pan Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Clang warning in drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c Message-ID: <20190320005406.GA16412@archlinux-ryzen> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, The introduction of this file in commit dbd249c24427 ("drm/amdgpu: add amdgpu_ras.c to support ras (v2)") introduces the following Clang warnings: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:544:23: warning: implicit conversion from enumeration type 'enum amdgpu_ras_block' to different enumeration type 'enum ta_ras_block' [-Wenum-conversion] .block_id = head->block, ~~~~~~^~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:545:24: warning: implicit conversion from enumeration type 'enum amdgpu_ras_error_type' to different enumeration type 'enum ta_ras_error_type' [-Wenum-conversion] .error_type = head->type, ~~~~~~^~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:549:23: warning: implicit conversion from enumeration type 'enum amdgpu_ras_block' to different enumeration type 'enum ta_ras_block' [-Wenum-conversion] .block_id = head->block, ~~~~~~^~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:550:24: warning: implicit conversion from enumeration type 'enum amdgpu_ras_error_type' to different enumeration type 'enum ta_ras_error_type' [-Wenum-conversion] .error_type = head->type, ~~~~~~^~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:650:26: warning: implicit conversion from enumeration type 'enum amdgpu_ras_block' to different enumeration type 'enum ta_ras_block' [-Wenum-conversion] .block_id = info->head.block, ~~~~~~~~~~~^~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:651:35: warning: implicit conversion from enumeration type 'enum amdgpu_ras_error_type' to different enumeration type 'enum ta_ras_error_type' [-Wenum-conversion] .inject_error_type = info->head.type, ~~~~~~~~~~~^~~~ 6 warnings generated. Normally, I would sent a fix for this myself but I am not entirely sure why these two enumerated types exist when one would do since they have the same values minus the prefix. In fact, the ta_ras_{block,error_type} values are never used aside from being defined. Some clarification would be appreciated. Thank you, Nathan