cleanup: Make no_free_ptr() __must_check
authorPeter Zijlstra <peterz@infradead.org>
Tue, 15 Aug 2023 10:52:04 +0000 (12:52 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 13 Sep 2023 12:59:54 +0000 (14:59 +0200)
commit85be6d842447067ce76047a14d4258c96fd33b7b
treed7d9bb3a1e2c43c42dba57e74a8282da7e2802be
parentf66c538098b61e2eb596bb88fae90dbd2cebb378
cleanup: Make no_free_ptr() __must_check

recent discussion brought about the realization that it makes sense for
no_free_ptr() to have __must_check semantics in order to avoid leaking
the resource.

Additionally, add a few comments to clarify why/how things work.

All credit to Linus on how to combine __must_check and the
stmt-expression.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/20230816103102.GF980931@hirez.programming.kicks-ass.net
include/linux/cleanup.h