[PATCH] scsi: ufs: Fix the build for the old ARM OABI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All structs and unions are word aligned when using the OABI. Mark the union
in struct utp_upiu_header as packed to prevent that the compiler inserts
padding bytes.

Cc: Arnd Bergmann <arnd@xxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202308251634.tuRn4OVv-lkp@xxxxxxxxx/
Fixes: 617bfaa8dd50 ("scsi: ufs: Simplify response header parsing")
Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
---
 include/uapi/scsi/scsi_bsg_ufs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/scsi/scsi_bsg_ufs.h b/include/uapi/scsi/scsi_bsg_ufs.h
index bf1832dc35db..b41b5ae1d515 100644
--- a/include/uapi/scsi/scsi_bsg_ufs.h
+++ b/include/uapi/scsi/scsi_bsg_ufs.h
@@ -83,7 +83,7 @@ struct utp_upiu_header {
 			union {
 				__u8 tm_function;
 				__u8 query_function;
-			};
+			} __attribute__((packed));
 			__u8 response;
 			__u8 status;
 			__u8 ehs_length;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux