Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7941516imu; Thu, 15 Nov 2018 04:09:11 -0800 (PST) X-Google-Smtp-Source: AJdET5c2D++KoDC5eH5NfpJEMOP85T76PSMapPaZ0ZD1gJlNOnuZ1APrmC9MjpUrrX09+aiCvFdj X-Received: by 2002:a17:902:d03:: with SMTP id 3-v6mr3826612plu.66.1542283751585; Thu, 15 Nov 2018 04:09:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542283751; cv=none; d=google.com; s=arc-20160816; b=qrDJn4DuXJMLjXc3ARiRwHvV+mhokWtsvmXyvCOMMSZPN5WSSyQjBRmHQpnPH8+8jN tkj5U9O6B15HcwaVh+NN4c+woVyT70SYAhmGvzSR7kmTKzciRJh+RAuiXt4KlkTrzjNC 6D3YG6uIG6gQyKtZHbjoyL0NLqUr4tl7/jBBQLlsNRBlj0BuokQdyDVDZmdGxTUvreQV DpU4y9pIHAclLKCtBsVBm+sDT2rTzMY/wCx2ZYwR2nPZ+eDbSBthToXD+m2GqMPd+fBt rs5h+GjS/wqr9FPO1iFc6RskGIh86CKp5lVERD2OWOC3a6Si8X2xUhU8zwN9s4wY7LKq H9Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from; bh=KUAGETbyvHbDESFEOrsCVgnLEemliWKlm+pVTWajAIg=; b=Jclk6xBWLj8Ph7HjKci+zTpS6vyCPgaFM78Q35rd0CJtcKbubpRlGqsnPeF2DXcG4d a0L5xBZoiGwJNmHkEiESybG6jVkVqaraFPNu1LSlyjuQTV8+y/cgsPyqGpCHxqycnIyu RamOX7yK9ijjMTDTV4wqkjuD+0vBBqag/jbyF23rWagmmSEcmZbBZBxabtP74uwl5t4D Ae31+qpdi3QLc7D+r9Hh9PNm/KYwXooBRfK4nyU5xAypKr0vhVnWwSBHGLogcz8KqQjs ZX+EnGlSSP41Gnhzxjpg+Z2TVsIlc2Isjml39TZVNe7ieT4Q+X1vSrmqJmwu8sVZVZbQ pLvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y5-v6si21290790plt.109.2018.11.15.04.08.55; Thu, 15 Nov 2018 04:09:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388084AbeKOWNX (ORCPT + 99 others); Thu, 15 Nov 2018 17:13:23 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:15105 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728757AbeKOWNX (ORCPT ); Thu, 15 Nov 2018 17:13:23 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 6F998E373AF37; Thu, 15 Nov 2018 20:05:14 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.408.0; Thu, 15 Nov 2018 20:04:40 +0800 From: YueHaibing To: Ben Skeggs , David Airlie CC: YueHaibing , , , , Subject: [PATCH -next] drm/nouveau: fix copy-paste error in nouveau_fence_wait_uevent_handler Date: Thu, 15 Nov 2018 12:14:02 +0000 Message-ID: <1542284042-153903-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/nouveau/nouveau_fence.c: In function 'nouveau_fence_wait_uevent_handler': drivers/gpu/drm/nouveau/nouveau_fence.c:156:27: warning: variable 'chan' set but not used [-Wunused-but-set-variable] nouveau_fence_update should use rcu protected 'chan' rather than 'fence->channel' Fixes: 0ec5f02f0e2c ("drm/nouveau: prevent stale fence->channel pointers, and protect with rcu") Signed-off-by: YueHaibing --- drivers/gpu/drm/nouveau/nouveau_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c index d4964f3..91286d0 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fence.c +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c @@ -157,7 +157,7 @@ fence = list_entry(fctx->pending.next, typeof(*fence), head); chan = rcu_dereference_protected(fence->channel, lockdep_is_held(&fctx->lock)); - if (nouveau_fence_update(fence->channel, fctx)) + if (nouveau_fence_update(chan, fctx)) ret = NVIF_NOTIFY_DROP; } spin_unlock_irqrestore(&fctx->lock, flags);