Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4279772pxv; Mon, 19 Jul 2021 23:02:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAQA1RgPrFVRKCEWJpFM5D++yirqhhP36A6uCkGo9lJlvAs9GbTHuYDs9ILVn38uBqVtoE X-Received: by 2002:aa7:c550:: with SMTP id s16mr38535916edr.130.1626760963948; Mon, 19 Jul 2021 23:02:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626760963; cv=none; d=google.com; s=arc-20160816; b=feXekP6Rbj+U30dKDKw0rL+78M4IMffN4hAUzlsB5MPes4uub2HXFbDCwubjsIl8oM 2z8h0aTlDcCKW0FEATihF5VZDirviqpHyqEOsTJ76F3Ni9hyls+8v27fTt3BQlLqPxrS +UtzVIp+dc99Me51uk7iE6fWox90FLmK6/YyoQxDsaMvGI3nwoBPHw2lf/BTHVhDSGh3 uMKt/L9M/gzFZr31/YZ7DwdSq0PjIsBtfhYsvkpC1w8ewhBmc7gj6RFzlQXOsN+Ym4xm 5zaqlXvhr/Vk5hY8niySwIOkZJs57NP+0Np+TTd/eyJ24XsY9ydg8COS/lgonugX0Hx+ eJ1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=llG2/L45XfKS+nv0wOQF7GkIAoq+TU1bHvsFGgUunxM=; b=hf6y/6ZMzAglpksV1ybrfYEgx7dkoakOSEyGgkm7e+i4G7aIlidB99RjAJf4tWEHbb ak3/YlMHwdpWDD+tXN+WiHSC9Mmb3SLh7f2A0cLjq4/4yp28a+ENhbtPwBW1QThzXvW0 cZev9fd2UrX6BAgRGUp/5FoJy770mbIDB967Gu/L+0A4XzJ97+vjt/VTbtL7hQNw7++c YbAlU9JYuXviHkBDSYh0s24nPuLcCgHJ3MbnX0tgo1w7Ic4zo17YpZ1bjn/vlUP6tSOY TRXkJH+RBp4F8N26NCsoZRFA1GF7KP0MnCbPUhiVT+kjamErMgNPLaRHZ2Ip7nguqLw1 QdxA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si27537221edj.103.2021.07.19.23.02.20; Mon, 19 Jul 2021 23:02:43 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236189AbhGTFUP (ORCPT + 99 others); Tue, 20 Jul 2021 01:20:15 -0400 Received: from regular1.263xmail.com ([211.150.70.197]:60530 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234601AbhGTFUJ (ORCPT ); Tue, 20 Jul 2021 01:20:09 -0400 Received: from localhost (unknown [192.168.167.13]) by regular1.263xmail.com (Postfix) with ESMTP id 6F0061BFD; Tue, 20 Jul 2021 14:00:36 +0800 (CST) X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ADDR-CHECKED: 0 X-SKE-CHECKED: 1 X-ABS-CHECKED: 1 X-ANTISPAM-LEVEL: 2 Received: from localhost.localdomain (unknown [111.207.172.18]) by smtp.263.net (postfix) whith ESMTP id P30160T139874264110848S1626760826533946_; Tue, 20 Jul 2021 14:00:36 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: X-RL-SENDER: zhaoxiao@uniontech.com X-SENDER: zhaoxiao@uniontech.com X-LOGIN-NAME: zhaoxiao@uniontech.com X-FST-TO: airlied@linux.ie X-RCPT-COUNT: 7 X-SENDER-IP: 111.207.172.18 X-ATTACHMENT-NUM: 0 X-System-Flag: 0 From: zhaoxiao To: airlied@linux.ie, daniel@ffwll.ch Cc: bskeggs@redhat.com, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, zhaoxiao Subject: [PATCH] drivers/gpu/drm/nouveau/nouveau_bo: Remove a bunch of unused variables Date: Tue, 20 Jul 2021 14:00:25 +0800 Message-Id: <20210720060025.25492-1-zhaoxiao@uniontech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/nouveau/nouveau_bo.c: In function ‘nouveau_ttm_tt_populate’: drivers/gpu/drm/nouveau/nouveau_bo.c:1245:17: warning: variable ‘dev’ set but not used [-Wunused-but-set-variable] struct device *dev; ^~~ drivers/gpu/drm/nouveau/nouveau_bo.c: In function ‘nouveau_ttm_tt_unpopulate’: drivers/gpu/drm/nouveau/nouveau_bo.c:1268:17: warning: variable ‘dev’ set but not used [-Wunused-but-set-variable] struct device *dev; ^~~ Signed-off-by: zhaoxiao --- drivers/gpu/drm/nouveau/nouveau_bo.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 4f3a5357dd56..692d63d08b5a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1242,7 +1242,7 @@ nouveau_ttm_tt_populate(struct ttm_device *bdev, { struct ttm_tt *ttm_dma = (void *)ttm; struct nouveau_drm *drm; - struct device *dev; + bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); if (ttm_tt_is_populated(ttm)) @@ -1255,7 +1255,6 @@ nouveau_ttm_tt_populate(struct ttm_device *bdev, } drm = nouveau_bdev(bdev); - dev = drm->dev->dev; return ttm_pool_alloc(&drm->ttm.bdev.pool, ttm, ctx); } @@ -1265,14 +1264,12 @@ nouveau_ttm_tt_unpopulate(struct ttm_device *bdev, struct ttm_tt *ttm) { struct nouveau_drm *drm; - struct device *dev; bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); if (slave) return; drm = nouveau_bdev(bdev); - dev = drm->dev->dev; return ttm_pool_free(&drm->ttm.bdev.pool, ttm); } -- 2.20.1