RE: [PATCH 07/21] netfilter: nf_nat: remove inline marking of EXPORT_SYMBOL functions

From: David Laight
Date: Thu May 09 2013 - 05:51:35 EST


> EXPORT_SYMBOL and inline directives are contradictory to each other.
> The patch fixes this inconsistency.
...
> -inline const struct nf_nat_l4proto *
> +const struct nf_nat_l4proto *
> __nf_nat_l4proto_find(u8 family, u8 protonum)
> {
> return rcu_dereference(nf_nat_l4protos[family][protonum]);

If it makes sense to inline the local calls (ie the cost
of the call is significant) then possibly add an inlined
(or inlinable) static function that is called locally and
by the exported one?

I'm not sure that gcc is allowed to make the assumption
that the local exported function will be called - and
thus inline it.

David



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/