From patchwork Mon Nov 9 21:18:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 320976 Delivered-To: patch@linaro.org Received: by 2002:a17:906:d156:0:0:0:0 with SMTP id br22csp3000146ejb; Mon, 9 Nov 2020 13:19:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyQYFYWWFeMZVbYVG6lbFwKVhlZNs6WKaBGx5OSFxMhfpZPicmlkIakvHwJCEbavbWjx91S X-Received: by 2002:aa7:8b03:0:b029:152:a364:5084 with SMTP id f3-20020aa78b030000b0290152a3645084mr15007132pfd.29.1604956748834; Mon, 09 Nov 2020 13:19:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604956748; cv=none; d=google.com; s=arc-20160816; b=Hc1a+ciEFMSRrUZOepy0RaRgA3pk9neEdaPOKE2pT6vP0nsapHp7nKklLX4QIuA4Uz CBWjc4dJm4M+5gsEwU7lHn/g8noN86mfEgo/XQjzAdWzM6mJR0AapR2DAl2arIoY1vOy Nu75GHqsmMvuE3iWj0DcxIhmwincrXxSkPjz9UAyHUs+gsJ1jyQqDvxBBB+ChyioKysd vnhdeSYp7CHTx/dgPPjYAyMsLz+XQ7VXY/5ztL/GJ0NhrLoGF+O9vHBDhQluTfDa6/qx EVKDId0PrvBi2GpEtdl5/zvjsEAQEUzgt4VgXa9PDBHx8VQSN6m1BAUEUNUGhDt9e60O vO6w== 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=sDOeiCuf2pUpCdGaBwhCdSEl/6ozFfogA5xy+JFWl8U=; b=xMosKM8hCehkt7lxpqe3evmJPZ6qkkNB4rrwcsXmHGT/wro4aWRMwq4s2xROnKXvSv Cn6OzuH9qpF+zli0AIITN8W9p9rpMjLdKIJy46OzynSH0gacVt0kJ6B+nkr9UgSUT/2F TLUJBSAzJunYJVD72Gh0zQ7H1VJ959NqyXxGEfYWYE1qckTmwhaxv+FVbLX2vyqi7FAT +BR6YBJu2nizHyN1p0mxlOxpm1HuvNhr9+RWKg6H8EKk6qko2fFbObQPAhtmsh597CXl O3swyXBWc4CbNfkwgltogRJTHsjdFg4U2ONhgUZrvEOmMF+sssBJRtCKGbyH584S41Pb WdLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=LZgL07gg; 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 h16si10085064pgn.557.2020.11.09.13.19.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 13:19:08 -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=LZgL07gg; 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 12C248953E; Mon, 9 Nov 2020 21:19:07 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5B9F48953E for ; Mon, 9 Nov 2020 21:19:03 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id p22so941572wmg.3 for ; Mon, 09 Nov 2020 13:19:03 -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=MH4JrPJnV93KjKdduQzhuU+LLZMbEyGUifyLAOa0/tA=; b=LZgL07ggHJ7R0ptAiCpzHF9zdgd23QxQBllK5tecy3Tb0t8KoVT1vGpK9+6IeZl6Ef QoIJBhYsx0LZBTWLDq0577hYyZJNNfKp+3WPEuTdHhOgXWdJt5fegyQFRifigj05BvOy 20yqpzld/RJwNMLhDNKYqkxNtMyDyaZoqI2T8b7sL5FRdcvW4K8xR6xjT3DLqtGK+/8y 25EH/0vFCbVKQyOrgk+EDhDJ726xYSE33dZ+NebIY+hwswqauDuUYiNGxQ4ZFGC9sxrZ kIA64UzFlAZUGyLWCj6urbm00THq2CnDEDDejjZXcE6t1KYu0ZbV6AgMTzfHPn3FNzd8 7G5A== 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=MH4JrPJnV93KjKdduQzhuU+LLZMbEyGUifyLAOa0/tA=; b=jYqhmS9linTlPvhqvKFk3k4N5CCi6ETixBMEtNAvenffgz0SbPEZM7iQ6xoGS2/nvm U4ei4vDNIMZNaxTjPbdtDalMd73z7BTm8EVRHhTcCiu6MnN3ukg3x0FoRmChxaVqSTPF c6DRxdnj4BOtQAf+j7MdnXIlelNgZbtrXs5dOY+vD5JciiBa2rPasXYS+19yDN087ov9 kUX+mfF7Xw3kfrD13iAmZSPw4eMogQ+7rI74omfgdnBW0wkdYK1D4s9NEczuBBvXxcX9 JZhYW2alkFjBFNXVbD0DmNj7sXXvBRQbkMPcvatAaD4yRv3Q7G2m1yvR8YoqLMXaRTFa spig== X-Gm-Message-State: AOAM533y17GmrwSony2tVoWm8fTFxB6zD1mS4w1NKZCgJlvOaEUTg7RC whHqwgAnGcxBtXQQlISbtTfxGstRISnIdPWb X-Received: by 2002:a1c:3c8a:: with SMTP id j132mr1090012wma.75.1604956742114; Mon, 09 Nov 2020 13:19:02 -0800 (PST) Received: from dell.default ([91.110.221.139]) by smtp.gmail.com with ESMTPSA id 71sm15170630wrm.20.2020.11.09.13.19.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 13:19:01 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 01/20] drm/radeon/radeon_ttm: Place declaration of 'rdev' in same clause as its use Date: Mon, 9 Nov 2020 21:18:36 +0000 Message-Id: <20201109211855.3340030-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201109211855.3340030-1-lee.jones@linaro.org> References: <20201109211855.3340030-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, Jerome Glisse , dri-devel@lists.freedesktop.org, Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_ttm_tt_create’: drivers/gpu/drm/radeon/radeon_ttm.c:611:24: warning: variable ‘rdev’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Jerome Glisse Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/radeon/radeon_ttm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 95038ac3382e2..a8c915920070f 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c @@ -608,21 +608,21 @@ static void radeon_ttm_backend_destroy(struct ttm_bo_device *bdev, struct ttm_tt static struct ttm_tt *radeon_ttm_tt_create(struct ttm_buffer_object *bo, uint32_t page_flags) { - struct radeon_device *rdev; struct radeon_ttm_tt *gtt; enum ttm_caching caching; struct radeon_bo *rbo; - - rbo = container_of(bo, struct radeon_bo, tbo); +#if IS_ENABLED(CONFIG_AGP) + struct radeon_device *rdev; rdev = radeon_get_rdev(bo->bdev); -#if IS_ENABLED(CONFIG_AGP) if (rdev->flags & RADEON_IS_AGP) { return ttm_agp_tt_create(bo, rdev->ddev->agp->bridge, page_flags); } #endif + rbo = container_of(bo, struct radeon_bo, tbo); + gtt = kzalloc(sizeof(struct radeon_ttm_tt), GFP_KERNEL); if (gtt == NULL) { return NULL;