Skip to content

Commit b13a540

Browse files
committed
virtio_crypto: convert to LE accessors
Virtio crypto is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
1 parent 2c0349e commit b13a540

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

‎drivers/crypto/virtio/virtio_crypto_core.c‎

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ static int virtcrypto_update_status(struct virtio_crypto *vcrypto)
204204
u32 status;
205205
int err;
206206

207-
virtio_cread(vcrypto->vdev,
208-
struct virtio_crypto_config, status, &status);
207+
virtio_cread_le(vcrypto->vdev,
208+
struct virtio_crypto_config, status, &status);
209209

210210
/*
211211
* Unknown status bits would be a host error and the driver
@@ -323,31 +323,31 @@ static int virtcrypto_probe(struct virtio_device *vdev)
323323
if (!vcrypto)
324324
return -ENOMEM;
325325

326-
virtio_cread(vdev, struct virtio_crypto_config,
326+
virtio_cread_le(vdev, struct virtio_crypto_config,
327327
max_dataqueues, &max_data_queues);
328328
if (max_data_queues < 1)
329329
max_data_queues = 1;
330330

331-
virtio_cread(vdev, struct virtio_crypto_config,
332-
max_cipher_key_len, &max_cipher_key_len);
333-
virtio_cread(vdev, struct virtio_crypto_config,
334-
max_auth_key_len, &max_auth_key_len);
335-
virtio_cread(vdev, struct virtio_crypto_config,
336-
max_size, &max_size);
337-
virtio_cread(vdev, struct virtio_crypto_config,
338-
crypto_services, &crypto_services);
339-
virtio_cread(vdev, struct virtio_crypto_config,
340-
cipher_algo_l, &cipher_algo_l);
341-
virtio_cread(vdev, struct virtio_crypto_config,
342-
cipher_algo_h, &cipher_algo_h);
343-
virtio_cread(vdev, struct virtio_crypto_config,
344-
hash_algo, &hash_algo);
345-
virtio_cread(vdev, struct virtio_crypto_config,
346-
mac_algo_l, &mac_algo_l);
347-
virtio_cread(vdev, struct virtio_crypto_config,
348-
mac_algo_h, &mac_algo_h);
349-
virtio_cread(vdev, struct virtio_crypto_config,
350-
aead_algo, &aead_algo);
331+
virtio_cread_le(vdev, struct virtio_crypto_config,
332+
max_cipher_key_len, &max_cipher_key_len);
333+
virtio_cread_le(vdev, struct virtio_crypto_config,
334+
max_auth_key_len, &max_auth_key_len);
335+
virtio_cread_le(vdev, struct virtio_crypto_config,
336+
max_size, &max_size);
337+
virtio_cread_le(vdev, struct virtio_crypto_config,
338+
crypto_services, &crypto_services);
339+
virtio_cread_le(vdev, struct virtio_crypto_config,
340+
cipher_algo_l, &cipher_algo_l);
341+
virtio_cread_le(vdev, struct virtio_crypto_config,
342+
cipher_algo_h, &cipher_algo_h);
343+
virtio_cread_le(vdev, struct virtio_crypto_config,
344+
hash_algo, &hash_algo);
345+
virtio_cread_le(vdev, struct virtio_crypto_config,
346+
mac_algo_l, &mac_algo_l);
347+
virtio_cread_le(vdev, struct virtio_crypto_config,
348+
mac_algo_h, &mac_algo_h);
349+
virtio_cread_le(vdev, struct virtio_crypto_config,
350+
aead_algo, &aead_algo);
351351

352352
/* Add virtio crypto device to global table */
353353
err = virtcrypto_devmgr_add_dev(vcrypto);

0 commit comments

Comments
 (0)