Fix geom build with clang 17 and KTR enabled
When building a kernel with clang 17 and KTR enabled, such as with the
LINT configurations, a -Werror warning is emitted:
sys/geom/geom_io.c:145:31: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand] 145 | if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { | ~~~~~~~~~~~~~~~~~~~~~~~~ ^ sys/geom/geom_io.c:145:31: note: use '&' for a bitwise operation 145 | if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { | ^~ | & sys/geom/geom_io.c:145:31: note: remove constant to silence this warning
Replace the multiple uses of the expression with one macro, and in this
macro use "!= 0" to get a logical operand instead of a bitwise one.
Reviewed by: jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D41823