From: Jag Raman <jag.raman@xxxxxxxxxx> Date: Thu, 3 Aug 2017 13:43:58 -0400 > @@ -52,10 +53,15 @@ struct vcc_port { > > #define VCC_MAX_PORTS 1024 > #define VCC_MINOR_START 0 /* must be zero */ > +#define VCC_BUFF_LEN VIO_VCC_MTU_SIZE > > #define VCC_CTL_BREAK -1 > #define VCC_CTL_HUP -2 > > +#define TIMER_SET(v, x, t) ((v)->x##_timer.expires = (t)) > +#define TIMER_CLEAR(v, x) ((v)->x##_timer.expires = 0) > +#define TIMER_ACTIVE(v, x) ((v)->x##_timer.expires) Please, these timer macros just make the code more complicated and harder to understand. Just modify and test the timers in the canonical direct way, just like any other piece of code in the kernel. And using the expires field is wrong for testing timer state. Routines like __mod_timer() (and therefore mod_timer(), add_timer(), etc.) modify it (potentially asynchronously). You can use timer_pending(). But you must perform appropriate synchronization with the timer itself and any piece of your code which deletes, adds, or modifies the timer. Thanks. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html