From patchwork Thu May 14 16:04:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 6407221 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 74984C0432 for ; Thu, 14 May 2015 16:04:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 60E0320465 for ; Thu, 14 May 2015 16:04:38 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 476CA20461 for ; Thu, 14 May 2015 16:04:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 54ECB6E379; Thu, 14 May 2015 09:04:36 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 1C6FF6E376 for ; Thu, 14 May 2015 09:04:34 -0700 (PDT) Received: by wguv19 with SMTP id v19so18466636wgu.1 for ; Thu, 14 May 2015 09:04:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=xSdo2FAhetwROeuaiHGGO7Uu+WrA/H5kq7gumDPOd/w=; b=b/m5+mrFbqbgY8tJREg5q33C1TM2VGu/CPP7XdWskgWK0zYTsWM109JVb9jSTVRUb4 m/u7qHPXpL2HamnFoQ2/F7o4G2PO3Cth/4uHp6WesBOlGbRk8Hz0BOaJkltlhvP5pLK2 azQHhr9tjVmXBsMlijbmS99mvarrywllWoXSrR4fQWrzouHkR2yqMdTk/wdHLhnxqvIL nvjpauMa6jQFwwgARCHPJIIxjjGLHxT2Fm67yrXC+HBSt6BOr3q5Ipcs5ZGXBXu2QNmb 6pWxkoSafCC6bxvHeYs6prazntkVNsydBvPsRU+YzIs+chezS9z1UjHMjEtOledrzC6H X06A== X-Gm-Message-State: ALoCoQmzGDnTrFkaexCx0zP3PtC1Em7pecefeQyxelaG1/RdQBJz1RY1FupwSKpOY4wfn1fBj3cp X-Received: by 10.180.88.99 with SMTP id bf3mr50095728wib.75.1431619472991; Thu, 14 May 2015 09:04:32 -0700 (PDT) Received: from pistachio.icx.intel.com ([83.217.123.106]) by mx.google.com with ESMTPSA id ew15sm13678613wjd.17.2015.05.14.09.04.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 09:04:31 -0700 (PDT) From: Thomas Wood To: intel-gfx@lists.freedesktop.org Date: Thu, 14 May 2015 17:04:25 +0100 Message-Id: <1431619466-3914-2-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1431619466-3914-1-git-send-email-thomas.wood@intel.com> References: <1431619466-3914-1-git-send-email-thomas.wood@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 2/3] igt.cocci: don't use igt_assert_neq to compare pointers X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP igt_assert_neq can only compare integers, not pointers. Signed-off-by: Thomas Wood --- lib/igt.cocci | 2 +- tests/prime_udl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/igt.cocci b/lib/igt.cocci index f23b511..3aee72f 100644 --- a/lib/igt.cocci +++ b/lib/igt.cocci @@ -193,7 +193,7 @@ expression ptr, size, nmemb, stream; expression list E; @@ -fgets(E); -+igt_assert_neq(fgets(E), NULL); ++igt_assert(fgets(E) != NULL); @@ identifier func =~ "^v?asprintf$"; diff --git a/tests/prime_udl.c b/tests/prime_udl.c index d03aee0..b742f1c 100644 --- a/tests/prime_udl.c +++ b/tests/prime_udl.c @@ -61,7 +61,7 @@ static int find_and_open_devices(void) if (!fl) break; - igt_assert_neq(fgets(vendor_id, 8, fl), NULL); + igt_assert(fgets(vendor_id, 8, fl) != NULL); fclose(fl); venid = strtoul(vendor_id, NULL, 16);