Re: [PATCH V2 1/6] rtla/osnoise: Add helper functions to manipulate osnoise/options

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

 



On Tue, 31 Jan 2023 17:30:02 +0100
Daniel Bristot de Oliveira <bristot@xxxxxxxxxx> wrote:

> +#define	OSNOISE_OPTION(name, option_str)						\
> +static int osnoise_get_##name(struct osnoise_context *context)				\
> +{											\
> +	if (context->opt_##name != OSNOISE_OPTION_INIT_VAL)				\
> +		return context->opt_##name;						\
> +											\
> +	if (context->orig_opt_##name != OSNOISE_OPTION_INIT_VAL)			\
> +		return context->orig_opt_##name;					\
> +											\
> +	context->orig_opt_##name = osnoise_options_get_option(option_str);		\
> +											\
> +	return context->orig_opt_##name;						\
> +}											\
> +											\

What you could have done is not make this into a super macro (as there's
only one instance of it). And then add a patch that turns it into this
macro as the first patch of a series that adds another user.

Because I don't understand why this exists when it only has one user.

-- Steve



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux