[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150407.115821.441881623894604515.davem@davemloft.net>
Date: Tue, 07 Apr 2015 11:58:21 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: hannes@...essinduktion.org
Cc: netdev@...r.kernel.org, netfilter-devel@...r.kernel.org,
pablo@...filter.org, jiri@...nulli.us
Subject: Re: [PATCH 1/4] netfilter: Add nf_hook_state initializer function.
From: Hannes Frederic Sowa <hannes@...essinduktion.org>
Date: Tue, 07 Apr 2015 15:41:21 +0200
> Minor suggestion:
>
> I think we can return the structure as a whole:
>
> static inline struct nf_hook_state nf_hook_state_init(unsigned int hook,
> ...).
>
> Being static inline it should not make any difference.
If by some insane possibility this does not get inlined, this structure
gets copied to and from the kernel stack on some cpu ABIs in order to
return it.
Never return structures from functions, ever.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists