Message ID | 20201105144517.1826692-6-lee.jones@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=ycYK=EL=lists.freedesktop.org=dri-devel-bounces@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66513C55ABD for <dri-devel@archiver.kernel.org>; Thu, 5 Nov 2020 14:52:31 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id F2E2222203 for <dri-devel@archiver.kernel.org>; Thu, 5 Nov 2020 14:52:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Fam3S7jh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2E2222203 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7F1806ED9A; Thu, 5 Nov 2020 14:52:27 +0000 (UTC) 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 0B6306ED94 for <dri-devel@lists.freedesktop.org>; Thu, 5 Nov 2020 14:52:22 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id x12so2084333wrm.8 for <dri-devel@lists.freedesktop.org>; Thu, 05 Nov 2020 06:52:21 -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=wbt6Bt9xb+nEOL+sC88FIyMMDCRwxeU6Sb1wX9bISpg=; b=Fam3S7jhyYU7Z3NVpeOT6nsSRFnhdHgQmCdaWhPs/Yr784DIvf4lSZhyZHm2kJR56B xFeYjjLXHYSZXkqWhyT2ShuGYnKzxLHPnefwdaOp8hMNZV2apCFXYCYmtM2cgs1iwSfU /9VZfe69vuzcpbQb11b7TYnFXBRK9Ha/1DN1lG5nS5Tg/bckPfi2G8c4ImLNv6WThk4y kiAwvcINQwP5e8wsl/NVsQ1wfRvGCXS77nJZpnFrQuQvrJvGByjSikVklVVtzAl/Pa0a jXTSoylLp28E6q1VPfcZ60zbGwaQ4FEK5FQQu2wjmDXStRYgwELevsk7O/w7zazaDndl GIHg== 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=wbt6Bt9xb+nEOL+sC88FIyMMDCRwxeU6Sb1wX9bISpg=; b=VHFustvNLt75K1kiHn9eApytCTREUrLcL3WKz/nrag2zQei3Sl6K64Gf1rSJabaGKS cu74dQbhjLLMW92cSYxliP6BVjjS8sWKX5Yvv3/cTppcgu+fInfxJhEaUnihHVPWZcOd gUZtzoyxH7P+Wlqje4BA3P0HewWLCvarv8hKUwwGqLUAMGZY7x27z5GBNg+pxBnqrZbG MLwfsLJIb7CCNZNeAXnpROjFbwTD6USIpDS0Dc2OiM6km0C4xhcn/HR9rjLd0tTsWfJf Y+ztEa/ga9adenanedxcXdCW3R93bE1weeElkxbsZEEMY41IpAyo1L8k0VXIHQf589UP 8iew== X-Gm-Message-State: AOAM531w84x+VutuN4NCE6xEpO89B2LOKhisXwbNtGYq2XFOak7Tfk/R bm4SilLcdt7h2oYObjMZlebkhw== X-Google-Smtp-Source: ABdhPJyUVy8zvMojF9OfX8R20eVTkRIbuvjv/KNiuhzS4OiNxtWZb4zKr0KnzrRzULj0tbNM0uBdEA== X-Received: by 2002:a05:6000:8d:: with SMTP id m13mr3373575wrx.216.1604587940699; Thu, 05 Nov 2020 06:52:20 -0800 (PST) Received: from dell.default ([91.110.221.242]) by smtp.gmail.com with ESMTPSA id f5sm2631243wmh.16.2020.11.05.06.52.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 06:52:20 -0800 (PST) From: Lee Jones <lee.jones@linaro.org> To: lee.jones@linaro.org Subject: [PATCH 05/19] gpu: drm: selftests: test-drm_mm: Mark 'hole_end' as always_unused Date: Thu, 5 Nov 2020 14:45:03 +0000 Message-Id: <20201105144517.1826692-6-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 <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: David Airlie <airlied@linux.ie>, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com>, Nirmoy Das <nirmoy.aiemd@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
Rid W=1 warnings from GPU
|
expand
|
diff --git a/drivers/gpu/drm/selftests/test-drm_mm.c b/drivers/gpu/drm/selftests/test-drm_mm.c index 95e212a9a74d2..b768b53c4aee3 100644 --- a/drivers/gpu/drm/selftests/test-drm_mm.c +++ b/drivers/gpu/drm/selftests/test-drm_mm.c @@ -54,7 +54,7 @@ static int igt_sanitycheck(void *ignored) static bool assert_no_holes(const struct drm_mm *mm) { struct drm_mm_node *hole; - u64 hole_start, hole_end; + u64 hole_start, __always_unused hole_end; unsigned long count; count = 0;
In the macro drm_mm_for_each_hole() 'hole_end' is provided as a container for 'hole_start + pos->hole_size', but is not utilised in this use-case. We cannot simply delete the variable, so here we tell the compiler that we're intentionally discarding the read value. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/selftests/test-drm_mm.c: In function ‘assert_no_holes’: drivers/gpu/drm/selftests/test-drm_mm.c:57:18: warning: variable ‘hole_end’ set but not used [-Wunused-but-set-variable] Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: "Christian König" <christian.koenig@amd.com> Cc: Nirmoy Das <nirmoy.aiemd@gmail.com> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/gpu/drm/selftests/test-drm_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)