From: David Vrabel <david.vrabel@citrix.com>
To: Jan Beulich <JBeulich@suse.com>, Wei Liu <wei.liu2@citrix.com>
Cc: xen-devel@lists.xenproject.org, netdev@vger.kernel.org
Subject: Re: [PATCH] xen-netback: prefer xenbus_scanf() over xenbus_gather()
Date: Thu, 7 Jul 2016 10:55:37 +0100 [thread overview]
Message-ID: <577E2719.6000303__37370.7163068049$1467885401$gmane$org@citrix.com> (raw)
In-Reply-To: <577E279D02000078000FBEBF@prv-mh.provo.novell.com>
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@lists.xen.org
https://lists.xen.org/xen-devel
next parent reply other threads:[~2016-07-07 9:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <577E279D02000078000FBEBF@prv-mh.provo.novell.com>
2016-07-07 9:55 ` David Vrabel [this message]
[not found] ` <577E2719.6000303@citrix.com>
2016-07-07 10:06 ` [PATCH] xen-netback: prefer xenbus_scanf() over xenbus_gather() Jan Beulich
2016-07-07 7:57 Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='577E2719.6000303__37370.7163068049$1467885401$gmane$org@citrix.com' \
--to=david.vrabel@citrix.com \
--cc=JBeulich@suse.com \
--cc=netdev@vger.kernel.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).