[PATCH v2 02/19] tests/qapi-schema: Drop temporary 'prefix'

2024-09-04 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This changes TestUnionEnumA's generated enumeration constant prefix from TEST_UNION_ENUMA to TEST_UNION_ENUM_A. Signed-off-by: Markus Armbruster

[PATCH v2 19/19] qapi/vfio: Rename VfioMigrationState to Qapi*, and drop prefix

2024-09-04 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. VfioMigrationState has a 'prefix' that overrides the generated enumeration constants' prefix to QAPI_VFIO_MIGRATION_STATE. We could simply drop 'prefix', b

[PATCH v2 01/19] qapi: Smarter camel_to_upper() to reduce need for 'prefix'

2024-09-04 Thread Markus Armbruster
camel_to_upper() converts its argument from camel case to upper case with '_' between words. Used for generated enumeration constant prefixes. When some of the words are spelled all caps, where exactly to insert '_' is guesswork. camel_to_upper()'s guesses are bad enough in places to make people

[PATCH v2 08/19] qapi/ui: Drop temporary 'prefix'

2024-09-04 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves DisplayGLMode's generated enumeration constant prefix from DISPLAYGL_MODE to DISPLAY_GL_MODE. Signed-off-by: Markus Armbruster ---

[PATCH v2 16/19] qapi/crypto: Rename QCryptoAFAlg to QCryptoAFAlgo

2024-09-04 Thread Markus Armbruster
For consistency with other types names *Algo. Signed-off-by: Markus Armbruster Acked-by: Daniel P. Berrangé --- crypto/afalgpriv.h| 14 +++--- crypto/hmacpriv.h | 2 +- crypto/afalg.c| 8 crypto/cipher-afalg.c | 12 ++-- crypto/hash-afalg.c | 14

[PATCH v2 06/19] qapi/ebpf: Drop temporary 'prefix'

2024-09-04 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves EbpfProgramID's generated enumeration constant prefix from EBPF_PROGRAMID to EBPF_PROGRAM_ID. Signed-off-by: Markus Armbruster ---

[PATCH v2 07/19] qapi/machine: Drop temporary 'prefix'

2024-09-04 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves HmatLBDataType's generated enumeration constant prefix from HMATLB_DATA_TYPE to HMAT_LB_DATA_TYPE, and HmatLBMemoryHierarchy's from

[PATCH v2 14/19] qapi/crypto: Rename QCryptoAkCipherAlgorithm to *Algo, and drop prefix

2024-09-04 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptoAkCipherAlgorithm has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTO_AKCIPHER_ALG. We could simply drop 'prefix',

[PATCH v2 18/19] qapi/cryptodev: Rename QCryptodevBackendAlgType to *Algo, and drop prefix

2024-09-04 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptodevBackendAlgType has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTODEV_BACKEND_ALG. We could simply drop 'prefix'

[PATCH v2 09/19] qapi/machine: Rename CpuS390* to S390Cpu*, and drop 'prefix'

2024-09-04 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. CpuS390Entitlement has a 'prefix' to change the generated enumeration constants' prefix from CPU_S390_ENTITLEMENT to S390_CPU_ENTITLEMENT. Rename the type t

[PATCH v2 15/19] qapi/crypto: Rename QCryptoRSAPaddingAlgorithm to *Algo, and drop prefix

2024-09-04 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptoRSAPaddingAlgorithm has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTO_RSA_PADDING_ALG. We could simply drop 'pref

[PATCH v2 17/19] qapi/cryptodev: Drop unwanted 'prefix'

2024-09-04 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptodevBackendServiceType has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTODEV_BACKEND_SERVICE. Drop it. The prefix

[PATCH v2 11/19] qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix

2024-09-04 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptoHashAlgorithm has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTO_HASH_ALG. We could simply drop 'prefix', but then

[PATCH v2 12/19] qapi/crypto: Rename QCryptoCipherAlgorithm to *Algo, and drop prefix

2024-09-04 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptoCipherAlgorithm has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTO_CIPHER_ALG. We could simply drop 'prefix', but

[PATCH v2 04/19] qapi/common: Drop temporary 'prefix'

2024-09-04 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves OffAutoPCIBAR's generated enumeration constant prefix from OFF_AUTOPCIBAR to OFF_AUTO_PCIBAR. Signed-off-by: Markus Armbruster Rev

[PATCH v2 03/19] qapi/block-core: Drop temporary 'prefix'

2024-09-04 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves XDbgBlockGraphNodeType's generated enumeration constant prefix from X_DBG_BLOCK_GRAPH_NODE_TYPE_BLOCK_BACKEND to XDBG_BLOCK_GRAPH_NO

[PATCH v2 13/19] qapi/crypto: Rename QCryptoIVGenAlgorithm to *Algo, and drop prefix

2024-09-04 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptoIVGenAlgorithm has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTO_IVGEN_ALG. We could simply drop 'prefix', but th

[PATCH v2 10/19] qapi/crypto: Drop unwanted 'prefix'

2024-09-04 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptoAkCipherKeyType has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTO_AKCIPHER_KEY_TYPE. Drop it. The prefix becomes

[PATCH v2 05/19] qapi/crypto: Drop temporary 'prefix'

2024-09-04 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added two temporary 'prefix' to delay changing the generated code. Revert them. This improves QCryptoBlockFormat's generated enumeration constant prefix from Q_CRYPTO_BLOCK_FORMAT to QCRYPTO_BLOCK_FORMAT, and QCryptoBlockL

[PATCH v2 00/19] qapi: Reduce use of 'prefix'

2024-09-04 Thread Markus Armbruster
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

Re: [PATCH v2 19/19] qapi/vfio: Rename VfioMigrationState to Qapi*, and drop prefix

2024-09-04 Thread Cédric Le Goater
On 9/4/24 13:18, Markus Armbruster wrote: QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. VfioMigrationState has a 'prefix' that overrides the generated enumeration constants' prefix to QAPI_VFIO_MIGRAT

Re: [PATCH v2 01/19] qapi: Smarter camel_to_upper() to reduce need for 'prefix'

2024-09-04 Thread Daniel P . Berrangé
On Wed, Sep 04, 2024 at 01:18:18PM +0200, Markus Armbruster wrote: > camel_to_upper() converts its argument from camel case to upper case > with '_' between words. Used for generated enumeration constant > prefixes. > > Signed-off-by: Markus Armbruster > Reviewed-by: Daniel P. Berrang?? The

Re: [PATCH v2 01/19] qapi: Smarter camel_to_upper() to reduce need for 'prefix'

2024-09-04 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Wed, Sep 04, 2024 at 01:18:18PM +0200, Markus Armbruster wrote: >> camel_to_upper() converts its argument from camel case to upper case >> with '_' between words. Used for generated enumeration constant >> prefixes. > > >> >> Signed-off-by: Markus Armbruster >>