diff mbox

[V9fs-developer] Dubious use of inlines

Message ID 57110185.4060104@redhat.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Denys Vlasenko April 15, 2016, 2:58 p.m. UTC
Hi guys,

These particular inlines caught my eye while I was looking at
non-static inlines in the kernel.



commit 342fee1d5c7dfa05f4e14ec1e583df4553b09776
Author: Sripathi Kodi <sripathik@in.ibm.com>
Date:   Fri Mar 5 18:50:14 2010 +0000

    9P2010.L handshake: Remove "dotu" variable

    Removes 'dotu' variable and make everything dependent
    on 'proto_version' field.

    Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
    Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>

Why didn't you make them "static inline" and put them into client.h
instead of the above? As it stands now, the calls in protocol.c
are not inlined.

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
diff mbox

Patch

diff --git a/net/9p/client.c b/net/9p/client.c
index 3b5f3c9..9994676 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -58,6 +58,18 @@  static const match_table_t tokens = {
        {Opt_err, NULL},
 };

+inline int p9_is_proto_dotl(struct p9_client *clnt)
+{
+       return (clnt->proto_version == p9_proto_2010L);
+}
+EXPORT_SYMBOL(p9_is_proto_dotl);
+
+inline int p9_is_proto_dotu(struct p9_client *clnt)
+{
+       return (clnt->proto_version == p9_proto_2000u);
+}
+EXPORT_SYMBOL(p9_is_proto_dotu);