From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: "Ben Dooks (Codethink)" <ben.dooks@codethink.co.uk>
Cc: linux-kernel@lists.codethink.co.uk,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [V2] net: hwbm: if CONFIG_NET_HWBM unset, make stub functions static
Date: Tue, 22 Oct 2019 15:29:14 -0700 [thread overview]
Message-ID: <20191022152914.19790aea@cakuba.netronome.com> (raw)
In-Reply-To: <20191022152551.19730-1-ben.dooks@codethink.co.uk>
On Tue, 22 Oct 2019 16:25:51 +0100, Ben Dooks (Codethink) wrote:
> If CONFIG_NET_HWBM is not set, then these stub functions in
> <net/hwbm.h> should be declared static to avoid trying to
> export them from any driver that includes this.
>
> Fixes the following sparse warnings:
>
> ./include/net/hwbm.h:24:6: warning: symbol 'hwbm_buf_free' was not declared. Should it be static?
> ./include/net/hwbm.h:25:5: warning: symbol 'hwbm_pool_refill' was not declared. Should it be static?
> ./include/net/hwbm.h:26:5: warning: symbol 'hwbm_pool_add' was not declared. Should it be static?
>
> Signed-off-by: Ben Dooks (Codethink) <ben.dooks@codethink.co.uk>
Same story, going over 80 chars here, please fix and post v2.
> include/net/hwbm.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/net/hwbm.h b/include/net/hwbm.h
> index 81643cf8a1c4..76a303b2925c 100644
> --- a/include/net/hwbm.h
> +++ b/include/net/hwbm.h
> @@ -21,9 +21,9 @@ void hwbm_buf_free(struct hwbm_pool *bm_pool, void *buf);
> int hwbm_pool_refill(struct hwbm_pool *bm_pool, gfp_t gfp);
> int hwbm_pool_add(struct hwbm_pool *bm_pool, unsigned int buf_num);
> #else
> -void hwbm_buf_free(struct hwbm_pool *bm_pool, void *buf) {}
> -int hwbm_pool_refill(struct hwbm_pool *bm_pool, gfp_t gfp) { return 0; }
> -int hwbm_pool_add(struct hwbm_pool *bm_pool, unsigned int buf_num)
> +static inline void hwbm_buf_free(struct hwbm_pool *bm_pool, void *buf) {}
> +static inline int hwbm_pool_refill(struct hwbm_pool *bm_pool, gfp_t gfp) { return 0; }
> +static inline int hwbm_pool_add(struct hwbm_pool *bm_pool, unsigned int buf_num)
> { return 0; }
> #endif /* CONFIG_HWBM */
> #endif /* _HWBM_H */
prev parent reply other threads:[~2019-10-22 22:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 15:25 Ben Dooks (Codethink)
2019-10-22 22:29 ` Jakub Kicinski [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=20191022152914.19790aea@cakuba.netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=ben.dooks@codethink.co.uk \
--cc=davem@davemloft.net \
--cc=linux-kernel@lists.codethink.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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
all inboxes | Powered by JetHome®