From patchwork Mon May 11 20:43:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Squyres X-Patchwork-Id: 6384031 X-Patchwork-Delegate: dledford@redhat.com Return-Path: X-Original-To: patchwork-linux-rdma@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 8C94BBEEE1 for ; Mon, 11 May 2015 20:43:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C1FDE20C6D for ; Mon, 11 May 2015 20:43:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B997D20696 for ; Mon, 11 May 2015 20:43:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753628AbbEKUnr (ORCPT ); Mon, 11 May 2015 16:43:47 -0400 Received: from rcdn-iport-9.cisco.com ([173.37.86.80]:52334 "EHLO rcdn-iport-9.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753596AbbEKUnq (ORCPT ); Mon, 11 May 2015 16:43:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1312; q=dns/txt; s=iport; t=1431377026; x=1432586626; h=from:to:cc:subject:date:message-id; bh=g8aODJUkHnUAXCWcLpxxWWvx8xmPmij8mePOEtm6zMc=; b=CKMzL5gw5ps74gGGCX54YITiqgZz+mYxj2moDgYLrSgj1kkY1rGtC2bk x8jjiP7+mdp78fgJQgNOj4BcKvLOhpMByXk7F0R8bp6BCsHQPCUcs6e52 0xHzvevUp4lpP/Ycdg9taEAIRMNBDCN6FZxsvBAOf+w+mdGgrnxWiBDar 8=; X-IronPort-AV: E=Sophos;i="5.13,410,1427760000"; d="scan'208";a="415724952" Received: from alln-core-3.cisco.com ([173.36.13.136]) by rcdn-iport-9.cisco.com with ESMTP; 11 May 2015 20:43:45 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id t4BKhibJ016884; Mon, 11 May 2015 20:43:44 GMT Received: by cisco.com (Postfix, from userid 182726) id 589193FAAB8C; Mon, 11 May 2015 13:43:44 -0700 (PDT) From: Jeff Squyres To: linux-rdma@vger.kernel.org Cc: Jeff Squyres Subject: [PATCH v2] libibverbs init.c: remove stderr warnings if no userspace driver found Date: Mon, 11 May 2015 13:43:40 -0700 Message-Id: <1431377021-27932-1-git-send-email-jsquyres@cisco.com> X-Mailer: git-send-email 2.2.1 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-14.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY, USER_IN_DEF_DKIM_WL 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 Also the statically_linked variable, since it was only used when printing the stderr warning. Signed-off-by: Jeff Squyres --- src/init.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/init.c b/src/init.c index d0e4b1c..190608a 100644 --- a/src/init.c +++ b/src/init.c @@ -484,7 +484,6 @@ HIDDEN int ibverbs_init(struct ibv_device ***list) struct ibv_device *device; int num_devices = 0; int list_size = 0; - int statically_linked = 0; int no_driver = 0; int ret; @@ -537,7 +536,6 @@ HIDDEN int ibverbs_init(struct ibv_device ***list) if (!hand) { fprintf(stderr, PFX "Warning: dlopen(NULL) failed, " "assuming static linking.\n"); - statically_linked = 1; goto out; } dlclose(hand); @@ -561,13 +559,6 @@ out: next_dev = sysfs_dev ? sysfs_dev->next : NULL; sysfs_dev; sysfs_dev = next_dev, next_dev = sysfs_dev ? sysfs_dev->next : NULL) { - if (!sysfs_dev->have_driver) { - fprintf(stderr, PFX "Warning: no userspace device-specific " - "driver found for %s\n", sysfs_dev->sysfs_path); - if (statically_linked) - fprintf(stderr, " When linking libibverbs statically, " - "driver must be statically linked too.\n"); - } free(sysfs_dev); }