Abusing the same field for the events and flags seems to be asking for trouble, an you please split it into separate fields? > for (i = 0; i < ARRAY_SIZE(disk_uevents); i++) > - if (events & disk->events & (1 << i)) > + if (events & disk->events & (1 << i) && > + disk->events & DISK_EVENT_FLAG_UEVENT) I think this wants some braces around the flag check as well.