crypto: qat - remove unneeded packed attribute
PATCH 1/1 crypto: qat - remove unneeded packed attribute
Remove packed attribute from structures that do not need to be packed. These are just used internally and not shared with firmware.
This also fixes a series of warning when compiling the driver with the flag -Waddress-of-packed-member, similar to the following:
drivers/crypto/qat/qat_c62xvf/adf_c62xvf_hw_data.c:102:28: warning: taking address of packed member 'csr_ops' of class or structure 'adf_hw_device_data' may result in an unaligned pointer value
--- drivers/crypto/qat/qat_common/adf_accel_devices.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/qat/qat_common/adf_accel_devices.h +6 -6
@@ -42,13 +42,13 @@ struct adf_bar {resource_size_t base_addr;void __iomem *virt_addr;resource_size_t size; -} __packed; +};struct adf_accel_msix {struct msix_entry *entries;char **names;u32 num_entries; -} __packed; +};struct adf_accel_pci {struct pci_dev *pci_dev;
@@ -56,7 +56,7 @@ struct adf_accel_pci {struct adf_bar pci_bars[ADF_PCI_MAX_BARS ];u8 revid;u8 sku; -} __packed; +};enum dev_state {DEV_DOWN =0 ,
@@ -96,7 +96,7 @@ struct adf_hw_device_class {const char *name;const enum adf_device_type type;u32 instances; -} __packed; +};struct arb_info {u32 arb_cfg;
@@ -195,7 +195,7 @@ struct adf_hw_device_data {u8 num_logical_accel;u8 num_engines;u8 min_iov_compat_ver; -} __packed; +};/* CSR write macro */ #define ADF_CSR_WR (csr_base, csr_offset, val) \
@@ -261,5 +261,5 @@ struct adf_accel_dev { };bool is_vf;u32 accel_id; -} __packed; +};#endif
Signature · 1 line
2.31.1
Herbert Xu
maintainerQuoted 6 lines · Giovanni Cabiddu
Remove packed attribute from structures that do not need to be packed. These are just used internally and not shared with firmware.
This also fixes a series of warning when compiling the driver with the flag -Waddress-of-packed-member, similar to the following:
Quoted 8 lines
drivers/crypto/qat/qat_c62xvf/adf_c62xvf_hw_data.c:102:28: warning: taking address of packed member 'csr_ops' of class or structure 'adf_hw_device_data' may result in an unaligned pointer valueSigned-off-by Giovanni Cabiddu <[email protected]>Reported-by kernel test robot <[email protected]>Reviewed-by Wojciech Ziemba <[email protected]>--- drivers/crypto/qat/qat_common/adf_accel_devices.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt