Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntelSiliconPkg: Code Quality Improvements #215

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Close (
{
SMM_ACCESS_PRIVATE_DATA *SmmAccess;
BOOLEAN OpenState;
UINT8 Index;
UINTN Index;

SmmAccess = SMM_ACCESS_PRIVATE_DATA_FROM_THIS (This);
if (DescriptorIndex >= SmmAccess->NumberRegions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Close (
{
SMM_ACCESS_PRIVATE_DATA *SmmAccess;
BOOLEAN OpenState;
UINT8 Index;
UINTN Index;
UINTN DescriptorIndex;

SmmAccess = SMM_ACCESS_PRIVATE_DATA_FROM_THIS (This);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ ProcessDrhdPostMemory (
Initializes the Intel VTd Info in post memory phase.

@retval EFI_SUCCESS Usb bot driver is successfully initialized.
@retval EFI_NOT_FOUND Can't find the ACPI DMAR Table.
@retval EFI_OUT_OF_RESOURCES Can't initialize the driver.
**/
EFI_STATUS
Expand All @@ -514,7 +515,9 @@ InitVTdInfo (
ASSERT (VTdInfo != NULL);

AcpiDmarTable = GetAcpiDmarTable ();
ASSERT (AcpiDmarTable != NULL);
ASSERT (AcpiDmarTable != NULL);
return EFI_NOT_FOUND;
}

if (VTdInfo->VtdUnitInfo == NULL) {
//
Expand Down Expand Up @@ -562,6 +565,7 @@ InitVTdInfo (
Initializes the Intel VTd DMAR for block all DMA.

@retval EFI_SUCCESS Driver is successfully initialized.
@retval EFI_NOT_FOUND Can't find the ACPI DMAR Table.
@retval RETURN_NOT_READY Fail to get VTdInfo Hob .
**/
EFI_STATUS
Expand All @@ -575,7 +579,10 @@ InitVTdDmarBlockAll (
// Get the DMAR table
//
AcpiDmarTable = GetAcpiDmarTable ();
ASSERT (AcpiDmarTable != NULL);
if (AcpiDmarTable == NULL) {
ASSERT (AcpiDmarTable != NULL);
return EFI_NOT_FOUND;
}

//
// Parse the DMAR table and block all DMA
Expand Down
Loading