From patchwork Thu Nov 5 14:45:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 320638 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp509740ilc; Thu, 5 Nov 2020 06:52:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1kNThesxeA5tgQ0kwR1bFuz+uqPfT7QoWypcdSQCyAN7zZ8jKoXfcTGn7LZdfUzjiq2Dj X-Received: by 2002:a17:90b:204d:: with SMTP id ji13mr2817487pjb.20.1604587967671; Thu, 05 Nov 2020 06:52:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604587967; cv=none; d=google.com; s=arc-20160816; b=Y4C4Q7KgNtK/3f52NH4sDEHPSELdROdGzJ8wggyUHPJg692By76QuZ7dhqF5GPv1Kt qLo23sUxqPmgbj35faIS3mU7O8fLkDJxzR+pty88n80P+jptubm1Mb3bva5VC0x81DhH pS9UEfXKc8IPr7MsvEgDTFvPtiJ1pEhbz7u0x1I/DkoBn069aPkM+SZPhArzj7js3hS0 j5AmR/1YUKhC+y2If5plLWYJkNIEEo+9TXtR3d6M6+X50PVx0QMIR6hFGo+yD04Y6giT JCqsZw1yqSBbNWtYXBgTSvErIn0G7k1vGh5vv+o5E30873/7IO7/CYu2OeOHieNcAsMI RPcw== 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:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=FiVQfX09kNRfwFgF/5P5L6/Tr0fRahtPS0iQ2lUsDAQ=; b=OWDFm0BpPnucl/Fd9/EiohnA2frt3gAmKQ2UdOGLZnh7JXGvAf5D6IECWFeywH+NVd wTUW4QdKhwiOjKeauT449T4JCHIdwIlfPpVXpPh45ySmqSqvQNyNVSUufFBSt2W7RPzZ tSCYmFWYRrIkqR6MpaPII3X56iORzFg/QJjLwqX3p0nB3ygI/h+nLXDR3SH3s7D1VK+C TKkyePt9hESk5Q+BMGmWtK5mJZ29t95AGnbqz37fiDqtDWum0rVygKsC28DTupzLybcH NrsglgD8g2c9O1fes8XTB15zsbkl0q4Krsv5NuIvyMeX2iZOfmxNwSPhTMNRfzzncsKK FxWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=wfiAsdlt; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id l5si1547191pgk.585.2020.11.05.06.52.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 06:52:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=wfiAsdlt; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 978726EDA4; Thu, 5 Nov 2020 14:52:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4A5DD6EDA6 for ; Thu, 5 Nov 2020 14:52:38 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id n15so2108273wrq.2 for ; Thu, 05 Nov 2020 06:52:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aFGC0ytSE2C9dt0H5Lm6tpZnXpH56uqHjPZdDctt26w=; b=wfiAsdlt6epXo2Z0lyQ2vFG5VIANzrYi7k+Kj7DSPrq0Wlu7lE/C7PyBaDtKnFt5W3 ss6q9w+fsheDQAj9Qg22QH+HM8yU1kpflALNQwljtfRtDwIlCCGravQG8EHFfj/kpG1Y FEzypD0aYD9XfDVxFcUTqvOQu5NR5igeobiejNnTe3Idb/HE8ochjkpI+47Yygo0GaRN 7aeAWTVLBX8UdQbRzfNLEcs84NSw+tI8FIqPamYKU2xJ2J2QG9/PsJHOthgrZI8DXhnq eYE1IUn/Dky5zKBZjcjsHDXk7MpSiXTc/WeaJzAxEQ2MrL3ItGYCnlcRVglXawLV2AxM 0ibw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=aFGC0ytSE2C9dt0H5Lm6tpZnXpH56uqHjPZdDctt26w=; b=GigR/JaxBHBon24QF8DrhjL/Vd2wJG79YnTEm0USw4+g7Nkr9z89sID0adva1DZEVy z0+lS6B19jUKslROI2MMgZZlcZjcUtpRMeW+GCrwmsZuhaNpvL9HHmo2MO95ee9M8flv t9LY6wjYMZ49zocIWOp3oz+xgBfowz/ULsnHHJjPHh9AttG1INQuyZdqGOaHjpoejNOa yUod2/NHLFBCDURzxf4RGrkArrVXnWV74qONW4gU772HCVikyzFhfi0WjpRwY+x11n+D tF8YTtg3MTJnbhigPYZB7Ew14b7F0LAKluVmL4sYrm/sJ0et2Tco4fukRGXeii1aEDr1 Weag== X-Gm-Message-State: AOAM531m2yNF0veWKp9ZFYHcFH2dueYWb/7ZgmHyHh4mwHS2G6PWVva2 7OFqEeB2BjbUQtcSLLDXhrOwmQ== X-Received: by 2002:adf:9150:: with SMTP id j74mr3668000wrj.57.1604587956920; Thu, 05 Nov 2020 06:52:36 -0800 (PST) Received: from dell.default ([91.110.221.242]) by smtp.gmail.com with ESMTPSA id f5sm2631243wmh.16.2020.11.05.06.52.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 06:52:36 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 18/19] gpu: drm: amd: amdgpu: amdgpu: Mark global variables as __maybe_unused Date: Thu, 5 Nov 2020 14:45:16 +0000 Message-Id: <20201105144517.1826692-19-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201105144517.1826692-1-lee.jones@linaro.org> References: <20201105144517.1826692-1-lee.jones@linaro.org> 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: David Airlie , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, =?utf-8?q?Christian_K=C3=B6nig?= , linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org, Alex Deucher , linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" These 3 variables are used in *some* sourcefiles which include amdgpu.h, but not *all*. This leads to a flurry of build warnings. Fixes the following W=1 kernel build warning(s): from drivers/gpu/drm/amd/amdgpu/amdgpu.h:67, drivers/gpu/drm/amd/amdgpu/amdgpu.h:198:19: warning: ‘no_system_mem_limit’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/amdgpu.h:197:19: warning: ‘debug_evictions’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/amdgpu.h:196:18: warning: ‘sched_policy’ defined but not used [-Wunused-const-variable=] NB: Repeats ~650 times - snipped for brevity. Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 183b09d71b64a..5939753080056 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -193,9 +193,9 @@ extern int sched_policy; extern bool debug_evictions; extern bool no_system_mem_limit; #else -static const int sched_policy = KFD_SCHED_POLICY_HWS; -static const bool debug_evictions; /* = false */ -static const bool no_system_mem_limit; +static const int __maybe_unused sched_policy = KFD_SCHED_POLICY_HWS; +static const bool __maybe_unused debug_evictions; /* = false */ +static const bool __maybe_unused no_system_mem_limit; #endif extern int amdgpu_tmz;