All of lore.kernel.org
 help / color / mirror / Atom feed
From: jim.cromie@gmail.com
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 3/9] dyndbg: add DEFINE_DYNAMIC_DEBUG_CATEGORIES and callbacks
Date: Fri, 13 Aug 2021 11:49:57 -0600	[thread overview]
Message-ID: <CAJfuBxzkWuK-Xh-2gynmLeHx+gb6bwhbKTG02pydYvQzNBiPjA@mail.gmail.com> (raw)
In-Reply-To: <YRaU6fbGjcV7BGC/@smile.fi.intel.com>

> >
> > There is still plenty of bikeshedding to do.
>
> > ---
> > v4+:
> >
> > . rename to DEFINE_DYNAMIC_DEBUG_CATEGORIES from DEFINE_DYNDBG_BITMAP
> > . in query, replace hardcoded "i915" w kp->mod->name
> > . static inline the stubs
> > . const *str in structs, const array. -Emil
> > . dyndbg: add do-nothing DEFINE_DYNAMIC_DEBUG_CATEGORIES if !DD_CORE
> > . call MOD_PARM_DESC(name, "$desc") for users
> > . simplify callback, remove bit-change detection
> > . config errs reported by <lkp@intel.com>
> >
> > ddh-helpers
>
> > Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
>
> So, it is signed or not? I didn't get (perhaps due to misplaced changlog?).
>

It might be my --- snip, and reliance on format-patch -s

would it work if I used --  2char snip ?

> ...
>
> >  } __attribute__((aligned(8)));
> >
> >
>
> Do we need two blank lines here?
>
> > +struct kernel_param;
>
> ...
>
> > +int param_set_dyndbg(const char *instr, const struct kernel_param *kp)
> > +{
> > +     unsigned long inbits;
> > +     int rc, i, chgct = 0, totct = 0;
> > +     char query[OUR_QUERY_SIZE];
> > +     struct dyndbg_bitdesc *bitmap = (struct dyndbg_bitdesc *) kp->data;
>
> So you need space after ')' ?
>
> > +     rc = kstrtoul(instr, 0, &inbits);
> > +     if (rc) {
> > +             pr_err("set_dyndbg: failed\n");
>
> > +             return -EINVAL;
>
> Why not to return rc?
>
> > +     }
> > +     vpr_info("set_dyndbg: input 0x%lx\n", inbits);
> > +
> > +     for (i = 0; !!bitmap[i].prefix; i++) {
>
> Hmm... Why not simply
>
>         for (bitmap = ...; bitmap->prefix; bitmap++) {
>
> ?
>
> > +
>
> Redundant blank line.
>
> > +             sprintf(query, "format '^%s' %cp", bitmap[i].prefix,
> > +                     test_bit(i, &inbits) ? '+' : '-');
>
> snprintf() ?
>
> > +
> > +             chgct = dynamic_debug_exec_queries(query, kp->mod->name);
> > +
> > +             v2pr_info("bit-%d: %d changes by '%s'\n", i, chgct, query);
> > +             totct += chgct;
> > +     }
> > +     vpr_info("total changes: %d\n", totct);
> > +     return 0;
> > +}
>
> ...
>
> > +     return scnprintf(buffer, PAGE_SIZE, "%u\n",
> > +                      *((unsigned int *)kp->arg));
>
> One line.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>

  parent reply	other threads:[~2021-08-13 17:50 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 15:17 [PATCH v5 0/9] dyndbg: add DEFINE_DYNAMIC_DEBUG_CATEGORIES and use in DRM Jim Cromie
2021-08-13 15:17 ` [Intel-gfx] " Jim Cromie
2021-08-13 15:17 ` [PATCH v5 1/9] drm/print: fixup spelling in a comment Jim Cromie
2021-08-13 15:17   ` [Intel-gfx] " Jim Cromie
2021-08-13 15:17 ` [PATCH v5 2/9] moduleparam: add data member to struct kernel_param Jim Cromie
2021-08-13 15:17   ` [Intel-gfx] " Jim Cromie
2021-08-13 15:43   ` Andy Shevchenko
2021-08-13 15:43     ` [Intel-gfx] " Andy Shevchenko
2021-08-13 17:14     ` jim.cromie
2021-08-13 17:14       ` [Intel-gfx] " jim.cromie
2021-08-13 15:17 ` [PATCH v5 3/9] dyndbg: add DEFINE_DYNAMIC_DEBUG_CATEGORIES and callbacks Jim Cromie
2021-08-13 15:17   ` [Intel-gfx] " Jim Cromie
2021-08-13 15:51   ` Andy Shevchenko
2021-08-13 15:51     ` [Intel-gfx] " Andy Shevchenko
2021-08-13 16:08     ` Matthew Wilcox
2021-08-13 16:08       ` [Intel-gfx] " Matthew Wilcox
2021-08-13 17:49     ` jim.cromie [this message]
2021-08-13 19:33       ` Andy Shevchenko
2021-08-13 15:17 ` [PATCH v5 4/9] i915/gvt: remove spaces in pr_debug "gvt: core:" etc prefixes Jim Cromie
2021-08-13 15:17   ` [Intel-gfx] " Jim Cromie
2021-08-13 15:17 ` [PATCH v5 5/9] i915/gvt: use DEFINE_DYNAMIC_DEBUG_CATEGORIES to create "gvt:core:" etc categories Jim Cromie
2021-08-13 15:17   ` [Intel-gfx] " Jim Cromie
2021-08-13 15:17 ` [PATCH v5 6/9] amdgpu: use DEFINE_DYNAMIC_DEBUG_CATEGORIES to control categorized pr_debugs Jim Cromie
2021-08-13 15:17   ` [Intel-gfx] " Jim Cromie
2021-08-13 15:17 ` [PATCH v5 7/9] drm_print: add choice to use dynamic debug in drm-debug Jim Cromie
2021-08-13 15:17   ` [Intel-gfx] " Jim Cromie
2021-08-13 15:17 ` [PATCH v5 8/9] amdgpu_ucode: reduce number of pr_debug calls Jim Cromie
2021-08-13 15:17   ` [Intel-gfx] " Jim Cromie
2021-08-13 15:17 ` [PATCH v5 9/9] dyndbg: RFC add tracer facility RFC Jim Cromie
2021-08-13 15:17   ` [Intel-gfx] " Jim Cromie
2021-08-13 16:35 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for dyndbg: add DEFINE_DYNAMIC_DEBUG_CATEGORIES and use in DRM Patchwork
2021-08-13 17:02 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-08-13 21:07 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJfuBxzkWuK-Xh-2gynmLeHx+gb6bwhbKTG02pydYvQzNBiPjA@mail.gmail.com \
    --to=jim.cromie@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.