qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/18] qapi: Reduce use of 'prefix'.
@ 2024-07-30  8:10 Markus Armbruster
  2024-07-30  8:10 ` [PATCH 01/18] qapi: Smarter camel_to_upper() to reduce need for 'prefix' Markus Armbruster
                   ` (17 more replies)
  0 siblings, 18 replies; 47+ messages in thread
From: Markus Armbruster @ 2024-07-30  8:10 UTC (permalink / raw)
  To: qemu-devel
  Cc: alex.williamson, andrew, andrew, arei.gonglei, berrange, berto,
	borntraeger, clg, david, den, eblake, eduardo, farman, farosas,
	hreitz, idryomov, iii, jamin_lin, jasowang, joel, jsnow, kwolf,
	leetroy, marcandre.lureau, marcel.apfelbaum, michael.roth, mst,
	mtosatti, nsg, pasic, pbonzini, peter.maydell, peterx, philmd,
	pizhenwei, pl, richard.henderson, stefanha, steven_lee, thuth,
	vsementsov, wangyanan55, yuri.benditovich, zhao1.liu, qemu-block,
	qemu-arm, qemu-s390x, kvm

QAPI's 'prefix' feature can make the connection between enumeration
type and its constants less than obvious.  It's best used with
restraint.

We use 'prefix' for a number of reasons:

* To override an ugly default.

* To shorten the prefix.

* To work around name clashes.

This series attacks the first two.  It additionally improves a number
of ugly prefixes we don't override.

PATCH 01 improves the default prefix, and drops 'prefix' where it is
now redundant.  The patch adds temporary 'prefix' to not change
generated code.

PATCH 02-08 revert the temporary 'prefix'.

PATCH 10,17 drop 'prefix' where the default is now better.

PATCH 09,11-15,18 rename QAPI types, and drop their 'prefix'.  I'm
prepared to adjust the renames according to maintainers' preference.

PATCH 16 renames a non-QAPI type for consistency.

