Re: [PATCH] watchdog: delete old declarations for watchdog_soft,hardlockup_user_enabled + make static

From: Petr Mladek
Date: Mon May 29 2023 - 10:08:57 EST


On Thu 2023-05-25 16:28:32, Douglas Anderson wrote:
> From: Tom Rix <trix@xxxxxxxxxx>
>
> smatch reports
> kernel/watchdog.c:40:19: warning: symbol
> 'watchdog_hardlockup_user_enabled' was not declared. Should it be static?
> kernel/watchdog.c:41:19: warning: symbol
> 'watchdog_softlockup_user_enabled' was not declared. Should it be static?
>
> These variables are only used in their defining file, so they should
> be static.
>
> This problem showed up after the patch ("watchdog/hardlockup: rename
> some "NMI watchdog" constants/function") because that rename missed
> the header file. That didn't cause any compile-time errors because,
> since commit dd0693fdf054 ("watchdog: move watchdog sysctl interface
> to watchdog.c"), nobody outside of "watchdog.c" was actually referring
> to them. Thus, not only should we make these variables static but we
> should remove the old declarations in the header file that we missed
> renaming.
>
> Fixes: 4b95b620dcd5 ("watchdog/hardlockup: rename some "NMI watchdog" constants/function")

This would need to be a hash which exists or is going to be merged
into Linus' tree. I am afraid that this is not the case here.
Andrew maintains branches in quilt and the patches have different
time in linux-next each time. Also the patchset might still need
a rebase even when it was maintained in git.

> Signed-off-by: Tom Rix <trix@xxxxxxxxxx>
> [dianders: updated subject + commit message; squashed in Petr's suggestion]
> Suggested-by: Petr Mladek <pmladek@xxxxxxxx>
> Signed-off-by: Douglas Anderson <dianders@xxxxxxxxxxxx>
> ---
> This is a squash of two patches that were posted to mailing lists, one
> official patch posted by Tom [1] and one that was posted in reply to
> my previous patch by Petr [2].
>
> IMO it makes sense to put these two things into one patch since
> they're basically dealing with the same issue. As promised [3] I'm
> posting the squash of the two patches.
>
> I have no idea how to really tag this and set authorship. I've chosen
> to leave author/Signed-off-by from Tom. Peter didn't officially
> include his Singed-off-by on his patch (as is common when posting
> suggestions in reply to another patch), so I didn't add it but added a
> Suggested-by from him. Hopefully this is OK.

It looks OK. Or maybe something like:

Signed-off-by: Tom Rix <trix@xxxxxxxxxx>
[pmladek@xxxxxxxx: changes in nmi.h]
[dianders@xxxxxxxxxxxx: merged changes, updated subject and commit message]
Signed-off-by: Douglas Anderson <dianders@xxxxxxxxxxxx>

Also feel free to add:

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr