From patchwork Wed Mar 23 10:37:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102540 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2583551lbc; Wed, 23 Mar 2016 03:39:06 -0700 (PDT) X-Received: by 10.66.237.39 with SMTP id uz7mr2887015pac.141.1458729546405; Wed, 23 Mar 2016 03:39:06 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rn14si3534484pab.155.2016.03.23.03.39.05; Wed, 23 Mar 2016 03:39:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754805AbcCWKjD (ORCPT + 29 others); Wed, 23 Mar 2016 06:39:03 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:54114 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751816AbcCWKi4 (ORCPT ); Wed, 23 Mar 2016 06:38:56 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0LsL60-1ZlKKA3PRI-01244A; Wed, 23 Mar 2016 11:38:27 +0100 From: Arnd Bergmann To: Doug Ledford Cc: Arnd Bergmann , Matan Barak , Leon Romanovsky , Sean Hefty , Hal Rosenstock , Sagi Grimberg , "David S. Miller" , Haggai Eran , "majd@mellanox.com" , Saeed Mahameed , Maor Gottlieb , Haggai Abramovsky , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] IB/mlx5: fix VFs callback function prototypes Date: Wed, 23 Mar 2016 11:37:45 +0100 Message-Id: <1458729502-3155671-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:opydeebIzw+xnS0S7tWneH+9scItKK/BT0YIin8RkIQYLKgXzdy rgtjIP0r9UiaqGzvoqJ6L8yLs77uLxO5b26iu8waOXB525qZzR+VXVF8gukfp0if5nfdJLr VBLwM2Tal73pcTCq1mDFG9axrm8gTJ6gMppVRM/a0a4nzVc701KuApa+4BLqM3qcL+LyvaD v448tNGZqRKXCmyEDFuPA== X-UI-Out-Filterresults: notjunk:1; V01:K0:3M1PQ9iVaRU=:tT4MAwNLYqLBrYNnrAOMR6 KwoOun/WaNpHUwsQL9EBWWKpthaTUuUVVN4U3729000i1e3S08aV8IcmEsLExAbZRh9esh/jJ vTyCjKjyPnIlF+EpVM6gSjpn/HglKPu2Cp2pKVLzBl+qel5I4LWPBthueVPooGnD5AJ/CtTpF GsmqrzlLrqDpJcvs7dHJeaCXNLZP27rT9k+YtcpS6YlsPqEAXSe00Qz7ERJwvWq2d27r2b5Et usWtutTPMsldGzs8AbVaQzBiA3eZ1BZXxwuFbpULoGI0wZw0yloG79IGe11wuyxj4mfao5DP2 E6MG6YnAGve1/XDO4U0MUzQPpMSJOo50MxTuxA+hrgSxlog16TXpCQVLOdaNoe4JTJA+7EdlI TolzufUNTSdL5qzP3KlGcTW4rgo7KlEPrMsYXAngwkTHgYa/e8Xv3fh7fzbBXWmt272ncbXwA SPVmj+CAckMpnQlE8dXSM5nkWDNr7ty0A7LuyZT9zG1dMtBPp6wKkDTF1yJZ9wqY2PjjXFIXW SCRsesiBun46JLveq7TZqZtaTEOJhC/OOC72b3vuhJ2FmZVuiDrEbOMIbRL8gSfzfL02wmLPG vh4kyoODEarH4hj3TJ58SDSvFDmILrP9cLZrU8ih5dOtYRJnUEcCPBcsP2hEAmA34qU7/xaZ8 74JjuLW1dxTYhkeFSsrBcwhKONsayXNKo5oj0ACq6l4ldSSDhKQfNpUS34KTvaRuUu3k= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The previous patch that added a couple of callback functions put the declarations inside of an #ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING, which causes the build to fail if that option is disabled: drivers/infiniband/hw/mlx5/main.c: In function 'mlx5_ib_add': drivers/infiniband/hw/mlx5/main.c:2358:31: error: 'mlx5_ib_get_vf_config' undeclared (first use in this function) This moves the four declarations below the #ifdef section so they are always available. Signed-off-by: Arnd Bergmann Fixes: eff901d30e6c ("IB/mlx5: Implement callbacks for manipulating VFs") --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) -- 2.7.0 diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h index f16c818ad2e6..b46c25542a7c 100644 --- a/drivers/infiniband/hw/mlx5/mlx5_ib.h +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h @@ -776,15 +776,6 @@ void mlx5_ib_qp_disable_pagefaults(struct mlx5_ib_qp *qp); void mlx5_ib_qp_enable_pagefaults(struct mlx5_ib_qp *qp); void mlx5_ib_invalidate_range(struct ib_umem *umem, unsigned long start, unsigned long end); -int mlx5_ib_get_vf_config(struct ib_device *device, int vf, - u8 port, struct ifla_vf_info *info); -int mlx5_ib_set_vf_link_state(struct ib_device *device, int vf, - u8 port, int state); -int mlx5_ib_get_vf_stats(struct ib_device *device, int vf, - u8 port, struct ifla_vf_stats *stats); -int mlx5_ib_set_vf_guid(struct ib_device *device, int vf, u8 port, - u64 guid, int type); - #else /* CONFIG_INFINIBAND_ON_DEMAND_PAGING */ static inline void mlx5_ib_internal_fill_odp_caps(struct mlx5_ib_dev *dev) { @@ -801,6 +792,15 @@ static inline void mlx5_ib_qp_enable_pagefaults(struct mlx5_ib_qp *qp) {} #endif /* CONFIG_INFINIBAND_ON_DEMAND_PAGING */ +int mlx5_ib_get_vf_config(struct ib_device *device, int vf, + u8 port, struct ifla_vf_info *info); +int mlx5_ib_set_vf_link_state(struct ib_device *device, int vf, + u8 port, int state); +int mlx5_ib_get_vf_stats(struct ib_device *device, int vf, + u8 port, struct ifla_vf_stats *stats); +int mlx5_ib_set_vf_guid(struct ib_device *device, int vf, u8 port, + u64 guid, int type); + __be16 mlx5_get_roce_udp_sport(struct mlx5_ib_dev *dev, u8 port_num, int index);