From patchwork Thu Mar 21 17:24:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10864143 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9279514DE for ; Thu, 21 Mar 2019 17:24:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F3A12A206 for ; Thu, 21 Mar 2019 17:24:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 635252A22F; Thu, 21 Mar 2019 17:24:30 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 14EBB2A220 for ; Thu, 21 Mar 2019 17:24:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728567AbfCURY3 (ORCPT ); Thu, 21 Mar 2019 13:24:29 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:39114 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728404AbfCURY3 (ORCPT ); Thu, 21 Mar 2019 13:24:29 -0400 Received: by mail-pg1-f196.google.com with SMTP id h8so4649797pgp.6 for ; Thu, 21 Mar 2019 10:24:29 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=rbBhvT1OaVzaU8rXl9+tiU1SRunX0MPKY8mqzwPbkxc=; b=ca8y92bs7hLChPDP5MQW2C8WWzUoa+rB7zlO4klwOV3ZtBji9IoQ4eb/l9CO8j4UvK +emKWRkCK8a86kKciiy5J8VCTZGdeDUvgimhGfkz9PsTi3AluG0/evzg24Fbm5JHVxe7 sp8LyTviKvBrYZMSXE2Dzf3CNO6HHLeBBAPCxq7w1kEsQh4b/nnePwNUBR6uGOfI7ia+ 8xQ3CbRCdVHdyoMSHRWDPh0pkEfdlIa6HIi+EHRSbCCph/i5WhGu0Geirh3RgpdBoHXX IeRqmeHDwp01txdtwinPGqspbHrfOnUsiD5xH8QOO7NTDsfubU4b13xgXGRBtNuvizp3 Mucw== X-Gm-Message-State: APjAAAWy1W71NAXR+1XIOVhaQaYzgH8qdX2MyICWuv6hs9VxhwKG79fX PL9cfZjlDdhAfys6bDw3J5g= X-Google-Smtp-Source: APXvYqy7iIwN6Ry1dDtEa04VOFsneN5hQqQLJiud0N5F+L8EbSbHWtrQAJB860iIM7LoGLOcw8Mcgg== X-Received: by 2002:a17:902:b201:: with SMTP id t1mr4743731plr.55.1553189068655; Thu, 21 Mar 2019 10:24:28 -0700 (PDT) Received: from desktop-bart.svl.corp.google.com ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id s184sm7528549pfb.1.2019.03.21.10.24.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 10:24:27 -0700 (PDT) From: Bart Van Assche To: Jason Gunthorpe Cc: Leon Romanovsky , Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche , Bodong Wang , Mark Bloch , Saeed Mahameed Subject: [PATCH 4/8] IB/mlx5: Only define uplink_rep_profile if CONFIG_MLX5_ESWITCH is enabled Date: Thu, 21 Mar 2019 10:24:13 -0700 Message-Id: <20190321172417.77869-5-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT In-Reply-To: <20190321172417.77869-1-bvanassche@acm.org> References: <20190321172417.77869-1-bvanassche@acm.org> MIME-Version: 1.0 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 This patch avoids that sparse complains about a missing declaration when building with CONFIG_MLX5_ESWITCH=n. Cc: Bodong Wang Cc: Mark Bloch Cc: Saeed Mahameed Fixes: f0666f1f22b5 ("IB/mlx5: Use unified register/load function for uplink and VF vports") # v5.1-rc1. Signed-off-by: Bart Van Assche --- drivers/infiniband/hw/mlx5/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 994c19d01211..bfecb75059ae 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -6476,6 +6476,7 @@ static const struct mlx5_ib_profile pf_profile = { mlx5_ib_stage_delay_drop_cleanup), }; +#ifdef CONFIG_MLX5_ESWITCH const struct mlx5_ib_profile uplink_rep_profile = { STAGE_CREATE(MLX5_IB_STAGE_INIT, mlx5_ib_stage_init_init, @@ -6520,6 +6521,7 @@ const struct mlx5_ib_profile uplink_rep_profile = { mlx5_ib_stage_post_ib_reg_umr_init, NULL), }; +#endif static void *mlx5_ib_add_slave_port(struct mlx5_core_dev *mdev) {