From patchwork Mon Dec 4 07:32:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13477821 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 82861C4167B for ; Mon, 4 Dec 2023 07:32:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8725089AC3; Mon, 4 Dec 2023 07:32:44 +0000 (UTC) Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0D68C10E1E9 for ; Mon, 4 Dec 2023 07:32:41 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id AEF98CE0E54; Mon, 4 Dec 2023 07:32:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 592E1C433C8; Mon, 4 Dec 2023 07:32:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701675158; bh=9hl2sop5ZT4amnXOtIjTHzdm3Zn4QZwIyXAyL/yWEsQ=; h=From:To:Cc:Subject:Date:From; b=FFsiU+7oMtiyy5BCm6J9eBs/i2GCEb1D7k4bvpF/43a78mGeagTz8grpZVEQoZYz5 TSj9Y1fNQmGIEtXtGpa4txjCgiSgmrewKFzpLD5QMJCra+uaHUsf0Fqu3BNNqPfAM9 OoEust+e7v++8M2pn8lSpSCzDdnuJ4/dViJdhqhk4OI1OFdulyegEV/exAjlGkbb6v e1yJqX8994rgQQqtoGA3vXp0Iv1+XGXR9+hhVbBeBNNPxUDgL1D5enYWvQcy4BNuS8 J4EbCxXngweR9Z+KjkksznfzjnpQ6UqfaIXwnqXF3h/u3VLPUXItqgSUxz2GXyHM3I ogZzxkUL1PXHA== From: Arnd Bergmann To: Frank Binns , Donald Robson , Matt Coster , Maarten Lankhorst , Maxime Ripard , Sarah Walker Subject: [PATCH] drm/imagination: move update_logtype() into ifdef section Date: Mon, 4 Dec 2023 08:32:10 +0100 Message-Id: <20231204073231.1164163-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 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: Thomas Zimmermann , Arnd Bergmann , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann This function is only used when debugfs is enabled, and otherwise causes a build warning: drivers/gpu/drm/imagination/pvr_fw_trace.c:135:1: error: 'update_logtype' defined but not used [-Werror=unused-function] Move the #ifdef check to include this function as well. Fixes: cb56cd610866 ("drm/imagination: Add firmware trace to debugfs") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/imagination/pvr_fw_trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/imagination/pvr_fw_trace.c b/drivers/gpu/drm/imagination/pvr_fw_trace.c index 87a42fb6ace6..8261fa4f7f83 100644 --- a/drivers/gpu/drm/imagination/pvr_fw_trace.c +++ b/drivers/gpu/drm/imagination/pvr_fw_trace.c @@ -121,6 +121,8 @@ void pvr_fw_trace_fini(struct pvr_device *pvr_dev) pvr_fw_object_unmap_and_destroy(fw_trace->tracebuf_ctrl_obj); } +#if defined(CONFIG_DEBUG_FS) + /** * update_logtype() - Send KCCB command to trigger FW to update logtype * @pvr_dev: Target PowerVR device @@ -165,8 +167,6 @@ update_logtype(struct pvr_device *pvr_dev, u32 group_mask) return err; } -#if defined(CONFIG_DEBUG_FS) - static int fw_trace_group_mask_show(struct seq_file *m, void *data) { struct pvr_device *pvr_dev = m->private;