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

Re: [Xen-devel] [PATCH] xen-netback: prefer xenbus_scanf() over xenbus_gather()



On 07/07/16 08:57, Jan Beulich wrote:
> ... for single items being collected: It is more typesafe (as the
> compiler can check format string and to-be-written-to variable match)
> and requires one less parameter to be passed.

Do not split commit messages between the subject and the body in this
way.  The body should be a complete description of the commit,
independent of the subject.

It's annoying to find only half a sentence in the body and have to go
re-read the subject again.

e.g.,

"xen-netback: prefer xenbus_scanf() over xenbus_gather()

xenbus_scanf() is preferred over xenbus_gather() because: a) the
compiler can check the types match the format; and b) one less parameter
is needed.

Use xenbus_scanf() instead of xenbus_gather() when reading only a single
key."

I think almost all of your commit messages suffer from this, please redo
them all.

> --- 4.7-rc6-prefer-xenbus_scanf.orig/drivers/net/xen-netback/xenbus.c
> +++ 4.7-rc6-prefer-xenbus_scanf/drivers/net/xen-netback/xenbus.c
> @@ -842,16 +842,16 @@ static int connect_ctrl_ring(struct back
>       unsigned int evtchn;
>       int err;
>  
> -     err = xenbus_gather(XBT_NIL, dev->otherend,
> -                         "ctrl-ring-ref", "%u", &val, NULL);
> -     if (err)
> +     err = xenbus_scanf(XBT_NIL, dev->otherend,
> +                        "ctrl-ring-ref", "%u", &val);
> +     if (err <= 0)

< 0

David

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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