aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gpllib/dmi/dmi_cache.c
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-11-24 13:42:41 +0100
committerErwan Velu <erwan.velu@free.fr>2009-11-24 13:42:41 +0100
commit2672e142b4b69ab5161d24261812d3509cb8915b (patch)
treee3b1b60b265044c2148c0c53682619343ff4f74a /com32/gpllib/dmi/dmi_cache.c
parenta06075995c5ea9c4c473820cba03033e9c945a41 (diff)
downloadsyslinux-2672e142b4b69ab5161d24261812d3509cb8915b.tar.gz
syslinux-2672e142b4b69ab5161d24261812d3509cb8915b.tar.xz
syslinux-2672e142b4b69ab5161d24261812d3509cb8915b.zip
gpllibs: Running Nindent
Impact: visual Running Nindent on gpllib / gplinclude
Diffstat (limited to 'com32/gpllib/dmi/dmi_cache.c')
-rw-r--r--com32/gpllib/dmi/dmi_cache.c167
1 files changed, 83 insertions, 84 deletions
diff --git a/com32/gpllib/dmi/dmi_cache.c b/com32/gpllib/dmi/dmi_cache.c
index bc1fc45f..24e564b6 100644
--- a/com32/gpllib/dmi/dmi_cache.c
+++ b/com32/gpllib/dmi/dmi_cache.c
@@ -25,111 +25,110 @@
const char *dmi_cache_mode(uint8_t code)
{
- static const char *mode[]={
- "Write Through", /* 0x00 */
- "Write Back",
- "Varies With Memory Address",
- "Unknown" /* 0x03 */
- };
-
- return mode[code];
+ static const char *mode[] = {
+ "Write Through", /* 0x00 */
+ "Write Back",
+ "Varies With Memory Address",
+ "Unknown" /* 0x03 */
+ };
+
+ return mode[code];
}
const char *dmi_cache_location(uint8_t code)
{
- static const char *location[4]={
- "Internal", /* 0x00 */
- "External",
- NULL, /* 0x02 */
- "Unknown" /* 0x03 */
- };
-
- if(location[code]!=NULL)
- return location[code];
- return out_of_spec;
+ static const char *location[4] = {
+ "Internal", /* 0x00 */
+ "External",
+ NULL, /* 0x02 */
+ "Unknown" /* 0x03 */
+ };
+
+ if (location[code] != NULL)
+ return location[code];
+ return out_of_spec;
}
uint16_t dmi_cache_size(uint16_t code)
{
- if(code&0x8000)
- return (code&0x7FFF)<<6; /* KB */
- else
- return code; /* KB */
+ if (code & 0x8000)
+ return (code & 0x7FFF) << 6; /* KB */
+ else
+ return code; /* KB */
}
-void dmi_cache_types(uint16_t code, const char *sep, char* array)
+void dmi_cache_types(uint16_t code, const char *sep, char *array)
{
- /* 3.3.8.2 */
- static const char *types[]={
- "Other", /* 0 */
- "Unknown",
- "Non-burst",
- "Burst",
- "Pipeline Burst",
- "Synchronous",
- "Asynchronous" /* 6 */
- };
-
- if((code&0x007F)==0)
- strcpy(array, "None");
- else
- {
- int i;
-
- for(i=0; i<=6; i++)
- if(code&(1<<i))
- sprintf(array, "%s%s", sep, types[i]);
- }
+ /* 3.3.8.2 */
+ static const char *types[] = {
+ "Other", /* 0 */
+ "Unknown",
+ "Non-burst",
+ "Burst",
+ "Pipeline Burst",
+ "Synchronous",
+ "Asynchronous" /* 6 */
+ };
+
+ if ((code & 0x007F) == 0)
+ strcpy(array, "None");
+ else {
+ int i;
+
+ for (i = 0; i <= 6; i++)
+ if (code & (1 << i))
+ sprintf(array, "%s%s", sep, types[i]);
+ }
}
const char *dmi_cache_ec_type(uint8_t code)
{
- /* 3.3.8.3 */
- static const char *type[]={
- "Other", /* 0x01 */
- "Unknown",
- "None",
- "Parity",
- "Single-bit ECC",
- "Multi-bit ECC" /* 0x06 */
- };
-
- if(code>=0x01 && code<=0x06)
- return type[code-0x01];
- return out_of_spec;
+ /* 3.3.8.3 */
+ static const char *type[] = {
+ "Other", /* 0x01 */
+ "Unknown",
+ "None",
+ "Parity",
+ "Single-bit ECC",
+ "Multi-bit ECC" /* 0x06 */
+ };
+
+ if (code >= 0x01 && code <= 0x06)
+ return type[code - 0x01];
+ return out_of_spec;
}
const char *dmi_cache_type(uint8_t code)
{
- /* 3.3.8.4 */
- static const char *type[]={
- "Other", /* 0x01 */
- "Unknown",
- "Instruction",
- "Data",
- "Unified" /* 0x05 */
- };
-
- if(code>=0x01 && code<=0x05)
- return type[code-0x01];
- return out_of_spec;
+ /* 3.3.8.4 */
+ static const char *type[] = {
+ "Other", /* 0x01 */
+ "Unknown",
+ "Instruction",
+ "Data",
+ "Unified" /* 0x05 */
+ };
+
+ if (code >= 0x01 && code <= 0x05)
+ return type[code - 0x01];
+ return out_of_spec;
}
const char *dmi_cache_associativity(uint8_t code)
{
- /* 3.3.8.5 */
- static const char *type[]={
- "Other", /* 0x01 */
- "Unknown",
- "Direct Mapped",
- "2-way Set-associative",
- "4-way Set-associative",
- "Fully Associative",
- "8-way Set-associative",
- "16-way Set-associative" /* 0x08 */
- };
-
- if(code>=0x01 && code<=0x08)
- return type[code-0x01];
- return out_of_spec;
+ /* 3.3.8.5 */
+ static const char *type[] = {
+ "Other", /* 0x01 */
+ "Unknown",
+ "Direct Mapped",
+ "2-way Set-associative",
+ "4-way Set-associative",
+ "Fully Associative",
+ "8-way Set-associative",
+ "16-way Set-associative" /* 0x08 */
+ };
+
+ if (code >= 0x01 && code <= 0x08)
+ return type[code - 0x01];
+ return out_of_spec;
}