Markus Armbruster (18):
  qapi: Smarter camel_to_upper() to reduce need for 'prefix'
  tests/qapi-schema: Drop temporary 'prefix'
  qapi/block-core: Drop temporary 'prefix'
  qapi/common: Drop temporary 'prefix'
  qapi/crypto: Drop temporary 'prefix'
  qapi/ebpf: Drop temporary 'prefix'
  qapi/machine: Drop temporary 'prefix'
  qapi/ui: Drop temporary 'prefix'
  qapi/machine: Rename CpuS390* to S390Cpu, and drop 'prefix'
  qapi/crypto: Drop unwanted 'prefix'
  qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix
  qapi/crypto: Rename QCryptoCipherAlgorithm to *Algo, and drop prefix
  qapi/crypto: Rename QCryptoIVGenAlgorithm to *Algo, and drop prefix
  qapi/crypto: Rename QCryptoAkCipherAlgorithm to *Algo, and drop prefix
  qapi/crypto: Rename QCryptoRSAPaddingAlgorithm to *Algo, and drop
    prefix
  qapi/crypto: Rename QCryptoAFAlg to QCryptoAFAlgo
  qapi/cryptodev: Drop unwanted 'prefix'
  qapi/cryptodev: Rename QCryptodevBackendAlgType to *Algo, and drop
    prefix

 qapi/block-core.json                     |   4 +-
 qapi/crypto.json                         |  56 ++++------
 qapi/cryptodev.json                      |   7 +-
 qapi/machine-common.json                 |   5 +-
 qapi/machine-target.json                 |  11 +-
 qapi/machine.json                        |   9 +-
 qapi/migration.json                      |   1 +
 qapi/pragma.json                         |   6 +-
 qapi/ui.json                             |   1 +
 crypto/afalgpriv.h                       |  14 +--
 crypto/akcipherpriv.h                    |   2 +-
 crypto/blockpriv.h                       |   6 +-
 crypto/cipherpriv.h                      |   2 +-
 crypto/hashpriv.h                        |   2 +-
 crypto/hmacpriv.h                        |   4 +-
 crypto/ivgenpriv.h                       |   6 +-
 include/crypto/afsplit.h                 |   8 +-
 include/crypto/block.h                   |   2 +-
 include/crypto/cipher.h                  |  18 ++--
 include/crypto/hash.h                    |  18 ++--
 include/crypto/hmac.h                    |   6 +-
 include/crypto/ivgen.h                   |  30 +++---
 include/crypto/pbkdf.h                   |  14 +--
 include/hw/qdev-properties-system.h      |   2 +-
 include/hw/s390x/cpu-topology.h          |   2 +-
 include/sysemu/cryptodev.h               |   2 +-
 target/s390x/cpu.h                       |   2 +-
 backends/cryptodev-builtin.c             |  52 ++++-----
 backends/cryptodev-lkcf.c                |  36 +++----
 backends/cryptodev-vhost-user.c          |   6 +-
 backends/cryptodev.c                     |  12 +--
 block.c                                  |   6 +-
 block/crypto.c                           |  10 +-
 block/parallels-ext.c                    |   2 +-
 block/qcow.c                             |   2 +-
 block/qcow2.c                            |  10 +-
 block/quorum.c                           |   4 +-
 block/rbd.c                              |   4 +-
 crypto/afalg.c                           |   8 +-
 crypto/afsplit.c                         |   6 +-
 crypto/akcipher.c                        |   2 +-
 crypto/block-luks.c                      | 128 +++++++++++------------
 crypto/block-qcow.c                      |   6 +-
 crypto/block.c                           |   8 +-
 crypto/cipher-afalg.c                    |  36 +++----
 crypto/cipher.c                          |  72 ++++++-------
 crypto/hash-afalg.c                      |  40 +++----
 crypto/hash-gcrypt.c                     |  20 ++--
 crypto/hash-glib.c                       |  20 ++--
 crypto/hash-gnutls.c                     |  20 ++--
 crypto/hash-nettle.c                     |  18 ++--
 crypto/hash.c                            |  30 +++---
 crypto/hmac-gcrypt.c                     |  22 ++--
 crypto/hmac-glib.c                       |  22 ++--
 crypto/hmac-gnutls.c                     |  22 ++--
 crypto/hmac-nettle.c                     |  22 ++--
 crypto/hmac.c                            |   2 +-
 crypto/ivgen.c                           |  18 ++--
 crypto/pbkdf-gcrypt.c                    |  36 +++----
 crypto/pbkdf-gnutls.c                    |  36 +++----
 crypto/pbkdf-nettle.c                    |  32 +++---
 crypto/pbkdf-stub.c                      |   4 +-
 crypto/pbkdf.c                           |   2 +-
 crypto/secret_common.c                   |   2 +-
 ebpf/ebpf_rss.c                          |   2 +-
 hw/core/numa.c                           |   4 +-
 hw/core/qdev-properties-system.c         |   6 +-
 hw/misc/aspeed_hace.c                    |  16 +--
 hw/pci-bridge/cxl_upstream.c             |   4 +-
 hw/s390x/cpu-topology.c                  |   6 +-
 hw/vfio/pci.c                            |  10 +-
 hw/virtio/virtio-crypto.c                |  24 ++---
 io/channel-websock.c                     |   2 +-
 system/vl.c                              |   2 +-
 target/i386/sev.c                        |   6 +-
 tests/bench/benchmark-crypto-akcipher.c  |  28 ++---
 tests/bench/benchmark-crypto-cipher.c    |  22 ++--
 tests/bench/benchmark-crypto-hash.c      |  10 +-
 tests/bench/benchmark-crypto-hmac.c      |   6 +-
 tests/unit/test-crypto-afsplit.c         |  10 +-
 tests/unit/test-crypto-akcipher.c        |  54 +++++-----
 tests/unit/test-crypto-block.c           |  58 +++++-----
 tests/unit/test-crypto-cipher.c          |  66 ++++++------
 tests/unit/test-crypto-hash.c            |  42 ++++----
 tests/unit/test-crypto-hmac.c            |  16 +--
 tests/unit/test-crypto-ivgen.c           |  38 +++----
 tests/unit/test-crypto-pbkdf.c           |  44 ++++----
 tests/unit/test-qobject-input-visitor.c  |   4 +-
 tests/unit/test-qobject-output-visitor.c |   4 +-
 ui/dbus.c                                |   8 +-
 ui/egl-context.c                         |   2 +-
 ui/egl-headless.c                        |   2 +-
 ui/egl-helpers.c                         |  12 +--
 ui/gtk.c                                 |   4 +-
 ui/sdl2-gl.c                             |   8 +-
 ui/sdl2.c                                |   2 +-
 ui/spice-core.c                          |   2 +-
 ui/vnc.c                                 |   6 +-
 util/hbitmap.c                           |   2 +-
 crypto/akcipher-gcrypt.c.inc             |  44 ++++----
 crypto/akcipher-nettle.c.inc             |  56 +++++-----
 crypto/cipher-builtin.c.inc              |  18 ++--
 crypto/cipher-gcrypt.c.inc               |  56 +++++-----
 crypto/cipher-gnutls.c.inc               |  38 +++----
 crypto/cipher-nettle.c.inc               |  58 +++++-----
 crypto/rsakey-builtin.c.inc              |   4 +-
 crypto/rsakey-nettle.c.inc               |   4 +-
 scripts/qapi/common.py                   |  42 ++++----
 scripts/qapi/schema.py                   |   2 +-
 tests/qapi-schema/alternate-array.out    |   1 -
 tests/qapi-schema/comments.out           |   1 -
 tests/qapi-schema/doc-good.out           |   1 -
 tests/qapi-schema/empty.out              |   1 -
 tests/qapi-schema/include-repetition.out |   1 -
 tests/qapi-schema/include-simple.out     |   1 -
 tests/qapi-schema/indented-expr.out      |   1 -
 tests/qapi-schema/qapi-schema-test.out   |   1 -
 117 files changed, 932 insertions(+), 948 deletions(-)

