[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v7 04/15] argo: init, destroy and soft-reset, with enable command line opt



>>> On 31.01.19 at 15:49, <roger.pau@xxxxxxxxxx> wrote:
> On Wed, Jan 30, 2019 at 08:28:09PM -0800, Christopher Clark wrote:
>> +static struct argo_ring_info *
>> +find_ring_info(const struct domain *d, const struct argo_ring_id *id)
>> +{
>> +    struct argo_ring_info *ring_info;
>> +    const struct list_head *bucket;
>> +
>> +    ASSERT(LOCKING_Read_rings_L2(d));
>> +
>> +    /* List is not modified here. Search and return the match if found. */
>> +    bucket = &d->argo->ring_hash[hash_index(id)];
>> +
>> +    list_for_each_entry(ring_info, bucket, node)
> 
> I'm not sure what's the policy regarding list_ macros, should spaces
> be added between the parentheses?
> 
> list_for_each_entry ( ring_info, bucket, node )
> 
> I don't have a strong opinion either way.

We use a mix, because it's not really clear whether to consider such
"kind-of-keywords".

>> +static void
>> +pending_remove_all(const struct domain *d, struct argo_ring_info *ring_info)
>> +{
>> +    struct pending_ent *ent, *next;
>> +
>> +    ASSERT(LOCKING_L3(d, ring_info));
>> +
>> +    /* Delete all pending notifications from this ring's list. */
>> +    list_for_each_entry_safe(ent, next, &ring_info->pending, node)
> 
> list_first_entry_or_null and you can get rid of next.

Well, that's a substitution I wouldn't like to do while committing,
as it means doing a little more than a simple text replacement.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.