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: 8648991 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4AC829F44D for ; Wed, 23 Mar 2016 10:39:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6B967203A4 for ; Wed, 23 Mar 2016 10:38:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8AB9A203AB for ; Wed, 23 Mar 2016 10:38:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752899AbcCWKi5 (ORCPT ); Wed, 23 Mar 2016 06:38:57 -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-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 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") Reviewed-by: Leon Romanovsky Reviewed-by: Eli Cohen --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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);