-- 
2.45.0



^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2024-08-12 10:10 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-30  8:10 [PATCH 00/18] qapi: Reduce use of 'prefix' Markus Armbruster
2024-07-30  8:10 ` [PATCH 01/18] qapi: Smarter camel_to_upper() to reduce need for 'prefix' Markus Armbruster
2024-07-30  9:13   ` Daniel P. Berrangé
2024-07-30 12:22     ` Markus Armbruster
2024-07-30 13:33       ` Avihai Horon
2024-07-31  5:12         ` Markus Armbruster
2024-07-31  5:59           ` Avihai Horon
2024-07-31  6:37             ` Markus Armbruster
2024-07-31  9:43   ` Kevin Wolf
2024-08-09  9:03     ` Markus Armbruster
2024-07-30  8:10 ` [PATCH 02/18] tests/qapi-schema: Drop temporary 'prefix' Markus Armbruster
2024-08-12 10:04   ` Thomas Huth
2024-07-30  8:10 ` [PATCH 03/18] qapi/block-core: " Markus Armbruster
2024-07-30  8:10 ` [PATCH 04/18] qapi/common: " Markus Armbruster
2024-07-30 15:07   ` Cédric Le Goater
2024-07-30  8:10 ` [PATCH 05/18] qapi/crypto: " Markus Armbruster
2024-07-30  8:57   ` Daniel P. Berrangé
2024-07-30  8:10 ` [PATCH 06/18] qapi/ebpf: " Markus Armbruster
2024-07-30  8:10 ` [PATCH 07/18] qapi/machine: " Markus Armbruster
2024-07-30  9:28   ` Zhao Liu
2024-07-30  8:10 ` [PATCH 08/18] qapi/ui: " Markus Armbruster
2024-07-30  8:10 ` [PATCH 09/18] qapi/machine: Rename CpuS390* to S390Cpu, and drop 'prefix' Markus Armbruster
2024-07-30  9:08   ` Daniel P. Berrangé
2024-07-30  9:26   ` Zhao Liu
2024-08-09  7:10     ` Markus Armbruster
2024-08-12 10:09   ` Thomas Huth
2024-07-30  8:10 ` [PATCH 10/18] qapi/crypto: Drop unwanted 'prefix' Markus Armbruster
2024-07-30  8:58   ` Daniel P. Berrangé
2024-07-30  8:10 ` [PATCH 11/18] qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix Markus Armbruster
2024-07-30  9:01   ` Daniel P. Berrangé
2024-07-30 12:26     ` Markus Armbruster
2024-07-31  9:46       ` Daniel P. Berrangé
2024-08-02 14:27         ` Markus Armbruster
2024-07-30  8:10 ` [PATCH 12/18] qapi/crypto: Rename QCryptoCipherAlgorithm " Markus Armbruster
2024-07-30  9:02   ` Daniel P. Berrangé
2024-07-30  8:10 ` [PATCH 13/18] qapi/crypto: Rename QCryptoIVGenAlgorithm " Markus Armbruster
2024-07-30  9:03   ` Daniel P. Berrangé
2024-07-30  8:10 ` [PATCH 14/18] qapi/crypto: Rename QCryptoAkCipherAlgorithm " Markus Armbruster
2024-07-30  9:03   ` Daniel P. Berrangé
2024-07-30  8:10 ` [PATCH 15/18] qapi/crypto: Rename QCryptoRSAPaddingAlgorithm " Markus Armbruster
2024-07-30  9:04   ` Daniel P. Berrangé
2024-07-30  8:10 ` [PATCH 16/18] qapi/crypto: Rename QCryptoAFAlg to QCryptoAFAlgo Markus Armbruster
2024-07-30  9:05   ` Daniel P. Berrangé
2024-07-30  8:10 ` [PATCH 17/18] qapi/cryptodev: Drop unwanted 'prefix' Markus Armbruster
2024-07-30  9:06   ` Daniel P. Berrangé
2024-07-30  8:10 ` [PATCH 18/18] qapi/cryptodev: Rename QCryptodevBackendAlgType to *Algo, and drop prefix Markus Armbruster
2024-07-30  9:06   ` Daniel P. Berrangé

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).