]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: 3w-9xxx: Reduce scope of structure packing
authorSamuel Holland <samuel@sholland.org>
Tue, 27 Apr 2021 23:59:14 +0000 (18:59 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 15 May 2021 22:01:33 +0000 (18:01 -0400)
commit679b2ba791877f9a0bfeefdac1f4330710be304b
treed4225460607bdab31003d3dcd5c204954e93b989
parent48356f5cbfe27f1cc54ad22f98353703b2791b87
scsi: 3w-9xxx: Reduce scope of structure packing

Currently, all command packet structs used by this driver are packed.
However, only one (TW_SG_Entry) actually needs to be packed, because it
uses 64-bit addresses at 32-bit alignment. To improve the quality of
generated code, stop packing all of the other command packet structs.  This
requires adjusting the type of one misaligned "reserved" member.

After this change, pahole reports that only one type had its layout change:
the tw_compat_info member of TW_Device_Extension is now naturally aligned.

Link: https://lore.kernel.org/r/20210427235915.39211-3-samuel@sholland.org
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/3w-9xxx.h