From: Eric Blake <eblake@redhat.com>
To: Jeff Cody <jcody@redhat.com>, qemu-devel@nongnu.org
Cc: mitake.hitoshi@lab.ntt.co.jp, namei.unix@gmail.com,
kwolf@redhat.com, rjones@redhat.com, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 4/7] block/sheepdog: code beautification
Date: Wed, 30 Aug 2017 14:48:40 -0500 [thread overview]
Message-ID: <e6c94c07-1724-3db0-2d2e-7cbd94732376@redhat.com> (raw)
In-Reply-To: <30210223ca3a13c64b4ba623479b69ae23fa865e.1504112061.git.jcody@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3008 bytes --]
On 08/30/2017 11:57 AM, Jeff Cody wrote:
> No functional changes, just whitespace manipulation.
>
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
> block/sheepdog.c | 162 +++++++++++++++++++++++++++----------------------------
> 1 file changed, 81 insertions(+), 81 deletions(-)
>
> static BlockDriver bdrv_sheepdog = {
> - .format_name = "sheepdog",
> - .protocol_name = "sheepdog",
> - .instance_size = sizeof(BDRVSheepdogState),
> - .bdrv_parse_filename = sd_parse_filename,
> - .bdrv_file_open = sd_open,
> - .bdrv_reopen_prepare = sd_reopen_prepare,
> - .bdrv_reopen_commit = sd_reopen_commit,
> - .bdrv_reopen_abort = sd_reopen_abort,
> - .bdrv_close = sd_close,
> - .bdrv_create = sd_create,
> - .bdrv_has_zero_init = bdrv_has_zero_init_1,
> - .bdrv_getlength = sd_getlength,
The existing style is indeed ugly since it has no consistency,...
> + .format_name = "sheepdog",
> + .protocol_name = "sheepdog",
> + .instance_size = sizeof(BDRVSheepdogState),
> + .bdrv_parse_filename = sd_parse_filename,
> + .bdrv_file_open = sd_open,
> + .bdrv_reopen_prepare = sd_reopen_prepare,
> + .bdrv_reopen_commit = sd_reopen_commit,
> + .bdrv_reopen_abort = sd_reopen_abort,
> + .bdrv_close = sd_close,
> + .bdrv_create = sd_create,
> + .bdrv_has_zero_init = bdrv_has_zero_init_1,
> + .bdrv_getlength = sd_getlength,
> .bdrv_get_allocated_file_size = sd_get_allocated_file_size,
...but aligning '=' requires mass reformatting if you get any longer
.bdrv_ function callback added down the road. If it were me, I'd just
consistently use a single space everywhere, as in:
.format_name = "sheepdog",
.protocol_name = "sheepdog",
but that's my personal opinion, and not a hard rule, so I won't be
bothered if you don't take it.
> static BlockDriver bdrv_sheepdog_tcp = {
> - .format_name = "sheepdog",
> - .protocol_name = "sheepdog+tcp",
> - .instance_size = sizeof(BDRVSheepdogState),
> - .bdrv_parse_filename = sd_parse_filename,
> + .format_name = "sheepdog",
> + .protocol_name = "sheepdog+tcp",
> + .instance_size = sizeof(BDRVSheepdogState),
> + .bdrv_parse_filename = sd_parse_filename,
> .bdrv_file_open = sd_open,
See, with your style, this row now stands out as being missed; with my
style, this line needs no edits.
But your changes are indeed semantic no-ops, so whether you fix the few
unaligned lines per your style, or redo to a consistent style of only a
single space, you can add:
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
next prev parent reply other threads:[~2017-08-30 19:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-30 16:56 [Qemu-devel] [PATCH v2 0/7] Code cleanup and minor fixes Jeff Cody
2017-08-30 16:56 ` [Qemu-devel] [PATCH v2 1/7] block/ssh: don't call libssh2_init() in block_init() Jeff Cody
2017-08-30 19:40 ` Eric Blake
2017-08-30 20:11 ` Jeff Cody
2017-08-30 20:12 ` Eric Blake
2017-08-31 7:46 ` Richard W.M. Jones
2017-08-30 16:56 ` [Qemu-devel] [PATCH v2 2/7] block/ssh: make compliant with coding guidelines Jeff Cody
2017-08-30 19:41 ` Eric Blake
2017-08-30 16:57 ` [Qemu-devel] [PATCH v2 3/7] block/sheepdog: remove spurious NULL check Jeff Cody
2017-08-30 17:37 ` Philippe Mathieu-Daudé
2017-08-30 19:42 ` Eric Blake
2017-08-30 16:57 ` [Qemu-devel] [PATCH v2 4/7] block/sheepdog: code beautification Jeff Cody
2017-08-30 19:48 ` Eric Blake [this message]
2017-08-30 16:57 ` [Qemu-devel] [PATCH v2 5/7] block/curl: check error return of curl_global_init() Jeff Cody
2017-08-30 19:49 ` Eric Blake
2017-08-30 16:57 ` [Qemu-devel] [PATCH v2 6/7] block/curl: fix minor memory leaks Jeff Cody
2017-08-30 19:51 ` Eric Blake
2017-08-30 16:57 ` [Qemu-devel] [PATCH v2 7/7] block/curl: code cleanup to comply with coding style Jeff Cody
2017-08-30 19:53 ` Eric Blake
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=e6c94c07-1724-3db0-2d2e-7cbd94732376@redhat.com \
--to=eblake@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=mitake.hitoshi@lab.ntt.co.jp \
--cc=namei.unix@gmail.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
/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).