Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp688655pxu; Fri, 4 Dec 2020 13:01:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJygk5yDX5L2OJUexNAjxK2EZnJB+Fs/AC7Uv6pUQdMlKRFLfZZJQsuGV1FDjvTC+rJO0HDG X-Received: by 2002:a17:906:d931:: with SMTP id rn17mr8654660ejb.308.1607115697406; Fri, 04 Dec 2020 13:01:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607115697; cv=none; d=google.com; s=arc-20160816; b=tSwYqlQBQpB06Q7yET821RFzC5eSbVZ2vVaISO/9dcj7h4GW1SMdBai+v079FJjX7H oJjqM92SkQWlQo6N8aLoKHT/2xoR7TpTNAQawDKKquAnQMie7HV0b3AGtMjRbw6z7ulx EbGcaz84Nqb18WeLaaBhJxmktw+kG4jVxk0XEVMYFFjl2YtZctP6WPr47FHGobWbk0PV DxyXqoh3sH7k9gtwX3fanZ88PYjSDKqBo4Bt1zBzxOPYcX/px8i51wDRseoRu63RWr4g 6kv6VLx4Vywe9gU4E30fp5zGSLS4xhwXfK5dKd0Swvvdy+0V/s1OyZlx5qoRp/QB/qdq ggnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=oCRFwoQksFKYxL9oDoarBzLvwPjlXv3hZNckKayt7VE=; b=cmEnilt6bn74ezwbXHBoe3jhQH5LgRjySGAYzVwSQxaZUZI9l5WuwysODQTULaDhzW K+XO7Cw9onJ6khdt9ANHx2nMnMSyLgv9P1LwCh8yz3QqwJJg1bhCtWju8AZq0SA6/5ki Qec4hG6rFUqkzPCgPzaH/0i8peYDEHWottEf/aumSNQVE3nlvT7kltEWGEyfg68iVJAF jZyvwHmsVvsNT07BcatP8BEB+l7nIeks55IgxnR3utYKRtRngmKCXdzODVrVAQbrIMcl xxUsMkFYALfK1J2j7zGi6Y3mJH1QgpiZudDq3i9gJeCb7aMdELmkMZPUY6hNjeKFyX36 GDnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qtVhX699; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id z5si2246930ejj.640.2020.12.04.13.01.13; Fri, 04 Dec 2020 13:01:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qtVhX699; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727798AbgLDU5F (ORCPT + 99 others); Fri, 4 Dec 2020 15:57:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726524AbgLDU5F (ORCPT ); Fri, 4 Dec 2020 15:57:05 -0500 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 659B7C0613D1 for ; Fri, 4 Dec 2020 12:56:25 -0800 (PST) Received: by mail-oi1-x244.google.com with SMTP id t9so7689845oic.2 for ; Fri, 04 Dec 2020 12:56:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oCRFwoQksFKYxL9oDoarBzLvwPjlXv3hZNckKayt7VE=; b=qtVhX699Z+sdbwQ0ORNcWDXHwHjkZyYC8BLl8PrsqffUGnX1Nflju5sQJ9vxci2hTA pNcPyzTncdV4ImSnFytm/qrKywE5ktZDoohXPdzQdTeAqgPRAU1WwMrvvATQO00FLhnQ ptLQcrME+z99/L4GzViD6O1B/mcnIBZQrr4jJgtErgbr/gSWh+N76dM+5eZp9P5wOx7i 0JWz09RtGf3eWmo5MMtrrjFZMUGB+4QmOVxfIV5BCbiPsvUaWULkjXEFOBcGL9FRZk4t h2A5oz2Rt6X42vobKLOOuvZKsbrMZ1lPzlSpdNPN3mDpsk/CiiiB8WFsiFU9161Y66XS qTrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oCRFwoQksFKYxL9oDoarBzLvwPjlXv3hZNckKayt7VE=; b=cXBG+qkAk9NBwHMT8BBpSZuC9VAdABc5Rl7FeLmDd876OJCoyDIlcup0EpoZSRtX5l lwUzz7sI+KCbQnzM20Sfujxj97UhC5j1OKACvH6yuFzJHToPiiyEtPZdqug13Vrn6YBk oZMLj/TTtTh7p7nNR0NfB3DKYvsw4wP3yn3xvptM3ug0SDGl4OwxXrShjnc5w+aYRSSb jFYnPo33TnUjEM449xNrRBuNFF+SJ+b6c4HPVvprPvBEJqrSfZ/RPwdyKE8fWxjID3qF ld2knOeIB64blJUzwFNK6+RwLXygU+KBLgxfBabg4eU+S0CPWClUwSKsx+C+o07KRSQU GtmA== X-Gm-Message-State: AOAM531dd1enTY+q/lMC5eW0uJvF3VvRlkrMZTsXRfJEFTBwXNNbo93k dGuw6P35WNiXDpP6cL2oe52FQUvzD96ppW86460= X-Received: by 2002:a54:4608:: with SMTP id p8mr4365387oip.5.1607115384748; Fri, 04 Dec 2020 12:56:24 -0800 (PST) MIME-Version: 1.0 References: <20201204165128.3747878-1-arnd@kernel.org> In-Reply-To: <20201204165128.3747878-1-arnd@kernel.org> From: Alex Deucher Date: Fri, 4 Dec 2020 15:56:13 -0500 Message-ID: Subject: Re: [PATCH] drm/amdgpu: fw_attestation: fix unused function warning To: Arnd Bergmann Cc: Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , David Airlie , Daniel Vetter , Hawking Zhang , John Clements , Maling list - DRI developers , Lee Jones , amd-gfx list , Arnd Bergmann , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 4, 2020 at 11:51 AM Arnd Bergmann wrote: > > 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 Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c | 2 -- > 1 file changed, 2 deletions(-) > > 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 > } > -- > 2.27.0 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx