From patchwork Sun Sep 18 08:44:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76451 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp445662qgf; Sun, 18 Sep 2016 01:44:45 -0700 (PDT) X-Received: by 10.66.123.105 with SMTP id lz9mr37705529pab.56.1474188285255; Sun, 18 Sep 2016 01:44:45 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m2si21697112pam.255.2016.09.18.01.44.44; Sun, 18 Sep 2016 01:44:45 -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; dkim=pass header.i=@linaro.org; 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; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755776AbcIRIom (ORCPT + 27 others); Sun, 18 Sep 2016 04:44:42 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:36727 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754492AbcIRIof (ORCPT ); Sun, 18 Sep 2016 04:44:35 -0400 Received: by mail-pf0-f181.google.com with SMTP id q2so20669891pfj.3 for ; Sun, 18 Sep 2016 01:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=ndq1KF+HeO9qFADunet60XdmnirK/1K8mOs+VlBe0W8=; b=UYb5aAI8mVUbNa9/szTxhRLMF6++zfKSvSG3iul4CSx3Yv5vuRpoX09A2JXJe4TJwD IRTD6QH1hGe4i8ph+XF3ZhYDFBg9uywTLgorLNLZFnJsml+flS9OQ3t+Z7Au0TJHOy41 PcmYAoLH6dohIeAxCVqgIFWExKqu9Fiy5VPys= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ndq1KF+HeO9qFADunet60XdmnirK/1K8mOs+VlBe0W8=; b=lk1X/82DrX5Trr/DG8GcI2y2L/ae4W42ATG5UNA5DLtLwkfgzw9bcolzsR6BHCWLSr hQjA5+iV0hzxyJQj6kEsUvKgsCRctEItPwvKmkwbVP68ScE+UrAkvPSaczBFCXkduJbO WKCiv31VUfSGs0fbye7/H4zXQR5e21JxqHwTFKDMTdogaxK7Pd95jGkOvTwM0c4gBCWM 1DG3IM+puD7xvqkZniHkr6l85iFPydjw+mmcB3ZIUkqZAaKfSYo7lG/BQ5fbwnRAgRPM N/3q6rZpcPCqX6pa4AbUKJSlivjJo2OQKlA4rkNW5cucpuD2jMVlKiguSR9IRYfmRqg9 CuCw== X-Gm-Message-State: AE9vXwOBEgJ+cdUghYcI9U5C/+HaP6EnXVotnmocSEWuO8fU8HWC3LMdr3/9jfLHL3r56zZ/ X-Received: by 10.98.198.70 with SMTP id m67mr3445302pfg.34.1474188275080; Sun, 18 Sep 2016 01:44:35 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.27]) by smtp.gmail.com with ESMTPSA id y184sm63243874pfg.94.2016.09.18.01.44.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 18 Sep 2016 01:44:34 -0700 (PDT) From: Baoyou Xie To: matanb@mellanox.com, leonro@mellanox.com Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH] net/mlx5: clean function declarations in eswitch.c up Date: Sun, 18 Sep 2016 16:44:22 +0800 Message-Id: <1474188262-9929-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We get 2 warnings when building kernel with W=1: drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c:463:5: warning: no previous prototype for 'esw_offloads_init' [-Wmissing-prototypes] drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c:521:6: warning: no previous prototype for 'esw_offloads_cleanup' [-Wmissing-prototypes] In fact, both functions are declared in drivers/net/ethernet/mellanox/mlx5/core/eswitch.c,but should be declared in a header file, thus can be recognized in other file. So this patch moves the declarations into drivers/net/ethernet/mellanox/mlx5/core/eswitch.h Signed-off-by: Baoyou Xie --- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 3 --- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c index 1014305..b453cb6 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c @@ -81,9 +81,6 @@ enum { MC_ADDR_CHANGE | \ PROMISC_CHANGE) -int esw_offloads_init(struct mlx5_eswitch *esw, int nvports); -void esw_offloads_cleanup(struct mlx5_eswitch *esw, int nvports); - static int arm_vport_context_events_cmd(struct mlx5_core_dev *dev, u16 vport, u32 events_mask) { diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h index a961409..3bc5336 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h @@ -201,6 +201,9 @@ struct mlx5_eswitch { int mode; }; +void esw_offloads_cleanup(struct mlx5_eswitch *esw, int nvports); +int esw_offloads_init(struct mlx5_eswitch *esw, int nvports); + /* E-Switch API */ int mlx5_eswitch_init(struct mlx5_core_dev *dev); void mlx5_eswitch_cleanup(struct mlx5_eswitch *esw);