[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200615151414.GI31238@alley>
Date: Mon, 15 Jun 2020 17:14:14 +0200
From: Petr Mladek <pmladek@...e.com>
To: Jim Cromie <jim.cromie@...il.com>
Cc: jbaron@...mai.com, linux-kernel@...r.kernel.org,
akpm@...uxfoundation.org, gregkh@...uxfoundation.org,
linux@...musvillemoes.dk
Subject: Re: [PATCH v2 13/24] dyndbg: combine flags & mask into a struct, use
that
On Sat 2020-06-13 09:57:27, Jim Cromie wrote:
> combine flags & mask into a struct, and replace those 2 parameters in
> 3 functions: ddebug_change, ddebug_parse_flags, ddebug_read_flags,
> altering the derefs in them accordingly.
>
> This simplifies the 3 function sigs, preparing for more changes.
> We dont yet need mask from ddebug_read_flags, but will soon.
> ---
> lib/dynamic_debug.c | 46 +++++++++++++++++++++++----------------------
> 1 file changed, 24 insertions(+), 22 deletions(-)
>
> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
> index 93c627e9c094..8dc073a6e8a4 100644
> --- a/lib/dynamic_debug.c
> +++ b/lib/dynamic_debug.c
> @@ -62,6 +62,11 @@ struct ddebug_iter {
> unsigned int idx;
> };
>
> +struct flagsettings {
Please. use underscore to help with parsing such a long names.
I mean use: flags_settings.
> + unsigned int flags;
> + unsigned int mask;
> +};
static int ddebug_change(const struct ddebug_query *query,
> - unsigned int pflags, unsigned int mask)
> + struct flagsettings *mods)
> -static int ddebug_read_flags(const char *str, unsigned int *flags)
> +static int ddebug_read_flags(const char *str, struct flagsettings *f)
> -static int ddebug_parse_flags(const char *str, unsigned int *flagsp,
> - unsigned int *maskp)
> +static int ddebug_parse_flags(const char *str, struct flagsettings *mods)
What "mods" stands for, please?
I have to say that using a parameter called "mods" in a function
called parse_flags() is inconsistent and confusing.
Best Regards,
Petr
Powered by blists - more mailing lists