Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Wojciech Ziemba <wojciech.ziemba@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Giovanni Cabiddu and committed by
Herbert Xu
40da8653 70fead3a

+6 -6
+6 -6
drivers/crypto/qat/qat_common/adf_accel_devices.h
··· 42 42 resource_size_t base_addr; 43 43 void __iomem *virt_addr; 44 44 resource_size_t size; 45 - } __packed; 45 + }; 46 46 47 47 struct adf_irq { 48 48 bool enabled; ··· 52 52 struct adf_accel_msix { 53 53 struct adf_irq *irqs; 54 54 u32 num_entries; 55 - } __packed; 55 + }; 56 56 57 57 struct adf_accel_pci { 58 58 struct pci_dev *pci_dev; ··· 60 60 struct adf_bar pci_bars[ADF_PCI_MAX_BARS]; 61 61 u8 revid; 62 62 u8 sku; 63 - } __packed; 63 + }; 64 64 65 65 enum dev_state { 66 66 DEV_DOWN = 0, ··· 100 100 const char *name; 101 101 const enum adf_device_type type; 102 102 u32 instances; 103 - } __packed; 103 + }; 104 104 105 105 struct arb_info { 106 106 u32 arb_cfg; ··· 199 199 u8 num_logical_accel; 200 200 u8 num_engines; 201 201 u8 min_iov_compat_ver; 202 - } __packed; 202 + }; 203 203 204 204 /* CSR write macro */ 205 205 #define ADF_CSR_WR(csr_base, csr_offset, val) \ ··· 266 266 }; 267 267 bool is_vf; 268 268 u32 accel_id; 269 - } __packed; 269 + }; 270 270 #endif