Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4685123pxj; Tue, 22 Jun 2021 05:59:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygC3qXhUqIu0b+tWzCdaFRk1X07XWYW1vNVAdLb+1r1/dFd0uszaap3BFigu3ccYRJEuYt X-Received: by 2002:aa7:dcd9:: with SMTP id w25mr1909866edu.372.1624366778310; Tue, 22 Jun 2021 05:59:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624366778; cv=none; d=google.com; s=arc-20160816; b=uNX8qjRGDhQePhQw+yGF72OhHgnFPneW+OPsYmcs59ZDzG3iurrlYfIYyq46io6XIa KGPHgBw6YK9nY8yfk9M86+anSh1zdtVYvLJy+/d6yAcr6/o/kPPX7aE+EJHBRxmKeF4F v9iG/Tr8ju4RtpbhrFdIb8ERN3Vapb4MAiX84z8NXsY9UtcydA4OtVwExNM34gb5bzpt CUWWPgDjT6B/sewqt7Bcvxv9W9zkgB8usaUKj9URD5XUONNh4J3YepWQoXAOt50RW2B/ vlNFqfEOBeXiVGxSVcku+co3O4nQRFxlRBc/D8Ak0MuOMFdCpT+dPyW9q3k8LVxCkelf Y2cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=0Fa5FdseTeAT5gQnDu1Ck+qpBEAdQ4IQDPsfhaFD1+4=; b=cJy2q90MKAg5vnXAOalMMd8zbsg+WWTFZdQ4vwlBtEJItAirdXMC5Lw70R0rK8KhXr sK00adC2RZvlRHTjNvXHYLpfrde1kzsmAqkPnZqbTnk4dW+O5dQWNifIKy7/FiWksFt6 xHzxEm7P8MAfTZyrvYmczWsZqj43wsXwzmpBthG3F1WY9uoMbQYidYM+dSzCEaysChxF 7Q8vprIk69OWsjgHh23cZFfQmbpBEHIu29bKM5sL5onP8mDPUVsAS4VbQ4md0Lnu+dMN SeA6cFJ+ufvl6yWWgMHAAUVGnotniyiddXarohvmCqDEtJ5yvSI9aF7q8nTn/1wNsNB4 8IUA== 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 e9si10409496ejm.246.2021.06.22.05.59.14; Tue, 22 Jun 2021 05:59:38 -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 S231837AbhFVNAc (ORCPT + 99 others); Tue, 22 Jun 2021 09:00:32 -0400 Received: from mx21.baidu.com ([220.181.3.85]:44748 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231236AbhFVNAb (ORCPT ); Tue, 22 Jun 2021 09:00:31 -0400 Received: from BC-Mail-Ex09.internal.baidu.com (unknown [172.31.51.49]) by Forcepoint Email with ESMTPS id 8C6936C57C9BC608E8A5; Tue, 22 Jun 2021 20:58:10 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex09.internal.baidu.com (172.31.51.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.4; Tue, 22 Jun 2021 20:58:10 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.4; Tue, 22 Jun 2021 20:58:09 +0800 From: Cai Huoqing To: , , CC: , , , Cai Huoqing Subject: [PATCH] remove unused varialble "struct device *dev" Date: Tue, 22 Jun 2021 20:58:03 +0800 Message-ID: <20210622125803.640-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-Ex16.internal.baidu.com (172.31.51.56) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fix the warning- variable 'dev' set but not used Signed-off-by: Cai Huoqing --- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 984721b..cb3ff4a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1242,7 +1242,6 @@ vm_fault_t nouveau_ttm_fault_reserve_notify(struct ttm_buffer_object *bo) { 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 +1254,6 @@ vm_fault_t nouveau_ttm_fault_reserve_notify(struct ttm_buffer_object *bo) } drm = nouveau_bdev(bdev); - dev = drm->dev->dev; return ttm_pool_alloc(&drm->ttm.bdev.pool, ttm, ctx); } @@ -1265,14 +1263,12 @@ vm_fault_t nouveau_ttm_fault_reserve_notify(struct ttm_buffer_object *bo) 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); } -- 1.8.3.1