Re: [PATCH] platform/x86: ideapad-laptop: Report camera switch as SW_CAMERA_LENS_COVER
From: Huang Wei
Date: Sun Sep 20 2026 - 06:32:50 EST
Hi Marco,
Thanks for the quick response.
On the mutex: I like the lockdep_assert_held() option better than my
comment suggestion, honestly. A comment can rot if someone later
changes the call path, while the assert keeps checking the invariant
at runtime (under lockdep). The sdsi/hsmp precedent you found is a
good one. I'd put it at the top of ideapad_camera_switch_report(), and
a one-line comment saying the WMI notify path is serialized through
ideapad_shared_mutex wouldn't hurt either.
On the warn: dev_warn_once() sounds right to me. The retry itself is
good behaviour (a transient failure recovers on the next event), so
keep that, just warn once. Persistent registration failures are rare
enough that the one-time warning carries the signal.
With those two, this looks good to me from my side.
Thanks,
Huang Wei