Commit 9c89ab6d authored by Michael Forney's avatar Michael Forney

Replace one more __builtin_popcount with bitwise test

__builtin_popcount might not be available and in this case, a bitwise-and
can accomplish the same task.
Signed-off-by: Michael Forney's avatarMichael Forney <mforney@mforney.org>
parent 552d5aeb
Pipeline #42939 passed with stages
in 3 minutes and 37 seconds
......@@ -1735,7 +1735,7 @@ tablet_update_tool_state(struct tablet_dispatch *tablet,
/* Kernel tools are supposed to be mutually exclusive, if we have
* two set discard the most recent one. */
if (__builtin_popcount(tablet->tool_state) > 1) {
if (tablet->tool_state & (tablet->tool_state - 1)) {
evdev_log_bug_kernel(device,
"Multiple tools active simultaneously (%#x)\n",
tablet->tool_state);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment