Re: [PATCH] staging/wlags49_hs: Fix build error when CONFIG_SYSFS is not set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>  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 kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux