MdeModulePkg: Consume new alignment-related macros
This patch substitutes the macros that were renamed in the first patch with the new, shared alignment macros. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Vitaly Cheptsov <vit9696@protonmail.com> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
836042ffd8
commit
495809a614
@@ -2029,7 +2029,7 @@ ScsiDiskReceiveData (
|
||||
goto Done;
|
||||
}
|
||||
|
||||
if ((ScsiDiskDevice->ScsiIo->IoAlign > 1) && !ADDRESS_IS_ALIGNED_ (PayloadBuffer, ScsiDiskDevice->ScsiIo->IoAlign)) {
|
||||
if ((ScsiDiskDevice->ScsiIo->IoAlign > 1) && !ADDRESS_IS_ALIGNED (PayloadBuffer, ScsiDiskDevice->ScsiIo->IoAlign)) {
|
||||
AlignedBuffer = AllocateAlignedBuffer (ScsiDiskDevice, PayloadBufferSize);
|
||||
if (AlignedBuffer == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
@@ -2249,7 +2249,7 @@ ScsiDiskSendData (
|
||||
goto Done;
|
||||
}
|
||||
|
||||
if ((ScsiDiskDevice->ScsiIo->IoAlign > 1) && !ADDRESS_IS_ALIGNED_ (PayloadBuffer, ScsiDiskDevice->ScsiIo->IoAlign)) {
|
||||
if ((ScsiDiskDevice->ScsiIo->IoAlign > 1) && !ADDRESS_IS_ALIGNED (PayloadBuffer, ScsiDiskDevice->ScsiIo->IoAlign)) {
|
||||
AlignedBuffer = AllocateAlignedBuffer (ScsiDiskDevice, PayloadBufferSize);
|
||||
if (AlignedBuffer == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
|
@@ -38,8 +38,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
#define IS_DEVICE_FIXED(a) (a)->FixedDevice ? 1 : 0
|
||||
|
||||
#define ADDRESS_IS_ALIGNED_(addr, size) (((UINTN) (addr) & (size - 1)) == 0)
|
||||
|
||||
#define UFS_WLUN_RPMB 0xC4
|
||||
|
||||
typedef struct {
|
||||
|
Reference in New Issue
Block a user