From patchwork Fri Dec 4 16:51:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 337762 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp583473jai; Fri, 4 Dec 2020 08:51:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8ZdE4DpE8QxYTPE+nWkhoc2JJfE0IdTyIgvAE82RU6BHEjGLBLKn9evj/NMma6aRtUc1J X-Received: by 2002:a17:902:b182:b029:da:d0c:abac with SMTP id s2-20020a170902b182b02900da0d0cabacmr4598087plr.40.1607100697851; Fri, 04 Dec 2020 08:51:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607100697; cv=none; d=google.com; s=arc-20160816; b=oFxtts7iQsN2xBiDphD9lzOKZI9EHzBlp51RZcoeqiYVI1CSUqwnR3oGxrKHglLLB4 w88350tEorbCJE/OQIE1xCVr8FrBwdE447lTyusFOuSiCdqS6q+NEQAhWAzdK7PEhkVe wrVz+GCY2K2gVHNw7jSt1q41Tu/0ifROyvhiNN9jofbcjmC//zmtI9VwfdLR1PCS1bg/ NOpBIF1e0vLb7sk8En/p7ztHse5CjtUxJd76e4V9RA+RH/UwXbsM99VeZvDoCU/TBqD0 PWB3eq4U4sEXyhcu0CoCX4hQz3XK3nH3MbgnPO1RKeRL8f0MdiVncUahTn+67D4GYQYo b6lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=vjmkRgjafsk5Yt883j1Epe2NuaQElHQKP4Bjhv7lrv0=; b=VEgZpovf653zPmv/yTX3VfTA5tHcBb5bxJ+GCwl8aEQydZssFDtG+fVsVmzR7t2wNU MCogGMg504PnLrGYum73PIkcqGNwXrU0pj6HKoetJ9+ZXoD4DwuPCqIivxiVO3T0vBue AazhPHIS838Xbdq4VkmGQNyqj4VCk6ww51WKs+2vy+oH2jdxBjYVRIoa4Uop9fqeDWZO 6Km8Yx9Jfu8em5i3APrD3t0hXK6yWE843m0tsJrzjcDKZh0w7kAZdzox19/ZkyC6gP/j ahM6NwxzzUjHRwpJuH/KwWPfDTBilT5GauCEFt7ASTuMFqmc3kS3QyqaFLaLH05NC8Tf 6BZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id o23si2616062pjq.11.2020.12.04.08.51.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2020 08:51:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 44A886E19C; Fri, 4 Dec 2020 16:51:34 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2F6DF6E19C; Fri, 4 Dec 2020 16:51:33 +0000 (UTC) From: Arnd Bergmann Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6n?= =?utf-8?q?ig?= , David Airlie , Daniel Vetter , Hawking Zhang , John Clements Subject: [PATCH] drm/amdgpu: fw_attestation: fix unused function warning Date: Fri, 4 Dec 2020 17:51:20 +0100 Message-Id: <20201204165128.3747878-1-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, Lee Jones , amd-gfx@lists.freedesktop.org, Arnd Bergmann , linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann Without debugfs, the compiler notices one function that is not used at all: drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c:123:12: error: unused function 'amdgpu_is_fw_attestation_supported' [-Werror,-Wunused-function] In fact the static const amdgpu_fw_attestation_debugfs_ops structure is also unused here, but that warning is currently disabled. Removing the #ifdef check does the right thing and leads to all of this code to be dropped without warning. Fixes: 19ae333001b3 ("drm/amdgpu: added support for psp fw attestation") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c | 2 -- 1 file changed, 2 deletions(-) -- 2.27.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c index e47bca1c7635..7c6e02e35573 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c @@ -130,7 +130,6 @@ static int amdgpu_is_fw_attestation_supported(struct amdgpu_device *adev) void amdgpu_fw_attestation_debugfs_init(struct amdgpu_device *adev) { -#if defined(CONFIG_DEBUG_FS) if (!amdgpu_is_fw_attestation_supported(adev)) return; @@ -139,5 +138,4 @@ void amdgpu_fw_attestation_debugfs_init(struct amdgpu_device *adev) adev_to_drm(adev)->primary->debugfs_root, adev, &amdgpu_fw_attestation_debugfs_ops); -#endif }