Message ID | 20230829163547.1200183-1-bvanassche@acm.org |
---|---|
State | New |
Headers | show |
Series | scsi: ufs: Fix the build for the old ARM OABI | expand |
On Tue, Aug 29, 2023, at 12:35, Bart Van Assche wrote: > 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@arndb.de> > Reported-by: kernel test robot <lkp@intel.com> > Closes: > https://lore.kernel.org/oe-kbuild-all/202308251634.tuRn4OVv-lkp@intel.com/ > Fixes: 617bfaa8dd50 ("scsi: ufs: Simplify response header parsing") > Signed-off-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
On 29.08.23 6:35 PM, Bart Van Assche wrote: > 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@arndb.de> > Reported-by: kernel test robot<lkp@intel.com> > Closes:https://lore.kernel.org/oe-kbuild-all/202308251634.tuRn4OVv-lkp@intel.com/ > Fixes: 617bfaa8dd50 ("scsi: ufs: Simplify response header parsing") > Signed-off-by: Bart Van Assche<bvanassche@acm.org> Thanks for the prompt fix! Reviewed-by: Bean Huo <beanhuo@micron.com>
Bart, > 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. Applied to 6.6/scsi-staging, thanks!
On Tue, 29 Aug 2023 09:35:42 -0700, Bart Van Assche wrote: > 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. > > Applied to 6.6/scsi-queue, thanks! [1/1] scsi: ufs: Fix the build for the old ARM OABI https://git.kernel.org/mkp/scsi/c/d0bac0ec89d6
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;
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@arndb.de> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202308251634.tuRn4OVv-lkp@intel.com/ Fixes: 617bfaa8dd50 ("scsi: ufs: Simplify response header parsing") Signed-off-by: Bart Van Assche <bvanassche@acm.org> --- include/uapi/scsi/scsi_bsg_ufs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)