From: Andrew Morton <akpm@linux-foundation.org>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: jbaron@akamai.com, viro@zeniv.linux.org.uk,
linux-kernel@vger.kernel.org, Davidlohr Bueso <dbueso@suse.de>
Subject: Re: [PATCH -next] fs/epoll: simply CONFIG_NET_RX_BUSY_POLL ifdefery
Date: Wed, 25 Jul 2018 12:35:13 -0700 [thread overview]
Message-ID: <20180725123513.5f36a6b787d06c8066a24ade@linux-foundation.org> (raw)
In-Reply-To: <20180725185620.11020-1-dave@stgolabs.net>
On Wed, 25 Jul 2018 11:56:20 -0700 Davidlohr Bueso <dave@stgolabs.net> wrote:
> ... 'tis easier on the eye.
true, but.
> +#else
> +#define ep_busy_loop(ep, nonblock) do { } while (0)
> +#define ep_reset_busy_poll_napi_id(ep) do { } while (0)
> +#define ep_set_busy_poll_napi_id(epi) do { } while (0)
> +
> +#endif /* CONFIG_NET_RX_BUSY_POLL */
inlines are preferred. Because macros are fugly and can cause
unused-var warnings when the stub versions are used.
This?
--- a/fs/eventpoll.c~fs-epoll-simply-config_net_rx_busy_poll-ifdefery-fix
+++ a/fs/eventpoll.c
@@ -449,9 +449,18 @@ static inline void ep_set_busy_poll_napi
}
#else
-#define ep_busy_loop(ep, nonblock) do { } while (0)
-#define ep_reset_busy_poll_napi_id(ep) do { } while (0)
-#define ep_set_busy_poll_napi_id(epi) do { } while (0)
+
+static inline void ep_busy_loop(struct eventpoll *ep, int nonblock)
+{
+}
+
+static inline void ep_reset_busy_poll_napi_id(struct eventpoll *ep)
+{
+}
+
+static inline void ep_set_busy_poll_napi_id(struct epitem *epi)
+{
+}
#endif /* CONFIG_NET_RX_BUSY_POLL */
_
next prev parent reply other threads:[~2018-07-25 19:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-25 18:56 Davidlohr Bueso
2018-07-25 19:35 ` Andrew Morton [this message]
2018-07-25 20:06 ` Davidlohr Bueso
2018-07-25 21:30 ` Andrew Morton
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=20180725123513.5f36a6b787d06c8066a24ade@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dave@stgolabs.net \
--cc=dbueso@suse.de \
--cc=jbaron@akamai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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®