On Wed, Sep 18, 2024 at 04:29:14PM +0200, Pablo Neira Ayuso wrote: > On Wed, Sep 18, 2024 at 04:55:15PM +0300, Andy Shevchenko wrote: > > On Wed, Sep 18, 2024 at 01:52:14PM +0200, Pablo Neira Ayuso wrote: > > > On Mon, Sep 16, 2024 at 04:14:40PM +0100, Simon Horman wrote: > > > > Hi, > > > > > > > > This short series updates conditional compilation of label helpers to: > > > > > > > > 1) Compile them regardless of if CONFIG_NF_CONNTRACK_LABELS is enabled > > > > or not. It is safe to do so as the functions will always return 0 if > > > > CONFIG_NF_CONNTRACK_LABELS is not enabled. And the compiler should > > > > optimise waway the code. Which is the desired behaviour. > > > > > > > > 2) Only compile ctnetlink_label_size if CONFIG_NF_CONNTRACK_EVENTS is > > > > enabled. This addresses a warning about this function being unused > > > > in this case. > > > > > > Patch 1) > > > > > > -#ifdef CONFIG_NF_CONNTRACK_LABELS > > > static inline int ctnetlink_label_size(const struct nf_conn *ct) > > > > > > Patch 2) > > > > > > +#ifdef CONFIG_NF_CONNTRACK_EVENTS > > > static inline int ctnetlink_label_size(const struct nf_conn *ct) > > > > > > They both refer to ctnetlink_label_size(), #ifdef check is not > > > correct. > > > > But the first one touches more, no? > > Yes, it also remove a #define ctnetlink_label_size() macro in patch #1. > I am fine with this series as is. What I meant is that the original patch 1 takes care about definitions of two functions. Not just a single one. -- With Best Regards, Andy Shevchenko