diff mbox series

crypto: qat - remove unneeded packed attribute

Message ID 20210902083459.238983-1-giovanni.cabiddu@intel.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series crypto: qat - remove unneeded packed attribute | expand

Commit Message

Cabiddu, Giovanni Sept. 2, 2021, 8:34 a.m. UTC
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>
---
 drivers/crypto/qat/qat_common/adf_accel_devices.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Herbert Xu Sept. 17, 2021, 3:20 a.m. UTC | #1
On Thu, Sep 02, 2021 at 09:34:59AM +0100, Giovanni Cabiddu wrote:
> 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>
> ---
>  drivers/crypto/qat/qat_common/adf_accel_devices.h | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/drivers/crypto/qat/qat_common/adf_accel_devices.h b/drivers/crypto/qat/qat_common/adf_accel_devices.h
index 38c0af6d4e43..5d4281c95866 100644
--- a/drivers/crypto/qat/qat_common/adf_accel_devices.h
+++ b/drivers/crypto/qat/qat_common/adf_accel_devices.h
@@ -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