From: David Miller <davem@davemloft.net>
To: arnd@arndb.de
Cc: andrew@lunn.ch, vivien.didelot@savoirfairelinux.com,
f.fainelli@gmail.com, brandon.streiff@ni.com,
richardcochran@gmail.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dsa: ptp; mark dummy helpers as 'inline'
Date: Thu, 22 Feb 2018 15:37:00 -0500 (EST) [thread overview]
Message-ID: <20180222.153700.511110622471984196.davem@davemloft.net> (raw)
In-Reply-To: <20180222114459.1272945-1-arnd@arndb.de>
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 22 Feb 2018 12:44:40 +0100
> 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 <arnd@arndb.de>
Applied, thanks Arnd.
prev parent reply other threads:[~2018-02-22 20:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-22 11:44 [PATCH] dsa: ptp; mark dummy helpers as 'inline' Arnd Bergmann
2018-02-22 12:48 ` Andrew Lunn
2018-02-22 14:51 ` Richard Cochran
2018-02-22 20:37 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180222.153700.511110622471984196.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=brandon.streiff@ni.com \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=vivien.didelot@savoirfairelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).