From patchwork Tue Dec 5 23:17:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10094093 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C8CC960329 for ; Tue, 5 Dec 2017 23:17:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB979283FF for ; Tue, 5 Dec 2017 23:17:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B03B428535; Tue, 5 Dec 2017 23:17:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 435FB28334 for ; Tue, 5 Dec 2017 23:17:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752951AbdLEXRi (ORCPT ); Tue, 5 Dec 2017 18:17:38 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:36208 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752781AbdLEXRh (ORCPT ); Tue, 5 Dec 2017 18:17:37 -0500 Received: by mail-wr0-f195.google.com with SMTP id v105so2038978wrc.3 for ; Tue, 05 Dec 2017 15:17:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YH9v/wDk5Xv9EhHC/qJHjhdwmISSjXOf7iefapKl3ho=; b=QKHVrnDagtteeOfmZb1O+Ybm6KLWve4454DvkH1Wh7ooQSCcxEiV9psXyI/JikpljU jRdBh5wCfR32lfEISYreiqxTA9KUrP51NX66tC4hItPOCI/T++39A5VOzcA03RWVbmpY qsinMwak1ElzSQxJhwp1Ct6M1ZAh44kHBegVCggbUOXwHmPhiFbq5cpG5IHbuRKUnOhe iqvoX5pu75HpCLzpFjB/bE/h1KbVsk+RqdtvkB2EMn7tRmYzX574DJ/E+JtBQL+GRqFN 1nMacRxXCRcWbbu6Ne388H+YN8HP/RwgUrBgNHSkAuK2vD6r0l9NIq7hFyKP0rSd2f0m KbTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YH9v/wDk5Xv9EhHC/qJHjhdwmISSjXOf7iefapKl3ho=; b=ujcspEjOYgAZ7kvpOdlpNZcuFIHqgZc7r/dme5YttXrSFEIASEo/mluAC9UYdIJ9P7 EO83Sd2w65WIyn/Hps7LXFpqMsrS9F6P6I+I7ieWHib1eQZonN/kf4RN9iYB+JDiwvbz gQSkYUtj/VE3vp6a9XCYFCmEDQoccUBlQn2oxV/j62Mv8s1vb33N7Pq7GdXZvM9BI+OE nquSzDmW6hAjfs4IsvrcMpLo720o7pJrTEPIjNDmke3znztrlweTrBQJeiItD2VCrUZa gf0OGAFzv5E/IdzkLKxSQMohRY6V+Acsif65t0+dHvT+rBkTrJkXCtqGVu46ICNg/Fu8 V95g== X-Gm-Message-State: AKGB3mJIzMcAVdDU8MgO3WlITgTYPXlj3zisbZa9gaBIYld90/ArU55N TibOKBFjE0BxXuXfPLYgy3IChNrEJGQ= X-Google-Smtp-Source: AGs4zMY7mSEJjZ6BruvE2Zv0ruoyqN+kXYLT1s0NFJ8J4y7IY+9woVNmuJCbeKPllAM8V4NwFe03fA== X-Received: by 10.223.180.69 with SMTP id v5mr3970672wrd.193.1512515855727; Tue, 05 Dec 2017 15:17:35 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [70.74.179.152]) by smtp.gmail.com with ESMTPSA id k30sm1389129wrf.63.2017.12.05.15.17.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 15:17:34 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1eMMSy-00054b-CB; Tue, 05 Dec 2017 16:17:32 -0700 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org Cc: Jason Gunthorpe Subject: [PATCH 5/8] verbs: Remove bogus cq_fd Date: Tue, 5 Dec 2017 16:17:18 -0700 Message-Id: <20171205231721.19410-6-jgg@ziepe.ca> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171205231721.19410-1-jgg@ziepe.ca> References: <20171205231721.19410-1-jgg@ziepe.ca> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jason Gunthorpe No reason to call close on something we know is -1. This was left by accident after ABI version < 2 support was removed. Fixes: 6be16586e081 ("Infrastructure to support verbs extensions") Signed-off-by: Jason Gunthorpe --- libibverbs/device.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libibverbs/device.c b/libibverbs/device.c index 16a7d4caeac5a0..4fb759c6474ad7 100644 --- a/libibverbs/device.c +++ b/libibverbs/device.c @@ -275,7 +275,6 @@ LATEST_SYMVER_FUNC(ibv_close_device, 1_1, "IBVERBS_1.1", { int async_fd = context->async_fd; int cmd_fd = context->cmd_fd; - int cq_fd = -1; struct verbs_context *context_ex; struct verbs_device *verbs_device = verbs_get_device(context->device); struct ibv_device *device = context->device; @@ -291,8 +290,6 @@ LATEST_SYMVER_FUNC(ibv_close_device, 1_1, "IBVERBS_1.1", close(async_fd); close(cmd_fd); - if (abi_ver <= 2) - close(cq_fd); ibverbs_device_put(device); return 0;