Received: by 10.223.164.202 with SMTP id h10csp389504wrb; Thu, 30 Nov 2017 12:03:54 -0800 (PST) X-Google-Smtp-Source: AGs4zMawZQmtlnFFPLqu1CsJ7UI/tEaNJ9uk5lkc89lau3jlgtFG7EuOlM2nNxigzy2MvAuW9gVZ X-Received: by 10.101.74.8 with SMTP id s8mr3382652pgq.259.1512072234214; Thu, 30 Nov 2017 12:03:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512072234; cv=none; d=google.com; s=arc-20160816; b=JKVybFDYM03V+Pi/4sYyZeVS0OvOEPPOQM+hE+t+QubEyTAkgtZd1SdIRAHq/sCIH0 VmFZPEBOWcSjtkTRhv45FdxpfqNm3MlTeAVUdUdKJokppSYg0hxqN8rbtK7QmjGh3zW0 A9tL+WGwjlUeD6D0R2eTbg3mTtp/mwUsFYWWNyCShwIupzAtMrF6TDJ0Cwmmtw1rqsPR 2wevMMOazeTg8LwEYl9u9cq5dfTByUcjf1Eftx/3X616rQ6rWgE9+ScrXjEoAdAnhuWs m7Z1bgUxjXForeWLd4+4GYcY+R60Sd6kXgvx6k4yRQlGmur6b4iqQ2jFa+vYH0lfys0I 9JHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:arc-authentication-results; bh=oLA8EUE8S+6BWZg1yy71N7tDHOiZ5erOFlax89laFvE=; b=cH/CSQct1vuo97V1M/VDHeJFtI9P8tFGiJWO3eXA8/LogndoJbdFDH7nzp5qZKSvUv IDZki6Qz9H/bs0XErlyPpYd7HaawxrtlLt1ScCeWr9vHaO2HUQXZdH16jJfA/jmnCZA4 1x2p2eyoD9vPtpT5HsMLsUF4WLRZTpq8iMXXdp9eDIRYSoWahm8ctpOOl6LOmev1zkuy SWIFHoQsIofmc3QgY5EFq99n2wvPxHN75P0yr1tg3R1Qk4Q0MeWomsPOqxmq59GfnHkg dKPywhZOUC32ffdzaxC6RTcIge7r8/wIvb85nN74ntD5+0Jxb6MRlOTR7/xk+UKY9Hhj 8Gxg== 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 o88si3738164pfk.294.2017.11.30.12.03.39; Thu, 30 Nov 2017 12:03:54 -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 S1751582AbdK3UCs convert rfc822-to-8bit (ORCPT + 99 others); Thu, 30 Nov 2017 15:02:48 -0500 Received: from zimbra.linuxprofi.at ([93.83.54.199]:33956 "EHLO zimbra.linuxprofi.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750898AbdK3UCr (ORCPT ); Thu, 30 Nov 2017 15:02:47 -0500 X-Greylist: delayed 504 seconds by postgrey-1.27 at vger.kernel.org; Thu, 30 Nov 2017 15:02:47 EST Received: from localhost (localhost [127.0.0.1]) by zimbra.linuxprofi.at (Postfix) with ESMTP id B55ECC62885; Thu, 30 Nov 2017 20:54:38 +0100 (CET) Received: from zimbra.linuxprofi.at ([127.0.0.1]) by localhost (zimbra.linuxprofi.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id py3AOyGYQ0_t; Thu, 30 Nov 2017 20:54:38 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.linuxprofi.at (Postfix) with ESMTP id 6136FC629BE; Thu, 30 Nov 2017 20:54:38 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.linuxprofi.at Received: from zimbra.linuxprofi.at ([127.0.0.1]) by localhost (zimbra.linuxprofi.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id O6X27H_LiF0s; Thu, 30 Nov 2017 20:54:38 +0100 (CET) Received: from localhost (unknown [193.170.135.207]) by zimbra.linuxprofi.at (Postfix) with ESMTPSA id 33936C62538; Thu, 30 Nov 2017 20:54:38 +0100 (CET) From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= To: bskeggs@redhat.com, airlied@linux.ie Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= Subject: [PATCH] drm/nouveau/mmu: fix odd_ptr_err.cocci warnings Date: Thu, 30 Nov 2017 20:53:54 +0100 Message-Id: <20171130195354.14135-1-christoph@boehmwalder.at> X-Mailer: git-send-email 2.13.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The kbuild test bot complained about a new coccinelle warning nearby, which sparked a discussion about the assignment to 'memory' inside of the conditional expression. See Link below for the original post. Fix the assignment to silence the coccinelle warning and also make the code look a little nicer. Link: https://lists.freedesktop.org/archives/nouveau/2017-November/029242.html Signed-off-by: Christoph Böhmwalder --- drm/nouveau/nvkm/subdev/mmu/uvmm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drm/nouveau/nvkm/subdev/mmu/uvmm.c b/drm/nouveau/nvkm/subdev/mmu/uvmm.c index fa81d0c1..37b201b9 100644 --- a/drm/nouveau/nvkm/subdev/mmu/uvmm.c +++ b/drm/nouveau/nvkm/subdev/mmu/uvmm.c @@ -106,7 +106,8 @@ nvkm_uvmm_mthd_map(struct nvkm_uvmm *uvmm, void *argv, u32 argc) } else return ret; - if (IS_ERR((memory = nvkm_umem_search(client, handle)))) { + memory = nvkm_umem_search(client, handle); + if (IS_ERR(memory)) { VMM_DEBUG(vmm, "memory %016llx %ld\n", handle, PTR_ERR(memory)); return PTR_ERR(memory); } -- 2.13.6 From 1586088638283887329@xxx Thu Dec 07 01:59:57 +0000 2017 X-GM-THRID: 1586088638283887329 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread