Prev: staging:panel: Fixed coding conventions.
Next: [PATCH 5/7] KVM: MMU: cleanup for __mmu_unsync_walk()
From: Javier Martinez Canillas on 11 Jun 2010 08:50 >> extern void register_wlags_sysfs(struct net_device *); >> extern void unregister_wlags_sysfs(struct net_device *); >> #else >> -static void register_wlags_sysfs(struct net_device *) { return; }; >> -static void unregister_wlags_sysfs(struct net_device *) { return; }; >> +#define register_wlags_sysfs(net_device) { } >> +#define unregister_wlags_sysfs(net_device) { } >> #endif > > Yes, that works, but a better fix would be to remove the > semicolons after the function close braces. > --- Why would it be better? With a macro you avoid the overhead of a function call that does nothing. I personally think a macro fit better in this case. Best regards, ----------------------------------------- Javier Martínez Canillas +595 981 88 66 58 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Javier Martinez Canillas on 11 Jun 2010 18:20
On Fri, Jun 11, 2010 at 12:52 PM, Joe Perches <joe(a)perches.com> wrote: > On Fri, 2010-06-11 at 08:46 -0400, Javier Martinez Canillas wrote: > > Check the general kernel use of macros vs functions. > Functions verify proper arguments, macros do not. > > > I see. thank you very much for clarify this. I'm will generate a correct patch and resend. Best regards, ----------------------------------------- Javier Martínez Canillas +595 981 88 66 58 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |