Re: [PATCH v6 15/24] dyndbg: refactor param_set_dyndbg_classes and below

[email protected] Wed, 8 Jul 2026 13:28:46 -0600
Newsgroups org.kernel.vger.linux-modules,dev.linux.lists.sashiko-reviews,org.freedesktop.lists.dri-devel
Message-ID <CAJfuBxykm2wyG+UOvYqjO_uJBuo52ArGApHn2nmgRu4i+WwccA@mail.gmail.com>
Hello,

The concern regarding old_bits in param_set_dyndbg_module_classes()
appears to be a false positive based on a misunderstanding of the
initialization order.

This is a sysfs parameter callback. By the time it is invoked, the
module has already been probed and ddebug_sync_classbits has updated
the module's pr-debugs to match the current parameter value.
Therefore, the global state (dcp->bits) correctly reflects the
module's state at the time of the callback. Using dcp->bits as
old_bits ensures we only toggle bits that have actually changed; using
0 as a baseline would result in redundant queries for settings already
synchronized during the probe sequence.

Thanks,
Jim