mirror of
https://github.com/acpica/acpica/
synced 2025-01-23 18:02:17 +03:00
Lint cleanup and 16-bit support
date 2002.07.25.19.57.00; author rmoore1; state Exp;
This commit is contained in:
parent
3baf54d42d
commit
3893439ebf
source/components/disassembler
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmbuffer - AML disassembler, buffer and string support
|
||||
* $Revision: 1.4 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -156,7 +156,7 @@ AcpiDmDisasmByteList (
|
||||
|
||||
for (i = 0; i < ByteCount; i++)
|
||||
{
|
||||
AcpiOsPrintf ("0x%2.2X", ByteData[i]);
|
||||
AcpiOsPrintf ("0x%2.2X", (UINT32) ByteData[i]);
|
||||
|
||||
/* Add comma if there are more bytes to display */
|
||||
|
||||
@ -444,7 +444,7 @@ AcpiDmString (
|
||||
case '\'': /* Single Quote */
|
||||
case '\"': /* Double Quote */
|
||||
case '\\': /* Backslash */
|
||||
AcpiOsPrintf ("\\%c", String[i]);
|
||||
AcpiOsPrintf ("\\%c", (int) String[i]);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -455,13 +455,13 @@ AcpiDmString (
|
||||
{
|
||||
/* This is a normal character */
|
||||
|
||||
AcpiOsPrintf ("%c", String[i]);
|
||||
AcpiOsPrintf ("%c", (int) String[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* All others will be Hex escapes */
|
||||
|
||||
AcpiOsPrintf ("\\x%2.2X", String[i]);
|
||||
AcpiOsPrintf ("\\x%2.2X", (INT32) String[i]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -504,7 +504,7 @@ AcpiDmUnicode (
|
||||
|
||||
for (i = 0; i < (WordCount - 1); i++)
|
||||
{
|
||||
AcpiOsPrintf ("%c", WordData[i]);
|
||||
AcpiOsPrintf ("%c", (int) WordData[i]);
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("\")");
|
||||
@ -615,13 +615,13 @@ AcpiDmEisaId (
|
||||
|
||||
/* Three Alpha characters (AAA), 5 bits each */
|
||||
|
||||
((BigEndianId >> 26) & 0x1F) + 0x40,
|
||||
((BigEndianId >> 21) & 0x1F) + 0x40,
|
||||
((BigEndianId >> 16) & 0x1F) + 0x40,
|
||||
(int) ((BigEndianId >> 26) & 0x1F) + 0x40,
|
||||
(int) ((BigEndianId >> 21) & 0x1F) + 0x40,
|
||||
(int) ((BigEndianId >> 16) & 0x1F) + 0x40,
|
||||
|
||||
/* Numeric part (NNNN) is simply the lower 16 bits */
|
||||
|
||||
(BigEndianId & 0xFFFF));
|
||||
(UINT32) (BigEndianId & 0xFFFF));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmopcode - AML disassembler, specific AML opcodes
|
||||
* $Revision: 1.73 $
|
||||
* $Revision: 1.74 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -114,13 +114,10 @@
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#include "acpi.h"
|
||||
#include "acparser.h"
|
||||
#include "amlcode.h"
|
||||
#include "acdisasm.h"
|
||||
#include "acdebug.h"
|
||||
|
||||
|
||||
#ifdef ACPI_DISASSEMBLER
|
||||
|
||||
@ -444,7 +441,7 @@ AcpiDmDisassembleOneOp (
|
||||
{
|
||||
AcpiDmEisaId (Op->Common.Value.Integer32);
|
||||
}
|
||||
else if ((Op->Common.Value.Integer32 == 0xFFFFFFFF) &&
|
||||
else if ((Op->Common.Value.Integer32 == ACPI_UINT32_MAX) &&
|
||||
(AcpiGbl_DSDT->Revision < 2))
|
||||
{
|
||||
AcpiOsPrintf ("Ones");
|
||||
@ -537,7 +534,7 @@ AcpiDmDisassembleOneOp (
|
||||
case AML_INT_NAMEDFIELD_OP:
|
||||
|
||||
Length = AcpiDmDumpName ((char *) &Op->Named.Name);
|
||||
AcpiOsPrintf (",%*.s %d", 5 - Length, " ", Op->Common.Value.Integer32);
|
||||
AcpiOsPrintf (",%*.s %d", (int) (5 - Length), " ", Op->Common.Value.Integer32);
|
||||
AcpiDmCommaIfFieldMember (Op);
|
||||
|
||||
Info->BitOffset += Op->Common.Value.Integer32;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmresrc.c - Resource Descriptor disassembly
|
||||
* $Revision: 1.1 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -195,7 +195,7 @@ AcpiDmResourceDescriptor (
|
||||
UINT8 *ByteData,
|
||||
UINT32 ByteCount)
|
||||
{
|
||||
UINT32 CurrentByteOffset;
|
||||
NATIVE_UINT CurrentByteOffset;
|
||||
UINT8 CurrentByte;
|
||||
UINT8 DescriptorId;
|
||||
UINT32 Length;
|
||||
@ -224,7 +224,7 @@ AcpiDmResourceDescriptor (
|
||||
CurrentByteOffset += 1;
|
||||
}
|
||||
|
||||
CurrentByteOffset += Length;
|
||||
CurrentByteOffset += (NATIVE_UINT) Length;
|
||||
|
||||
/* Determine type of resource */
|
||||
|
||||
@ -294,11 +294,21 @@ AcpiDmResourceDescriptor (
|
||||
{
|
||||
/*
|
||||
* Close an open StartDependentDescriptor. This indicates a missing
|
||||
* EndDependentDescriptor and we fix it here.
|
||||
* EndDependentDescriptor.
|
||||
*/
|
||||
Level--;
|
||||
DependentFns = FALSE;
|
||||
AcpiDmEndDependentDescriptor (DescriptorBody, Length, Level);
|
||||
AcpiDmIndent (Level);
|
||||
AcpiOsPrintf ("}\n");
|
||||
AcpiDmIndent (Level);
|
||||
|
||||
AcpiOsPrintf ("/*** Missing EndDependentFunctions descriptor */");
|
||||
|
||||
/*
|
||||
* We could fix the problem, but then the ASL would not match the AML
|
||||
* So, we don't do this:
|
||||
* AcpiDmEndDependentDescriptor (DescriptorBody, Length, Level);
|
||||
*/
|
||||
}
|
||||
return;
|
||||
|
||||
@ -396,7 +406,7 @@ AcpiDmIsResourceDescriptor (
|
||||
UINT8 *ByteData;
|
||||
UINT32 ByteCount;
|
||||
ACPI_PARSE_OBJECT *NextOp;
|
||||
UINT32 CurrentByteOffset;
|
||||
NATIVE_UINT CurrentByteOffset;
|
||||
UINT8 CurrentByte;
|
||||
UINT8 DescriptorId;
|
||||
UINT32 Length;
|
||||
@ -453,7 +463,7 @@ AcpiDmIsResourceDescriptor (
|
||||
CurrentByteOffset += 1;
|
||||
}
|
||||
|
||||
CurrentByteOffset += Length;
|
||||
CurrentByteOffset += (NATIVE_UINT) Length;
|
||||
|
||||
/* Determine type of resource */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmresrcl.c - "Large" Resource Descriptor disassembly
|
||||
* $Revision: 1.4 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -560,7 +560,7 @@ AcpiDmInterruptDescriptor (
|
||||
for (i = 0; i < Resource->TableLength; i++)
|
||||
{
|
||||
AcpiDmIndent (Level + 1);
|
||||
AcpiOsPrintf ("0x%8.8X,\n", Resource->InterruptNumber[i]);
|
||||
AcpiOsPrintf ("0x%8.8X,\n", (UINT32) Resource->InterruptNumber[i]);
|
||||
}
|
||||
|
||||
AcpiDmIndent (Level);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmresrcs.c - "Small" Resource Descriptor disassembly
|
||||
* $Revision: 1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -217,10 +217,10 @@ AcpiDmIoDescriptor (
|
||||
AcpiDmIndent (Level);
|
||||
AcpiOsPrintf ("IO (%s, 0x%4.4X, 0x%4.4X, 0x%2.2X, 0x%2.2X)\n",
|
||||
AcpiGbl_IoDecode [(Resource->Information & 1)],
|
||||
Resource->AddressMin,
|
||||
Resource->AddressMax,
|
||||
Resource->Alignment,
|
||||
Resource->Length);
|
||||
(UINT32) Resource->AddressMin,
|
||||
(UINT32) Resource->AddressMax,
|
||||
(UINT32) Resource->Alignment,
|
||||
(UINT32) Resource->Length);
|
||||
}
|
||||
|
||||
|
||||
@ -247,8 +247,8 @@ AcpiDmFixedIoDescriptor (
|
||||
|
||||
AcpiDmIndent (Level);
|
||||
AcpiOsPrintf ("FixedIO (0x%4.4X, 0x%2.2X)\n",
|
||||
Resource->BaseAddress,
|
||||
Resource->Length);
|
||||
(UINT32) Resource->BaseAddress,
|
||||
(UINT32) Resource->Length);
|
||||
}
|
||||
|
||||
|
||||
@ -278,8 +278,8 @@ AcpiDmStartDependentDescriptor (
|
||||
if (Length & 1)
|
||||
{
|
||||
AcpiOsPrintf ("StartDependentFn (0x%2.2X, 0x%2.2X)\n",
|
||||
Resource->Flags & 3,
|
||||
(Resource->Flags >> 2) & 3);
|
||||
(UINT32) Resource->Flags & 3,
|
||||
(UINT32) (Resource->Flags >> 2) & 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmwalk - AML disassembly tree walk
|
||||
* $Revision: 1.5 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -161,7 +161,6 @@ AcpiDmDisassemble (
|
||||
return;
|
||||
}
|
||||
|
||||
Info.PreviousLevel = 0;
|
||||
Info.Level = 0;
|
||||
AcpiDmWalkParseTree (Op, AcpiDmDescendingOp, AcpiDmAscendingOp, &Info);
|
||||
|
||||
@ -190,7 +189,6 @@ AcpiDmWalkParseTree (
|
||||
ASL_WALK_CALLBACK AscendingCallback,
|
||||
void *Context)
|
||||
{
|
||||
// UINT32 Level;
|
||||
BOOLEAN NodePreviouslyVisited;
|
||||
ACPI_PARSE_OBJECT *StartOp = Op;
|
||||
ACPI_STATUS Status;
|
||||
|
Loading…
Reference in New Issue
Block a user