From patchwork Thu Sep 10 23:13:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 7156271 Return-Path: X-Original-To: patchwork-linux-nvdimm@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 4530BBEEC1 for ; Thu, 10 Sep 2015 23:18:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7FA932086C for ; Thu, 10 Sep 2015 23:18:53 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7605B2085A for ; Thu, 10 Sep 2015 23:18:52 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 66E771830C7; Thu, 10 Sep 2015 16:18:52 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by ml01.01.org (Postfix) with ESMTP id 99613183024 for ; Thu, 10 Sep 2015 16:18:50 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 10 Sep 2015 16:18:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,507,1437462000"; d="scan'208";a="642587536" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.137]) by orsmga003.jf.intel.com with ESMTP; 10 Sep 2015 16:18:47 -0700 Subject: [PATCH] ndctl: drop ndctl.h dependency in test-parent-uuid From: Dan Williams To: linux-nvdimm@lists.01.org Date: Thu, 10 Sep 2015 19:13:03 -0400 Message-ID: <20150910231253.33942.70223.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-8-g92dd MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, 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 ...to eliminate these warnings when falling back to the local ndctl.h. In file included from lib/test-parent-uuid.c:36:0: ./ndctl.h: In function ‘nvdimm_bus_cmd_name’: ./ndctl.h:127:2: warning: implicit declaration of function ‘ARRAY_SIZE’ [-Wimplicit-function-declaration] if (cmd < ARRAY_SIZE(names) && names[cmd]) ^ ./ndctl.h:127:2: warning: nested extern declaration of ‘ARRAY_SIZE’ [-Wnested-externs] ./ndctl.h:127:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (cmd < ARRAY_SIZE(names) && names[cmd]) ^ ./ndctl.h: In function ‘nvdimm_cmd_name’: ./ndctl.h:146:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (cmd < ARRAY_SIZE(names) && names[cmd]) ^ Cc: Vishal Verma Signed-off-by: Dan Williams Acked-by: Vishal Verma --- lib/test-parent-uuid.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/test-parent-uuid.c b/lib/test-parent-uuid.c index a9d7eb1ec2dc..ed0e7f88863b 100644 --- a/lib/test-parent-uuid.c +++ b/lib/test-parent-uuid.c @@ -30,13 +30,6 @@ #include -#ifdef HAVE_NDCTL_H -#include -#else -#include -#endif - - static const char *NFIT_TEST_MODULE = "nfit_test"; static const char *PROVIDER = "nfit_test.0"; @@ -149,7 +142,7 @@ static int do_test(struct ndctl_ctx *ctx) } ndctl_region_foreach(bus, region) - if (ndctl_region_get_nstype(region) == ND_DEVICE_NAMESPACE_BLK) { + if (strcmp(ndctl_region_get_type_name(region), "blk") == 0) { blk_region = region; break; }