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: [Xen-devel] [PATCH] xen-netback: prefer xenbus_scanf() over xenbus_gather()
Date: Thu, 7 Jul 2016 10:55:37 +0100 [thread overview]
Message-ID: <577E2719.6000303@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
next prev parent reply other threads:[~2016-07-07 9:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-07 7:57 [PATCH] xen-netback: prefer xenbus_scanf() over xenbus_gather() Jan Beulich
2016-07-07 9:55 ` David Vrabel
2016-07-07 9:55 ` David Vrabel [this message]
2016-07-07 10:06 ` [Xen-devel] " Jan Beulich
2016-07-07 10:06 ` 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@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.