On Tue, Feb 12 2013, Anton Vorontsov wrote: > Hi Greg, > > Thanks for taking a look! > > On Tue, Feb 12, 2013 at 10:42:51PM -0800, Greg Thelen wrote: > [...] >> > +static bool vmpressure_event(struct vmpressure *vmpr, >> > + unsigned long s, unsigned long r) >> > +{ >> > + struct vmpressure_event *ev; >> > + int level = vmpressure_calc_level(vmpressure_win, s, r); >> > + bool signalled = 0; >> s/bool/int/ > > Um... I surely can do this, but why do you think it is a good idea?
Because you incremented signalled below. Incrementing a bool seems strange. A better fix would be to leave this a bool and s/signaled++/signaled = true/ below. >> > + >> > + mutex_lock(&vmpr->events_lock); >> > + >> > + list_for_each_entry(ev, &vmpr->events, node) { >> > + if (level >= ev->level) { >> > + eventfd_signal(ev->efd, 1); >> > + signalled++; >> > + } >> > + } >> > + >> > + mutex_unlock(&vmpr->events_lock); >> > + >> > + return signalled; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/