From patchwork Thu Feb 22 11:44:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 129218 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp1904335edc; Thu, 22 Feb 2018 03:45:51 -0800 (PST) X-Google-Smtp-Source: AH8x225uD8ZgruMrPZe8AYrUgf+TremrgEwb1WKntnQLoeff9aNOtujryO6FSVKmssndWZi4s7Bw X-Received: by 10.101.101.138 with SMTP id u10mr4787681pgv.299.1519299951375; Thu, 22 Feb 2018 03:45:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519299951; cv=none; d=google.com; s=arc-20160816; b=vESS/s8PlKEvx/Aefs6FYBYChQ0Z8K/FHoIuFXRSKdxGowZD9YstK0QagUK+Ze3IBK w+zPMqNsg6fBXowgyNDJ0s9S2A8MiENmZqcorIhXR1j8GIWtHrkJ38F5OCtp6N2LMUNY shUhp6LV/JfaFlVY1nD1EISzPOj7EU0592+ek/aABh7VNRqlPSlmMSN19VqNoPZKUIcU dFPWxjZhlV7XSeSkrJMe5qwi86f/kbHP9EnWQK8g28Mi7Pnyreg8VKvuSlJNPLPmnmLH kFbpWP3bZ7n1TU2DK6ddpPr/eWgodfx6UnDWTNtuEbkNyyvl51iedddly6i6hVS6M9Wf 9A3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Gym5+eWrnjYJpbxQcNjizATuU7YKHIrFVSW2RIUqcik=; b=Kl08o4X/tb+zePVt+9CpUaA1joKlmJxH4MzKoG4r98CYFGqs6ChnA6fefOmd6TTNqE EIi7X1KmpPn6ynzspwk4Z/NCp0ksMynLerMLq98a9hm/FYL/PmWFpmR7btoFMeiAhbo7 bfyWdjl+gIGVzTSg4QOaBiPnTnyMsWJpRDDQtb+kA0Mp4RvbJ21b0ansTnqevYFkH49d w5XIAuQRkebIKkflplbEyPk3sNpfCmDgN9LPoBzURdxW8aivfwmGtLDeQEZV6xYTzVk2 cH0fV6bdzBetycA2bb4Z+k0NzH6ROpqXc9xIQJdbrOrJkftPj1XrcJWHKPQd5tjg75P7 x03w== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x27si883564pgc.25.2018.02.22.03.45.51; Thu, 22 Feb 2018 03:45:51 -0800 (PST) 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 S932118AbeBVLpr (ORCPT + 28 others); Thu, 22 Feb 2018 06:45:47 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:35471 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753651AbeBVLpp (ORCPT ); Thu, 22 Feb 2018 06:45:45 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0LeM6H-1ePdS10irt-00q6zo; Thu, 22 Feb 2018 12:45:04 +0100 From: Arnd Bergmann To: Andrew Lunn , Vivien Didelot , Florian Fainelli Cc: Arnd Bergmann , "David S. Miller" , Brandon Streiff , Richard Cochran , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dsa: ptp; mark dummy helpers as 'inline' Date: Thu, 22 Feb 2018 12:44:40 +0100 Message-Id: <20180222114459.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n7t ZOT8xBnqO4SPePSg360NZ9h7DbBgKPY52rFMqw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Declaring a static function in a header leads to a warning every time that header gets included without the function being used: In file included from drivers/net/dsa/mv88e6xxx/chip.c:42: drivers/net/dsa/mv88e6xxx/ptp.h:92:13: error: 'mv88e6xxx_hwtstamp_work' defined but not used [-Werror=unused-function] static long mv88e6xxx_hwtstamp_work(struct ptp_clock_info *ptp) In file included from drivers/net/dsa/mv88e6xxx/chip.c:38: drivers/net/dsa/mv88e6xxx/global2.h:355:12: error: 'mv88e6xxx_g2_wait' defined but not used [-Werror=unused-function] static int mv88e6xxx_g2_wait(struct mv88e6xxx_chip *chip, int reg, u16 mask) ^~~~~~~~~~~~~~~~~ drivers/net/dsa/mv88e6xxx/global2.h:350:12: error: 'mv88e6xxx_g2_update' defined but not used [-Werror=unused-function] static int mv88e6xxx_g2_update(struct mv88e6xxx_chip *chip, int reg, u16 update) ^~~~~~~~~~~~~~~~~~~ drivers/net/dsa/mv88e6xxx/global2.h:345:12: error: 'mv88e6xxx_g2_write' defined but not used [-Werror=unused-function] static int mv88e6xxx_g2_write(struct mv88e6xxx_chip *chip, int reg, u16 val) ^~~~~~~~~~~~~~~~~~ drivers/net/dsa/mv88e6xxx/global2.h:340:12: error: 'mv88e6xxx_g2_read' defined but not used [-Werror=unused-function] static int mv88e6xxx_g2_read(struct mv88e6xxx_chip *chip, int reg, u16 *val) This marks all such functions in dsa inline to make sure we don't warn about them. Fixes: c6fe0ad2c349 ("net: dsa: mv88e6xxx: add rx/tx timestamping support") Fixes: 0d632c3d6fe3 ("net: dsa: mv88e6xxx: add accessors for PTP/TAI registers") Signed-off-by: Arnd Bergmann --- drivers/net/dsa/mv88e6xxx/global2.h | 8 ++++---- drivers/net/dsa/mv88e6xxx/ptp.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) -- 2.9.0 Reviewed-by: Andrew Lunn Acked-by: Richard Cochran diff --git a/drivers/net/dsa/mv88e6xxx/global2.h b/drivers/net/dsa/mv88e6xxx/global2.h index 25f92b3d7157..2a7c4f9b070c 100644 --- a/drivers/net/dsa/mv88e6xxx/global2.h +++ b/drivers/net/dsa/mv88e6xxx/global2.h @@ -337,22 +337,22 @@ static inline int mv88e6xxx_g2_require(struct mv88e6xxx_chip *chip) return 0; } -static int mv88e6xxx_g2_read(struct mv88e6xxx_chip *chip, int reg, u16 *val) +static inline int mv88e6xxx_g2_read(struct mv88e6xxx_chip *chip, int reg, u16 *val) { return -EOPNOTSUPP; } -static int mv88e6xxx_g2_write(struct mv88e6xxx_chip *chip, int reg, u16 val) +static inline int mv88e6xxx_g2_write(struct mv88e6xxx_chip *chip, int reg, u16 val) { return -EOPNOTSUPP; } -static int mv88e6xxx_g2_update(struct mv88e6xxx_chip *chip, int reg, u16 update) +static inline int mv88e6xxx_g2_update(struct mv88e6xxx_chip *chip, int reg, u16 update) { return -EOPNOTSUPP; } -static int mv88e6xxx_g2_wait(struct mv88e6xxx_chip *chip, int reg, u16 mask) +static inline int mv88e6xxx_g2_wait(struct mv88e6xxx_chip *chip, int reg, u16 mask) { return -EOPNOTSUPP; } diff --git a/drivers/net/dsa/mv88e6xxx/ptp.h b/drivers/net/dsa/mv88e6xxx/ptp.h index 992818ade746..10f271ab650d 100644 --- a/drivers/net/dsa/mv88e6xxx/ptp.h +++ b/drivers/net/dsa/mv88e6xxx/ptp.h @@ -89,7 +89,7 @@ void mv88e6xxx_ptp_free(struct mv88e6xxx_chip *chip); #else /* !CONFIG_NET_DSA_MV88E6XXX_PTP */ -static long mv88e6xxx_hwtstamp_work(struct ptp_clock_info *ptp) +static inline long mv88e6xxx_hwtstamp_work(struct ptp_clock_info *ptp) { return -1; } @@ -99,7 +99,7 @@ static inline int mv88e6xxx_ptp_setup(struct mv88e6xxx_chip *chip) return 0; } -static void mv88e6xxx_ptp_free(struct mv88e6xxx_chip *chip) +static inline void mv88e6xxx_ptp_free(struct mv88e6xxx_chip *chip) { }