From: Thomas Huth <thuth@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Cc: zhenwei pi <pizhenwei@bytedance.com>,
arei.gonglei@huawei.com, dgilbert@redhat.com, eblake@redhat.com,
armbru@redhat.com, michael.roth@amd.com, pbonzini@redhat.com,
qemu-devel@nongnu.org
Subject: Re: [for-8.0 v2 05/11] cryptodev: Introduce 'query-cryptodev' QMP command
Date: Wed, 18 Jan 2023 11:58:19 +0100 [thread overview]
Message-ID: <97be9e13-6aa3-32c0-dfb8-31225d5efcbc@redhat.com> (raw)
In-Reply-To: <Y8fKBEmXD862n3EW@redhat.com>
On 18/01/2023 11.29, Daniel P. Berrangé wrote:
> On Wed, Jan 18, 2023 at 05:25:37AM -0500, Michael S. Tsirkin wrote:
>> On Mon, Jan 16, 2023 at 11:18:19AM +0000, Daniel P. Berrangé wrote:
>>>> + for (uint32_t i = 0; i < QCRYPTODEV_BACKEND_SERVICE__MAX; i++) {
>>>
>>> QEMU coding style doesn't declare types inside the for() control
>>> conditions. I'd suggest 'size_t i', and put it at top of this
>>> function.
>>
>> It's actually kind of vague:
>>
>> Mixed declarations (interleaving statements and declarations within
>> blocks) are generally not allowed; declarations should be at the beginning
>> of blocks.
>>
>> for loop starts a block, does it not?
>
> I wasn't refering to the specific docs per-se, but rather that no
> code does this at all in QEMU. It is effectively our style, even
> if not documented as such
$ grep -r 'for (int ' * | wc -l
381
... we're using it in many places already, and I think it should be OK since
we started using gnu99 and later as a base standard. Just my 0.02 cents.
Thomas
next prev parent reply other threads:[~2023-01-18 10:58 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 14:07 [for-8.0 v2 00/11] Refactor cryptodev zhenwei pi
2022-11-22 14:07 ` [for-8.0 v2 01/11] cryptodev: Introduce cryptodev.json zhenwei pi
2023-01-16 10:58 ` Daniel P. Berrangé
2022-11-22 14:07 ` [for-8.0 v2 02/11] cryptodev: Remove 'name' & 'model' fields zhenwei pi
2023-01-16 11:05 ` Daniel P. Berrangé
2022-11-22 14:07 ` [for-8.0 v2 03/11] cryptodev: Introduce cryptodev alg type in QAPI zhenwei pi
2023-01-16 11:08 ` Daniel P. Berrangé
2022-11-22 14:07 ` [for-8.0 v2 04/11] cryptodev: Introduce server " zhenwei pi
2023-01-16 11:09 ` Daniel P. Berrangé
2022-11-22 14:07 ` [for-8.0 v2 05/11] cryptodev: Introduce 'query-cryptodev' QMP command zhenwei pi
2023-01-16 11:18 ` Daniel P. Berrangé
2023-01-18 10:25 ` Michael S. Tsirkin
2023-01-18 10:29 ` Daniel P. Berrangé
2023-01-18 10:58 ` Thomas Huth [this message]
2023-01-18 11:01 ` Daniel P. Berrangé
2022-11-22 14:07 ` [for-8.0 v2 06/11] cryptodev: Support statistics zhenwei pi
2022-12-20 15:35 ` Michael S. Tsirkin
2023-01-16 11:22 ` Daniel P. Berrangé
2022-11-22 14:07 ` [for-8.0 v2 07/11] cryptodev-builtin: Detect akcipher capability zhenwei pi
2023-01-16 11:23 ` Daniel P. Berrangé
2022-11-22 14:07 ` [for-8.0 v2 08/11] hmp: add cryptodev info command zhenwei pi
2022-11-22 14:07 ` [for-8.0 v2 09/11] cryptodev: Use CryptoDevBackendOpInfo for operation zhenwei pi
2022-11-22 14:07 ` [for-8.0 v2 10/11] cryptodev: support QoS zhenwei pi
2022-11-22 14:07 ` [for-8.0 v2 11/11] MAINTAINERS: add myself as the maintainer for cryptodev zhenwei pi
2022-12-16 3:24 ` PING: [for-8.0 v2 00/11] Refactor cryptodev zhenwei pi
2022-12-20 15:36 ` Michael S. Tsirkin
2022-12-22 2:04 ` zhenwei pi
2023-01-03 6:14 ` PING: " zhenwei pi
2023-01-16 9:53 ` zhenwei pi
2023-01-16 11:27 ` Daniel P. Berrangé
2023-01-17 1:52 ` zhenwei pi
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=97be9e13-6aa3-32c0-dfb8-31225d5efcbc@redhat.com \
--to=thuth@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=michael.roth@amd.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pizhenwei@bytedance.com \
--cc=qemu-devel@nongnu.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).