static atomic_t uprobe_events = ATOMIC_INIT(0);
 
 /* Have a copy of original instruction */
-#define UPROBE_COPY_INSN       0x1
+#define UPROBE_COPY_INSN       0
 /* Dont run handlers when first register/ last unregister in progress*/
-#define UPROBE_RUN_HANDLER     0x2
+#define UPROBE_RUN_HANDLER     1
 /* Can skip singlestep */
-#define UPROBE_SKIP_SSTEP      0x4
+#define UPROBE_SKIP_SSTEP      2
 
 struct uprobe {
        struct rb_node          rb_node;        /* node in the rb tree */
        struct uprobe_consumer  *consumers;
        struct inode            *inode;         /* Also hold a ref to inode */
        loff_t                  offset;
-       int                     flags;
+       unsigned long           flags;
        struct arch_uprobe      arch;
 };
 
        spin_unlock(&uprobes_treelock);
 
        /* For now assume that the instruction need not be single-stepped */
-       uprobe->flags |= UPROBE_SKIP_SSTEP;
+       __set_bit(UPROBE_SKIP_SSTEP, &uprobe->flags);
 
        return u;
 }
 {
        struct uprobe_consumer *uc;
 
-       if (!(uprobe->flags & UPROBE_RUN_HANDLER))
+       if (!test_bit(UPROBE_RUN_HANDLER, &uprobe->flags))
                return;
 
        down_read(&uprobe->consumer_rwsem);
 {
        int ret = 0;
 
-       if (uprobe->flags & UPROBE_COPY_INSN)
+       if (test_bit(UPROBE_COPY_INSN, &uprobe->flags))
                return ret;
 
        mutex_lock(&uprobe->copy_mutex);
-       if (uprobe->flags & UPROBE_COPY_INSN)
+       if (test_bit(UPROBE_COPY_INSN, &uprobe->flags))
                goto out;
 
        ret = copy_insn(uprobe, file);
                        UPROBE_SWBP_INSN_SIZE > PAGE_SIZE);
 
        smp_wmb(); /* pairs with rmb() in find_active_uprobe() */
-       uprobe->flags |= UPROBE_COPY_INSN;
+       set_bit(UPROBE_COPY_INSN, &uprobe->flags);
 
  out:
        mutex_unlock(&uprobe->copy_mutex);
                        uprobe->consumers = NULL;
                        __uprobe_unregister(uprobe);
                } else {
-                       uprobe->flags |= UPROBE_RUN_HANDLER;
+                       set_bit(UPROBE_RUN_HANDLER, &uprobe->flags);
                }
        }
 
        if (consumer_del(uprobe, uc)) {
                if (!uprobe->consumers) {
                        __uprobe_unregister(uprobe);
-                       uprobe->flags &= ~UPROBE_RUN_HANDLER;
+                       clear_bit(UPROBE_RUN_HANDLER, &uprobe->flags);
                }
        }
 
  */
 static bool can_skip_sstep(struct uprobe *uprobe, struct pt_regs *regs)
 {
-       if (uprobe->flags & UPROBE_SKIP_SSTEP) {
+       if (test_bit(UPROBE_SKIP_SSTEP, &uprobe->flags)) {
                if (arch_uprobe_skip_sstep(&uprobe->arch, regs))
                        return true;
-               uprobe->flags &= ~UPROBE_SKIP_SSTEP;
+               clear_bit(UPROBE_SKIP_SSTEP, &uprobe->flags);
        }
        return false;
 }
         * new and not-yet-analyzed uprobe at the same address, restart.
         */
        smp_rmb(); /* pairs with wmb() in install_breakpoint() */
-       if (unlikely(!(uprobe->flags & UPROBE_COPY_INSN)))
+       if (unlikely(!test_bit(UPROBE_COPY_INSN, &uprobe->flags)))
                goto restart;
 
        utask = current->utask;