Commit a87884aa authored by Rusty Russell's avatar Rusty Russell

cpuid: ccanlint fixes.

Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 659efe73
../../licenses/BSD-MIT
\ No newline at end of file
../../licenses/BSD-MIT
\ No newline at end of file
...@@ -8,10 +8,11 @@ ...@@ -8,10 +8,11 @@
* *
* Example: * Example:
* #include <ccan/cpuid/cpuid.h> * #include <ccan/cpuid/cpuid.h>
* #include <stdio.h>
* *
* int main() * int main(void)
* { * {
* int highest; * uint32_t highest;
* cpuid(CPU_HIGHEST_EXTENDED_FUNCTION_SUPPORTED, &highest); * cpuid(CPU_HIGHEST_EXTENDED_FUNCTION_SUPPORTED, &highest);
* printf ("Highest extended function supported: %d\n", highest); * printf ("Highest extended function supported: %d\n", highest);
* *
......
...@@ -69,7 +69,7 @@ typedef enum cpuid { ...@@ -69,7 +69,7 @@ typedef enum cpuid {
CPU_HIGHEST_EXTENDED_FUNCTION_SUPPORTED = 0x80000000, CPU_HIGHEST_EXTENDED_FUNCTION_SUPPORTED = 0x80000000,
CPU_EXTENDED_PROC_INFO_FEATURE_BITS = 0x80000001, CPU_EXTENDED_PROC_INFO_FEATURE_BITS = 0x80000001,
CPU_PROC_BRAND_STRING = 0x80000002, CPU_PROC_BRAND_STRING = 0x80000002,
CPU_L1_CACHE_AND_TLB_IDS = 0x80000005, CPU_L1_CACHE_AND_TLB_IDS = 0x80000005,
CPU_EXTENDED_L2_CACHE_FEATURES = 0x80000006, CPU_EXTENDED_L2_CACHE_FEATURES = 0x80000006,
CPU_ADV_POWER_MGT_INFO = 0x80000007, CPU_ADV_POWER_MGT_INFO = 0x80000007,
......
#include "cpuid.h" #include "../cpuid.c"
#include <stdio.h> #include <stdio.h>
#include <stdint.h> #include <stdint.h>
int main() int main(void)
{ {
if (!cpuid_is_supported()) { if (!cpuid_is_supported()) {
printf ("CPUID instruction is not supported by this CPU\n"); printf ("CPUID instruction is not supported by this CPU\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment