From patchwork Thu Oct 13 19:56:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9375659 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 5A87D60865 for ; Thu, 13 Oct 2016 19:57:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51F512A1A7 for ; Thu, 13 Oct 2016 19:57:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46F4A2A1A9; Thu, 13 Oct 2016 19:57:15 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 DC2F52A1A7 for ; Thu, 13 Oct 2016 19:57:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756049AbcJMT5N (ORCPT ); Thu, 13 Oct 2016 15:57:13 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:40248 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753550AbcJMT5L (ORCPT ); Thu, 13 Oct 2016 15:57:11 -0400 Received: from [83.175.99.196] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.85_2 #1 (Red Hat Linux)) id 1bum75-0000v6-3O for linux-rdma@vger.kernel.org; Thu, 13 Oct 2016 19:56:23 +0000 From: Christoph Hellwig To: linux-rdma@vger.kernel.org Subject: [PATCH 01/17] cxgb3: handle global variables properly Date: Thu, 13 Oct 2016 21:56:00 +0200 Message-Id: <1476388576-22863-2-git-send-email-hch@lst.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1476388576-22863-1-git-send-email-hch@lst.de> References: <1476388576-22863-1-git-send-email-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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 We'll need to define them in one compilation unit and use an extern declaration in the headers. Signed-off-by: Christoph Hellwig Reviewed-by: Steve Wise --- providers/cxgb3/cxio_wr.h | 6 +++--- providers/cxgb3/iwch.c | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/providers/cxgb3/cxio_wr.h b/providers/cxgb3/cxio_wr.h index e154795..d56c529 100644 --- a/providers/cxgb3/cxio_wr.h +++ b/providers/cxgb3/cxio_wr.h @@ -633,9 +633,9 @@ static inline unsigned t3_cq_depth(struct t3_cq *cq) return (1UL<size_log2); } -unsigned long iwch_page_size; -unsigned long iwch_page_shift; -unsigned long iwch_page_mask; +extern unsigned long iwch_page_size; +extern unsigned long iwch_page_shift; +extern unsigned long iwch_page_mask; #define PAGE_ALIGN(x) (((x) + iwch_page_mask) & ~iwch_page_mask) diff --git a/providers/cxgb3/iwch.c b/providers/cxgb3/iwch.c index aa9b108..804726c 100644 --- a/providers/cxgb3/iwch.c +++ b/providers/cxgb3/iwch.c @@ -105,6 +105,10 @@ static struct ibv_context_ops iwch_ctx_ops = { .req_notify_cq = iwch_arm_cq, }; +unsigned long iwch_page_size; +unsigned long iwch_page_shift; +unsigned long iwch_page_mask; + static struct ibv_context *iwch_alloc_context(struct ibv_device *ibdev, int cmd_fd) {