]> git.ozlabs.org Git - ccan/commitdiff
cpuid: ccanlint fixes.
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 27 Sep 2013 18:41:59 +0000 (04:11 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 27 Sep 2013 18:41:59 +0000 (04:11 +0930)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/cpuid/BSD-MIT [deleted symlink]
ccan/cpuid/LICENSE [new file with mode: 0644]
ccan/cpuid/_info
ccan/cpuid/cpuid.h
ccan/cpuid/test/run.c

diff --git a/ccan/cpuid/BSD-MIT b/ccan/cpuid/BSD-MIT
deleted file mode 120000 (symlink)
index 2354d12..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../licenses/BSD-MIT
\ No newline at end of file
diff --git a/ccan/cpuid/LICENSE b/ccan/cpuid/LICENSE
new file mode 100644 (file)
index 0000000..2354d12
--- /dev/null
@@ -0,0 +1 @@
+../../licenses/BSD-MIT
\ No newline at end of file
index 1603b4bec40ad9076d4ee6fe0ce52499e6c48609..569dc21cd2885061fc7ef46369068db4889c73e1 100644 (file)
@@ -8,10 +8,11 @@
  *
  * Example:
  * #include <ccan/cpuid/cpuid.h>
  *
  * Example:
  * #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);
  *     printf ("Highest extended function supported: %d\n", highest);
  *
  *     cpuid(CPU_HIGHEST_EXTENDED_FUNCTION_SUPPORTED, &highest);
  *     printf ("Highest extended function supported: %d\n", highest);
  *
index 305d69aa3a801e694d1ccff8cfda6b262b4015c9..0a9fc9d91ac84bb1d98cc27e80bb1b5ae5a914da 100644 (file)
@@ -69,7 +69,7 @@ typedef enum cpuid {
 
        CPU_HIGHEST_EXTENDED_FUNCTION_SUPPORTED         = 0x80000000,
        CPU_EXTENDED_PROC_INFO_FEATURE_BITS             = 0x80000001,
 
        CPU_HIGHEST_EXTENDED_FUNCTION_SUPPORTED         = 0x80000000,
        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_EXTENDED_L2_CACHE_FEATURES                  = 0x80000006,
        CPU_ADV_POWER_MGT_INFO                          = 0x80000007,
        CPU_L1_CACHE_AND_TLB_IDS                        = 0x80000005,
        CPU_EXTENDED_L2_CACHE_FEATURES                  = 0x80000006,
        CPU_ADV_POWER_MGT_INFO                          = 0x80000007,
index c96f3ab8dba0ed5b9ad5fc71e16aa94bbef11356..c77fd25f87face6a4dc74a501b140132764413fc 100644 (file)
@@ -1,9 +1,9 @@
-#include "cpuid.h"
+#include "../cpuid.c"
 
 #include <stdio.h>
 #include <stdint.h>
 
 
 #include <stdio.h>
 #include <stdint.h>
 
-int main()
+int main(void)
 {
        if (!cpuid_is_supported()) {
                printf ("CPUID instruction is not supported by this CPU\n");
 {
        if (!cpuid_is_supported()) {
                printf ("CPUID instruction is not supported by this CPU\n");