lkml.org 
[lkml]   [2021]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6] dyndbg: recode for stronger precondition
On Wed, Sep 29, 2021 at 12:37:30PM -0600, Jim Cromie wrote:
> The table of struct _ddebugs, due to its construction by the linker,
> has an important property; namely that its "equal" fields have actual
> ptr-equality, not just strcmp-equality. Lets recognize that truth in
> dynamic_debug_init(), while slicing the builtin table into a
> per-module list.
> ---
> lib/dynamic_debug.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
> index cb5abb42c16a..817a87e9c37f 100644
> --- a/lib/dynamic_debug.c
> +++ b/lib/dynamic_debug.c
> @@ -1101,7 +1101,7 @@ static int __init dynamic_debug_init(void)
> iter_start = iter;
> for (; iter < __stop___dyndbg; iter++) {
> entries++;
> - if (strcmp(modname, iter->modname)) {
> + if (modname != iter->modname) {
> modct++;
> ret = ddebug_add_module(iter_start, n, modname);
> if (ret)
> --
> 2.31.1
>

Always run checkpatch on a patch so you do not get a grumpy kernel
developer telling you to run checkpatch on your patch :(

I can't take this for the obvious reasons here...

thanks,

greg k-h

\
 
 \ /
  Last update: 2021-09-30 08:07    [W:0.104 / U:0.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site