Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5760491pxj; Wed, 23 Jun 2021 08:24:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeLe7Y0XP/0+4jHxfV2gUqdWaMfNh/gy6bK3rwtHE+BNToK/7MWI2Uly6h1i25vY0i7ksN X-Received: by 2002:a02:942e:: with SMTP id a43mr152985jai.74.1624461862364; Wed, 23 Jun 2021 08:24:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624461862; cv=none; d=google.com; s=arc-20160816; b=aNvyzt1DjxU/NGB6RzYw/xTd3aI6462pAXhlntm9wAu73p8JPftnIHOXaxxnfp7Mpm KqnWLkHqwc8LZhAJK63pVtHrTQTLjYH9VpBYR73qa+ZZl4m/S1WAC1miwkb+856bPd1W mQ03lsYddmh96nGBffu/bdG6V6fGp/PRvYwmETUHGCe9QKIxtSpO04Kx57p2PKC6LzhZ zgp4VbCtXUJCbRKSxtxWQthBFwmRu+DJmncMLnX5A8b2VoXJu8sXHfycSZuP7JdH5QRA pVSfmU5BuOvpppg8bA5ncpB+v9G/HpqW+jdK3VKfkH0ZUR1X/mhYTWFxKa6kBfODpcdP Xk2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=KqNfBw+DZy7VZXBvahJMXyxmm59IKQhUiq2dn1235vw=; b=hxBFeqav84hoCsWwmVq6+koxEBaoWynw6ks1TVRoiowcABBp/1piYMiaW8sNxtpI1e CyYCc0mIZSyPTXwDEPYsPCcGC2fw+S4nx/rE0Fx3FBHLCO6tpQk9CH98VbM8burW8q2+ pOO1w9OggI+Sq6gOPxj6bQBkg33YgUXuqfm6Er4VSNmV9M6vvEp2xWNMH/5zAXhGh8NP VtLDa8mu+7MPj7UQJpxDXm+DrrJDZdFbUxG0s/+uHCr60gKFMEJEWnfz8h87P6n4D4sl B3tHICObnFqT3udwYKiD4tA/8PkGnxEu1qtQeiCeCtMxDk7is79SgAulrDjXXCXYLZm2 jC0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=al5+qDE9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b3si13784353ilh.84.2021.06.23.08.24.09; Wed, 23 Jun 2021 08:24:22 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=al5+qDE9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231133AbhFWPZ5 (ORCPT + 99 others); Wed, 23 Jun 2021 11:25:57 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:33078 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbhFWPZ5 (ORCPT ); Wed, 23 Jun 2021 11:25:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624461819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KqNfBw+DZy7VZXBvahJMXyxmm59IKQhUiq2dn1235vw=; b=al5+qDE98xCfMMjJOInGnGtQG/Jre0q0BjMjH+tHe1KQOOnoinpuHXdsDj7FR/N7MOkyNg +GBDV1Ve5dxbXhv4wvoZZ5tbPnItUFmvNiFxzEDHFlezcjFCRmZ/ydxSUjDTrs1Rup70gB FrAw49aPIt/ocgz9LR8xDJ6xnjRxCjA= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-291-Jev1xyjVMNKxq--7GemLzw-1; Wed, 23 Jun 2021 11:23:37 -0400 X-MC-Unique: Jev1xyjVMNKxq--7GemLzw-1 Received: by mail-wr1-f71.google.com with SMTP id f9-20020a5d64c90000b029011a3c2a0337so1217674wri.0 for ; Wed, 23 Jun 2021 08:23:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KqNfBw+DZy7VZXBvahJMXyxmm59IKQhUiq2dn1235vw=; b=ru8pvWCZUMpWKvQJWvvCvyShy5n110BWud/gFo7pgKbMHnrRqqdWwZQNuX3fI38HVE BcSG8ZUvwQungWfix2xDVFT9cgK30KfjkVu96s53VicMvKQO0rrBsGR1dGpb2JQORIsh yUY3wIbmRNPL1+F4F6DtnqgbNoXzMUBzLfAS8T2+fMWiaBj+EWFqAIp/iyOYEp/eHzAk 9tHRf1Olt5uIngdBnJ2uNcYfvBrThJNpqNWL9dsxFzH919zqcC4RBmjC1xXKmqp7twgZ Ta+Ci/E8qcbeVMpymsFBRDVNUJe+PcKmyEsEiDljn0faAbRZtFqN6J1fEzDItYxASXaw r80Q== X-Gm-Message-State: AOAM5338IHKO9wymmwTnJLQT7OUPDL+7XY3oZgOAG6i5Hvd6J2O++MoW 1yZ6szSWHDsl3c09SYtsdiTGvTP5vwqoQfxzyutceJDfS5uOjh6PwoQBFuHd7RPj4TIyBwkxkeK GFMVK0xFEcfRNChWnuJLFdIgWfaOvQ/df0dCrsTY1 X-Received: by 2002:a05:600c:2907:: with SMTP id i7mr4087031wmd.139.1624461816650; Wed, 23 Jun 2021 08:23:36 -0700 (PDT) X-Received: by 2002:a05:600c:2907:: with SMTP id i7mr4087017wmd.139.1624461816527; Wed, 23 Jun 2021 08:23:36 -0700 (PDT) MIME-Version: 1.0 References: <20210622125803.640-1-caihuoqing@baidu.com> In-Reply-To: <20210622125803.640-1-caihuoqing@baidu.com> From: Karol Herbst Date: Wed, 23 Jun 2021 17:23:25 +0200 Message-ID: Subject: Re: [PATCH] remove unused varialble "struct device *dev" To: Cai Huoqing Cc: Ben Skeggs , David Airlie , Daniel Vetter , nouveau , LKML , dri-devel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 22, 2021 at 5:14 PM Cai Huoqing wrote: > > fix the warning- variable 'dev' set but not used > the patch title needs a prefix to indicate which subsystem it belongs to. Check git log for examples. With that fixed: Reviewed-by: Karol Herbst > 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 >