On Tue, Jan 15, 2019 at 09:10:41AM -0700, Jan Beulich wrote: > >>> On 15.01.19 at 16:49, <roger....@citrix.com> wrote: > > On Tue, Jan 15, 2019 at 01:27:41AM -0800, Christopher Clark wrote: > >> +static int > >> +pending_requeue(const struct domain *d, struct argo_ring_info *ring_info, > >> + domid_t src_id, unsigned int len) > >> +{ > >> + struct hlist_node *node; > >> + struct pending_ent *ent; > >> + > >> + ASSERT(LOCKING_L3(d, ring_info)); > >> + > >> + hlist_for_each_entry(ent, node, &ring_info->pending, node) > >> + { > >> + if ( ent->domain_id == src_id ) > >> + { > >> + /* > >> + * Reuse an existing queue entry for a notification rather > >> than add > >> + * another. If the existing entry is waiting for a smaller > >> size than > >> + * the current message then adjust the record to wait for the > >> + * current (larger) size to be available before triggering a > >> + * notification. > >> + * This assists the waiting sender by ensuring that whenever a > >> + * notification is triggered, there is sufficient space > >> available > >> + * for (at least) any one of the messages awaiting > >> transmission. > >> + */ > >> + if ( ent->len < len ) > >> + ent->len = len; > > > > Nit: > > > > ent->len = max(ent->len, len); > > I don't think use of max() should be a requirement in cases where > one of the items compared is also the value to update. I'm not > even convinced it helps readability of the sources, let alone the > quality of generated code.
Then disregard the comment. It's likely I got used to this style and find it easier to read. Thanks, Roger. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel