summaryrefslogtreecommitdiffstats
path: root/op-flasher/pflash/ccan
diff options
context:
space:
mode:
Diffstat (limited to 'op-flasher/pflash/ccan')
-rw-r--r--op-flasher/pflash/ccan/Makefile.inc8
-rw-r--r--op-flasher/pflash/ccan/array_size/LICENSE28
-rw-r--r--op-flasher/pflash/ccan/array_size/_info46
-rw-r--r--op-flasher/pflash/ccan/array_size/array_size.h26
-rw-r--r--op-flasher/pflash/ccan/array_size/test/compile_fail-function-param.c24
-rw-r--r--op-flasher/pflash/ccan/array_size/test/compile_fail.c14
-rw-r--r--op-flasher/pflash/ccan/array_size/test/run.c33
-rw-r--r--op-flasher/pflash/ccan/build_assert/LICENSE28
-rw-r--r--op-flasher/pflash/ccan/build_assert/_info49
-rw-r--r--op-flasher/pflash/ccan/build_assert/build_assert.h40
-rw-r--r--op-flasher/pflash/ccan/build_assert/test/compile_fail-expr.c10
-rw-r--r--op-flasher/pflash/ccan/build_assert/test/compile_fail.c9
-rw-r--r--op-flasher/pflash/ccan/build_assert/test/compile_ok.c7
-rw-r--r--op-flasher/pflash/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c9
-rw-r--r--op-flasher/pflash/ccan/check_type/LICENSE28
-rw-r--r--op-flasher/pflash/ccan/check_type/_info33
-rw-r--r--op-flasher/pflash/ccan/check_type/check_type.h64
-rw-r--r--op-flasher/pflash/ccan/check_type/test/compile_fail-check_type.c9
-rw-r--r--op-flasher/pflash/ccan/check_type/test/compile_fail-check_type_unsigned.c14
-rw-r--r--op-flasher/pflash/ccan/check_type/test/compile_fail-check_types_match.c10
-rw-r--r--op-flasher/pflash/ccan/check_type/test/run.c22
-rw-r--r--op-flasher/pflash/ccan/container_of/LICENSE28
-rw-r--r--op-flasher/pflash/ccan/container_of/_info63
-rw-r--r--op-flasher/pflash/ccan/container_of/container_of.h109
-rw-r--r--op-flasher/pflash/ccan/container_of/test/compile_fail-bad-type.c22
-rw-r--r--op-flasher/pflash/ccan/container_of/test/compile_fail-types.c22
-rw-r--r--op-flasher/pflash/ccan/container_of/test/compile_fail-var-types.c25
-rw-r--r--op-flasher/pflash/ccan/container_of/test/run.c24
-rw-r--r--op-flasher/pflash/ccan/endian/LICENSE28
-rw-r--r--op-flasher/pflash/ccan/endian/_info53
-rw-r--r--op-flasher/pflash/ccan/endian/endian.h314
-rw-r--r--op-flasher/pflash/ccan/endian/test/compile_ok-constant.c12
-rw-r--r--op-flasher/pflash/ccan/endian/test/run.c106
33 files changed, 0 insertions, 1317 deletions
diff --git a/op-flasher/pflash/ccan/Makefile.inc b/op-flasher/pflash/ccan/Makefile.inc
deleted file mode 100644
index b132f9d..0000000
--- a/op-flasher/pflash/ccan/Makefile.inc
+++ /dev/null
@@ -1,8 +0,0 @@
-# -*-Makefile-*-
-
-SUBDIRS += ccan ccan/list ccan/str
-CCAN_OBJS = list/list.o str/str.o
-CCAN=ccan/built-in.o
-
-$(CCAN): $(CCAN_OBJS:%=ccan/%)
-
diff --git a/op-flasher/pflash/ccan/array_size/LICENSE b/op-flasher/pflash/ccan/array_size/LICENSE
deleted file mode 100644
index feb9b11..0000000
--- a/op-flasher/pflash/ccan/array_size/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Statement of Purpose
-
-The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
-
-Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
-
-For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
-
-1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
-
- the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
- moral rights retained by the original author(s) and/or performer(s);
- publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
- rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
- rights protecting the extraction, dissemination, use and reuse of data in a Work;
- database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
- other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
-
-2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
-
-3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
-
-4. Limitations and Disclaimers.
-
- No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
- Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
- Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
- Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
diff --git a/op-flasher/pflash/ccan/array_size/_info b/op-flasher/pflash/ccan/array_size/_info
deleted file mode 100644
index d670042..0000000
--- a/op-flasher/pflash/ccan/array_size/_info
+++ /dev/null
@@ -1,46 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include "config.h"
-
-/**
- * array_size - routine for safely deriving the size of a visible array.
- *
- * This provides a simple ARRAY_SIZE() macro, which (given a good compiler)
- * will also break compile if you try to use it on a pointer.
- *
- * This can ensure your code is robust to changes, without needing a gratuitous
- * macro or constant.
- *
- * Example:
- * // Outputs "Initialized 32 values"
- * #include <ccan/array_size/array_size.h>
- * #include <stdlib.h>
- * #include <stdio.h>
- *
- * // We currently use 32 random values.
- * static unsigned int vals[32];
- *
- * int main(void)
- * {
- * unsigned int i;
- * for (i = 0; i < ARRAY_SIZE(vals); i++)
- * vals[i] = random();
- * printf("Initialized %u values\n", i);
- * return 0;
- * }
- *
- * License: CC0 (Public domain)
- * Author: Rusty Russell <rusty@rustcorp.com.au>
- */
-int main(int argc, char *argv[])
-{
- if (argc != 2)
- return 1;
-
- if (strcmp(argv[1], "depends") == 0) {
- printf("ccan/build_assert\n");
- return 0;
- }
-
- return 1;
-}
diff --git a/op-flasher/pflash/ccan/array_size/array_size.h b/op-flasher/pflash/ccan/array_size/array_size.h
deleted file mode 100644
index 3279dc5..0000000
--- a/op-flasher/pflash/ccan/array_size/array_size.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* CC0 (Public domain) - see LICENSE file for details */
-#ifndef CCAN_ARRAY_SIZE_H
-#define CCAN_ARRAY_SIZE_H
-#include "config.h"
-#include <ccan/build_assert/build_assert.h>
-
-/**
- * ARRAY_SIZE - get the number of elements in a visible array
- * @arr: the array whose size you want.
- *
- * This does not work on pointers, or arrays declared as [], or
- * function parameters. With correct compiler support, such usage
- * will cause a build error (see build_assert).
- */
-#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + _array_size_chk(arr))
-
-#if HAVE_BUILTIN_TYPES_COMPATIBLE_P && HAVE_TYPEOF
-/* Two gcc extensions.
- * &a[0] degrades to a pointer: a different type from an array */
-#define _array_size_chk(arr) \
- BUILD_ASSERT_OR_ZERO(!__builtin_types_compatible_p(typeof(arr), \
- typeof(&(arr)[0])))
-#else
-#define _array_size_chk(arr) 0
-#endif
-#endif /* CCAN_ALIGNOF_H */
diff --git a/op-flasher/pflash/ccan/array_size/test/compile_fail-function-param.c b/op-flasher/pflash/ccan/array_size/test/compile_fail-function-param.c
deleted file mode 100644
index ec4697d..0000000
--- a/op-flasher/pflash/ccan/array_size/test/compile_fail-function-param.c
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <ccan/array_size/array_size.h>
-#include <stdlib.h>
-
-struct foo {
- unsigned int a, b;
-};
-
-int check_parameter(const struct foo array[4]);
-int check_parameter(const struct foo array[4])
-{
-#ifdef FAIL
- return (ARRAY_SIZE(array) == 4);
-#if !HAVE_TYPEOF || !HAVE_BUILTIN_TYPES_COMPATIBLE_P
-#error "Unfortunately we don't fail if _array_size_chk is a noop."
-#endif
-#else
- return sizeof(array) == 4 * sizeof(struct foo);
-#endif
-}
-
-int main(int argc, char *argv[])
-{
- return check_parameter(NULL);
-}
diff --git a/op-flasher/pflash/ccan/array_size/test/compile_fail.c b/op-flasher/pflash/ccan/array_size/test/compile_fail.c
deleted file mode 100644
index 0ba493d..0000000
--- a/op-flasher/pflash/ccan/array_size/test/compile_fail.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <ccan/array_size/array_size.h>
-
-int main(int argc, char *argv[8])
-{
- char array[100];
-#ifdef FAIL
- return ARRAY_SIZE(argv) + ARRAY_SIZE(array);
-#if !HAVE_TYPEOF || !HAVE_BUILTIN_TYPES_COMPATIBLE_P
-#error "Unfortunately we don't fail if _array_size_chk is a noop."
-#endif
-#else
- return ARRAY_SIZE(array);
-#endif
-}
diff --git a/op-flasher/pflash/ccan/array_size/test/run.c b/op-flasher/pflash/ccan/array_size/test/run.c
deleted file mode 100644
index b42dd72..0000000
--- a/op-flasher/pflash/ccan/array_size/test/run.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <ccan/array_size/array_size.h>
-#include <ccan/tap/tap.h>
-
-static char array1[1];
-static int array2[2];
-static unsigned long array3[3][5];
-struct foo {
- unsigned int a, b;
- char string[100];
-};
-static struct foo array4[4];
-
-/* Make sure they can be used in initializers. */
-static int array1_size = ARRAY_SIZE(array1);
-static int array2_size = ARRAY_SIZE(array2);
-static int array3_size = ARRAY_SIZE(array3);
-static int array4_size = ARRAY_SIZE(array4);
-
-int main(int argc, char *argv[])
-{
- plan_tests(8);
- ok1(array1_size == 1);
- ok1(array2_size == 2);
- ok1(array3_size == 3);
- ok1(array4_size == 4);
-
- ok1(ARRAY_SIZE(array1) == 1);
- ok1(ARRAY_SIZE(array2) == 2);
- ok1(ARRAY_SIZE(array3) == 3);
- ok1(ARRAY_SIZE(array4) == 4);
-
- return exit_status();
-}
diff --git a/op-flasher/pflash/ccan/build_assert/LICENSE b/op-flasher/pflash/ccan/build_assert/LICENSE
deleted file mode 100644
index feb9b11..0000000
--- a/op-flasher/pflash/ccan/build_assert/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Statement of Purpose
-
-The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
-
-Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
-
-For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
-
-1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
-
- the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
- moral rights retained by the original author(s) and/or performer(s);
- publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
- rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
- rights protecting the extraction, dissemination, use and reuse of data in a Work;
- database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
- other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
-
-2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
-
-3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
-
-4. Limitations and Disclaimers.
-
- No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
- Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
- Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
- Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
diff --git a/op-flasher/pflash/ccan/build_assert/_info b/op-flasher/pflash/ccan/build_assert/_info
deleted file mode 100644
index bce92b7..0000000
--- a/op-flasher/pflash/ccan/build_assert/_info
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include "config.h"
-
-/**
- * build_assert - routines for build-time assertions
- *
- * This code provides routines which will cause compilation to fail should some
- * assertion be untrue: such failures are preferable to run-time assertions,
- * but much more limited since they can only depends on compile-time constants.
- *
- * These assertions are most useful when two parts of the code must be kept in
- * sync: it is better to avoid such cases if possible, but seconds best is to
- * detect invalid changes at build time.
- *
- * For example, a tricky piece of code might rely on a certain element being at
- * the start of the structure. To ensure that future changes don't break it,
- * you would catch such changes in your code like so:
- *
- * Example:
- * #include <stddef.h>
- * #include <ccan/build_assert/build_assert.h>
- *
- * struct foo {
- * char string[5];
- * int x;
- * };
- *
- * static char *foo_string(struct foo *foo)
- * {
- * // This trick requires that the string be first in the structure
- * BUILD_ASSERT(offsetof(struct foo, string) == 0);
- * return (char *)foo;
- * }
- *
- * License: CC0 (Public domain)
- * Author: Rusty Russell <rusty@rustcorp.com.au>
- */
-int main(int argc, char *argv[])
-{
- if (argc != 2)
- return 1;
-
- if (strcmp(argv[1], "depends") == 0)
- /* Nothing. */
- return 0;
-
- return 1;
-}
diff --git a/op-flasher/pflash/ccan/build_assert/build_assert.h b/op-flasher/pflash/ccan/build_assert/build_assert.h
deleted file mode 100644
index bd07254..0000000
--- a/op-flasher/pflash/ccan/build_assert/build_assert.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* CC0 (Public domain) - see LICENSE file for details */
-#ifndef CCAN_BUILD_ASSERT_H
-#define CCAN_BUILD_ASSERT_H
-
-/**
- * BUILD_ASSERT - assert a build-time dependency.
- * @cond: the compile-time condition which must be true.
- *
- * Your compile will fail if the condition isn't true, or can't be evaluated
- * by the compiler. This can only be used within a function.
- *
- * Example:
- * #include <stddef.h>
- * ...
- * static char *foo_to_char(struct foo *foo)
- * {
- * // This code needs string to be at start of foo.
- * BUILD_ASSERT(offsetof(struct foo, string) == 0);
- * return (char *)foo;
- * }
- */
-#define BUILD_ASSERT(cond) \
- do { (void) sizeof(char [1 - 2*!(cond)]); } while(0)
-
-/**
- * BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression.
- * @cond: the compile-time condition which must be true.
- *
- * Your compile will fail if the condition isn't true, or can't be evaluated
- * by the compiler. This can be used in an expression: its value is "0".
- *
- * Example:
- * #define foo_to_char(foo) \
- * ((char *)(foo) \
- * + BUILD_ASSERT_OR_ZERO(offsetof(struct foo, string) == 0))
- */
-#define BUILD_ASSERT_OR_ZERO(cond) \
- (sizeof(char [1 - 2*!(cond)]) - 1)
-
-#endif /* CCAN_BUILD_ASSERT_H */
diff --git a/op-flasher/pflash/ccan/build_assert/test/compile_fail-expr.c b/op-flasher/pflash/ccan/build_assert/test/compile_fail-expr.c
deleted file mode 100644
index 1c6e31c..0000000
--- a/op-flasher/pflash/ccan/build_assert/test/compile_fail-expr.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <ccan/build_assert/build_assert.h>
-
-int main(int argc, char *argv[])
-{
-#ifdef FAIL
- return BUILD_ASSERT_OR_ZERO(1 == 0);
-#else
- return 0;
-#endif
-}
diff --git a/op-flasher/pflash/ccan/build_assert/test/compile_fail.c b/op-flasher/pflash/ccan/build_assert/test/compile_fail.c
deleted file mode 100644
index f29c3fd..0000000
--- a/op-flasher/pflash/ccan/build_assert/test/compile_fail.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <ccan/build_assert/build_assert.h>
-
-int main(int argc, char *argv[])
-{
-#ifdef FAIL
- BUILD_ASSERT(1 == 0);
-#endif
- return 0;
-}
diff --git a/op-flasher/pflash/ccan/build_assert/test/compile_ok.c b/op-flasher/pflash/ccan/build_assert/test/compile_ok.c
deleted file mode 100644
index 20c2af6..0000000
--- a/op-flasher/pflash/ccan/build_assert/test/compile_ok.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <ccan/build_assert/build_assert.h>
-
-int main(int argc, char *argv[])
-{
- BUILD_ASSERT(1 == 1);
- return 0;
-}
diff --git a/op-flasher/pflash/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c b/op-flasher/pflash/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c
deleted file mode 100644
index a5450f1..0000000
--- a/op-flasher/pflash/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <ccan/build_assert/build_assert.h>
-#include <ccan/tap/tap.h>
-
-int main(int argc, char *argv[])
-{
- plan_tests(1);
- ok1(BUILD_ASSERT_OR_ZERO(1 == 1) == 0);
- return exit_status();
-}
diff --git a/op-flasher/pflash/ccan/check_type/LICENSE b/op-flasher/pflash/ccan/check_type/LICENSE
deleted file mode 100644
index feb9b11..0000000
--- a/op-flasher/pflash/ccan/check_type/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Statement of Purpose
-
-The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
-
-Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
-
-For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
-
-1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
-
- the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
- moral rights retained by the original author(s) and/or performer(s);
- publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
- rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
- rights protecting the extraction, dissemination, use and reuse of data in a Work;
- database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
- other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
-
-2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
-
-3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
-
-4. Limitations and Disclaimers.
-
- No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
- Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
- Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
- Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
diff --git a/op-flasher/pflash/ccan/check_type/_info b/op-flasher/pflash/ccan/check_type/_info
deleted file mode 100644
index cb19e20..0000000
--- a/op-flasher/pflash/ccan/check_type/_info
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include "config.h"
-
-/**
- * check_type - routines for compile time type checking
- *
- * C has fairly weak typing: ints get automatically converted to longs, signed
- * to unsigned, etc. There are some cases where this is best avoided, and
- * these macros provide methods for evoking warnings (or build errors) when
- * a precise type isn't used.
- *
- * On compilers which don't support typeof() these routines are less effective,
- * since they have to use sizeof() which can only distiguish between types of
- * different size.
- *
- * License: CC0 (Public domain)
- * Author: Rusty Russell <rusty@rustcorp.com.au>
- */
-int main(int argc, char *argv[])
-{
- if (argc != 2)
- return 1;
-
- if (strcmp(argv[1], "depends") == 0) {
-#if !HAVE_TYPEOF
- printf("ccan/build_assert\n");
-#endif
- return 0;
- }
-
- return 1;
-}
diff --git a/op-flasher/pflash/ccan/check_type/check_type.h b/op-flasher/pflash/ccan/check_type/check_type.h
deleted file mode 100644
index ef4a9b3..0000000
--- a/op-flasher/pflash/ccan/check_type/check_type.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* CC0 (Public domain) - see LICENSE file for details */
-#ifndef CCAN_CHECK_TYPE_H
-#define CCAN_CHECK_TYPE_H
-#include "config.h"
-
-/**
- * check_type - issue a warning or build failure if type is not correct.
- * @expr: the expression whose type we should check (not evaluated).
- * @type: the exact type we expect the expression to be.
- *
- * This macro is usually used within other macros to try to ensure that a macro
- * argument is of the expected type. No type promotion of the expression is
- * done: an unsigned int is not the same as an int!
- *
- * check_type() always evaluates to 0.
- *
- * If your compiler does not support typeof, then the best we can do is fail
- * to compile if the sizes of the types are unequal (a less complete check).
- *
- * Example:
- * // They should always pass a 64-bit value to _set_some_value!
- * #define set_some_value(expr) \
- * _set_some_value((check_type((expr), uint64_t), (expr)))
- */
-
-/**
- * check_types_match - issue a warning or build failure if types are not same.
- * @expr1: the first expression (not evaluated).
- * @expr2: the second expression (not evaluated).
- *
- * This macro is usually used within other macros to try to ensure that
- * arguments are of identical types. No type promotion of the expressions is
- * done: an unsigned int is not the same as an int!
- *
- * check_types_match() always evaluates to 0.
- *
- * If your compiler does not support typeof, then the best we can do is fail
- * to compile if the sizes of the types are unequal (a less complete check).
- *
- * Example:
- * // Do subtraction to get to enclosing type, but make sure that
- * // pointer is of correct type for that member.
- * #define container_of(mbr_ptr, encl_type, mbr) \
- * (check_types_match((mbr_ptr), &((encl_type *)0)->mbr), \
- * ((encl_type *) \
- * ((char *)(mbr_ptr) - offsetof(enclosing_type, mbr))))
- */
-#if HAVE_TYPEOF
-#define check_type(expr, type) \
- ((typeof(expr) *)0 != (type *)0)
-
-#define check_types_match(expr1, expr2) \
- ((typeof(expr1) *)0 != (typeof(expr2) *)0)
-#else
-#include <ccan/build_assert/build_assert.h>
-/* Without typeof, we can only test the sizes. */
-#define check_type(expr, type) \
- BUILD_ASSERT_OR_ZERO(sizeof(expr) == sizeof(type))
-
-#define check_types_match(expr1, expr2) \
- BUILD_ASSERT_OR_ZERO(sizeof(expr1) == sizeof(expr2))
-#endif /* HAVE_TYPEOF */
-
-#endif /* CCAN_CHECK_TYPE_H */
diff --git a/op-flasher/pflash/ccan/check_type/test/compile_fail-check_type.c b/op-flasher/pflash/ccan/check_type/test/compile_fail-check_type.c
deleted file mode 100644
index 00dad58..0000000
--- a/op-flasher/pflash/ccan/check_type/test/compile_fail-check_type.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <ccan/check_type/check_type.h>
-
-int main(int argc, char *argv[])
-{
-#ifdef FAIL
- check_type(argc, char);
-#endif
- return 0;
-}
diff --git a/op-flasher/pflash/ccan/check_type/test/compile_fail-check_type_unsigned.c b/op-flasher/pflash/ccan/check_type/test/compile_fail-check_type_unsigned.c
deleted file mode 100644
index 8c0227a..0000000
--- a/op-flasher/pflash/ccan/check_type/test/compile_fail-check_type_unsigned.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <ccan/check_type/check_type.h>
-
-int main(int argc, char *argv[])
-{
-#ifdef FAIL
-#if HAVE_TYPEOF
- check_type(argc, unsigned int);
-#else
- /* This doesn't work without typeof, so just fail */
-#error "Fail without typeof"
-#endif
-#endif
- return 0;
-}
diff --git a/op-flasher/pflash/ccan/check_type/test/compile_fail-check_types_match.c b/op-flasher/pflash/ccan/check_type/test/compile_fail-check_types_match.c
deleted file mode 100644
index 081304f..0000000
--- a/op-flasher/pflash/ccan/check_type/test/compile_fail-check_types_match.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <ccan/check_type/check_type.h>
-
-int main(int argc, char *argv[])
-{
- unsigned char x = argc;
-#ifdef FAIL
- check_types_match(argc, x);
-#endif
- return x;
-}
diff --git a/op-flasher/pflash/ccan/check_type/test/run.c b/op-flasher/pflash/ccan/check_type/test/run.c
deleted file mode 100644
index eb99632..0000000
--- a/op-flasher/pflash/ccan/check_type/test/run.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <ccan/check_type/check_type.h>
-#include <ccan/tap/tap.h>
-
-int main(int argc, char *argv[])
-{
- int x = 0, y = 0;
-
- plan_tests(9);
-
- ok1(check_type(argc, int) == 0);
- ok1(check_type(&argc, int *) == 0);
- ok1(check_types_match(argc, argc) == 0);
- ok1(check_types_match(argc, x) == 0);
- ok1(check_types_match(&argc, &x) == 0);
-
- ok1(check_type(x++, int) == 0);
- ok(x == 0, "check_type does not evaluate expression");
- ok1(check_types_match(x++, y++) == 0);
- ok(x == 0 && y == 0, "check_types_match does not evaluate expressions");
-
- return exit_status();
-}
diff --git a/op-flasher/pflash/ccan/container_of/LICENSE b/op-flasher/pflash/ccan/container_of/LICENSE
deleted file mode 100644
index feb9b11..0000000
--- a/op-flasher/pflash/ccan/container_of/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Statement of Purpose
-
-The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
-
-Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
-
-For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
-
-1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
-
- the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
- moral rights retained by the original author(s) and/or performer(s);
- publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
- rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
- rights protecting the extraction, dissemination, use and reuse of data in a Work;
- database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
- other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
-
-2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
-
-3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
-
-4. Limitations and Disclaimers.
-
- No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
- Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
- Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
- Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
diff --git a/op-flasher/pflash/ccan/container_of/_info b/op-flasher/pflash/ccan/container_of/_info
deleted file mode 100644
index 77b3bd1..0000000
--- a/op-flasher/pflash/ccan/container_of/_info
+++ /dev/null
@@ -1,63 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include "config.h"
-
-/**
- * container_of - routine for upcasting
- *
- * It is often convenient to create code where the caller registers a pointer
- * to a generic structure and a callback. The callback might know that the
- * pointer points to within a larger structure, and container_of gives a
- * convenient and fairly type-safe way of returning to the enclosing structure.
- *
- * This idiom is an alternative to providing a void * pointer for every
- * callback.
- *
- * Example:
- * #include <stdio.h>
- * #include <ccan/container_of/container_of.h>
- *
- * struct timer {
- * void *members;
- * };
- *
- * struct info {
- * int my_stuff;
- * struct timer timer;
- * };
- *
- * static void register_timer(struct timer *timer)
- * {
- * //...
- * }
- *
- * static void my_timer_callback(struct timer *timer)
- * {
- * struct info *info = container_of(timer, struct info, timer);
- * printf("my_stuff is %u\n", info->my_stuff);
- * }
- *
- * int main(void)
- * {
- * struct info info = { .my_stuff = 1 };
- *
- * register_timer(&info.timer);
- * // ...
- * return 0;
- * }
- *
- * License: CC0 (Public domain)
- * Author: Rusty Russell <rusty@rustcorp.com.au>
- */
-int main(int argc, char *argv[])
-{
- if (argc != 2)
- return 1;
-
- if (strcmp(argv[1], "depends") == 0) {
- printf("ccan/check_type\n");
- return 0;
- }
-
- return 1;
-}
diff --git a/op-flasher/pflash/ccan/container_of/container_of.h b/op-flasher/pflash/ccan/container_of/container_of.h
deleted file mode 100644
index bc53dfb..0000000
--- a/op-flasher/pflash/ccan/container_of/container_of.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* CC0 (Public domain) - see LICENSE file for details */
-#ifndef CCAN_CONTAINER_OF_H
-#define CCAN_CONTAINER_OF_H
-#include <stddef.h>
-
-#include "config.h"
-#include <ccan/check_type/check_type.h>
-
-/**
- * container_of - get pointer to enclosing structure
- * @member_ptr: pointer to the structure member
- * @containing_type: the type this member is within
- * @member: the name of this member within the structure.
- *
- * Given a pointer to a member of a structure, this macro does pointer
- * subtraction to return the pointer to the enclosing type.
- *
- * Example:
- * struct foo {
- * int fielda, fieldb;
- * // ...
- * };
- * struct info {
- * int some_other_field;
- * struct foo my_foo;
- * };
- *
- * static struct info *foo_to_info(struct foo *foo)
- * {
- * return container_of(foo, struct info, my_foo);
- * }
- */
-#define container_of(member_ptr, containing_type, member) \
- ((containing_type *) \
- ((char *)(member_ptr) \
- - container_off(containing_type, member)) \
- + check_types_match(*(member_ptr), ((containing_type *)0)->member))
-
-/**
- * container_off - get offset to enclosing structure
- * @containing_type: the type this member is within
- * @member: the name of this member within the structure.
- *
- * Given a pointer to a member of a structure, this macro does
- * typechecking and figures out the offset to the enclosing type.
- *
- * Example:
- * struct foo {
- * int fielda, fieldb;
- * // ...
- * };
- * struct info {
- * int some_other_field;
- * struct foo my_foo;
- * };
- *
- * static struct info *foo_to_info(struct foo *foo)
- * {
- * size_t off = container_off(struct info, my_foo);
- * return (void *)((char *)foo - off);
- * }
- */
-#define container_off(containing_type, member) \
- offsetof(containing_type, member)
-
-/**
- * container_of_var - get pointer to enclosing structure using a variable
- * @member_ptr: pointer to the structure member
- * @container_var: a pointer of same type as this member's container
- * @member: the name of this member within the structure.
- *
- * Given a pointer to a member of a structure, this macro does pointer
- * subtraction to return the pointer to the enclosing type.
- *
- * Example:
- * static struct info *foo_to_i(struct foo *foo)
- * {
- * struct info *i = container_of_var(foo, i, my_foo);
- * return i;
- * }
- */
-#if HAVE_TYPEOF
-#define container_of_var(member_ptr, container_var, member) \
- container_of(member_ptr, typeof(*container_var), member)
-#else
-#define container_of_var(member_ptr, container_var, member) \
- ((void *)((char *)(member_ptr) - \
- container_off_var(container_var, member)))
-#endif
-
-/**
- * container_off_var - get offset of a field in enclosing structure
- * @container_var: a pointer to a container structure
- * @member: the name of a member within the structure.
- *
- * Given (any) pointer to a structure and a its member name, this
- * macro does pointer subtraction to return offset of member in a
- * structure memory layout.
- *
- */
-#if HAVE_TYPEOF
-#define container_off_var(var, member) \
- container_off(typeof(*var), member)
-#else
-#define container_off_var(var, member) \
- ((char *)&(var)->member - (char *)(var))
-#endif
-
-#endif /* CCAN_CONTAINER_OF_H */
diff --git a/op-flasher/pflash/ccan/container_of/test/compile_fail-bad-type.c b/op-flasher/pflash/ccan/container_of/test/compile_fail-bad-type.c
deleted file mode 100644
index 9ee8e9f..0000000
--- a/op-flasher/pflash/ccan/container_of/test/compile_fail-bad-type.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <ccan/container_of/container_of.h>
-#include <stdlib.h>
-
-struct foo {
- int a;
- char b;
-};
-
-int main(int argc, char *argv[])
-{
- struct foo foo = { .a = 1, .b = 2 };
- int *intp = &foo.a;
- char *p;
-
-#ifdef FAIL
- /* p is a char *, but this gives a struct foo * */
- p = container_of(intp, struct foo, a);
-#else
- p = (char *)intp;
-#endif
- return p == NULL;
-}
diff --git a/op-flasher/pflash/ccan/container_of/test/compile_fail-types.c b/op-flasher/pflash/ccan/container_of/test/compile_fail-types.c
deleted file mode 100644
index acd57c7..0000000
--- a/op-flasher/pflash/ccan/container_of/test/compile_fail-types.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <ccan/container_of/container_of.h>
-#include <stdlib.h>
-
-struct foo {
- int a;
- char b;
-};
-
-int main(int argc, char *argv[])
-{
- struct foo foo = { .a = 1, .b = 2 }, *foop;
- int *intp = &foo.a;
-
-#ifdef FAIL
- /* b is a char, but intp is an int * */
- foop = container_of(intp, struct foo, b);
-#else
- foop = NULL;
-#endif
- (void) foop; /* Suppress unused-but-set-variable warning. */
- return intp == NULL;
-}
diff --git a/op-flasher/pflash/ccan/container_of/test/compile_fail-var-types.c b/op-flasher/pflash/ccan/container_of/test/compile_fail-var-types.c
deleted file mode 100644
index 60f25bd..0000000
--- a/op-flasher/pflash/ccan/container_of/test/compile_fail-var-types.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <ccan/container_of/container_of.h>
-#include <stdlib.h>
-
-struct foo {
- int a;
- char b;
-};
-
-int main(int argc, char *argv[])
-{
- struct foo foo = { .a = 1, .b = 2 }, *foop;
- int *intp = &foo.a;
-
-#ifdef FAIL
- /* b is a char, but intp is an int * */
- foop = container_of_var(intp, foop, b);
-#if !HAVE_TYPEOF
-#error "Unfortunately we don't fail if we don't have typeof."
-#endif
-#else
- foop = NULL;
-#endif
- (void) foop; /* Suppress unused-but-set-variable warning. */
- return intp == NULL;
-}
diff --git a/op-flasher/pflash/ccan/container_of/test/run.c b/op-flasher/pflash/ccan/container_of/test/run.c
deleted file mode 100644
index bc87789..0000000
--- a/op-flasher/pflash/ccan/container_of/test/run.c
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <ccan/container_of/container_of.h>
-#include <ccan/tap/tap.h>
-
-struct foo {
- int a;
- char b;
-};
-
-int main(int argc, char *argv[])
-{
- struct foo foo = { .a = 1, .b = 2 };
- int *intp = &foo.a;
- char *charp = &foo.b;
-
- plan_tests(6);
- ok1(container_of(intp, struct foo, a) == &foo);
- ok1(container_of(charp, struct foo, b) == &foo);
- ok1(container_of_var(intp, &foo, a) == &foo);
- ok1(container_of_var(charp, &foo, b) == &foo);
-
- ok1(container_off(struct foo, a) == 0);
- ok1(container_off(struct foo, b) == offsetof(struct foo, b));
- return exit_status();
-}
diff --git a/op-flasher/pflash/ccan/endian/LICENSE b/op-flasher/pflash/ccan/endian/LICENSE
deleted file mode 100644
index feb9b11..0000000
--- a/op-flasher/pflash/ccan/endian/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Statement of Purpose
-
-The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
-
-Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
-
-For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
-
-1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
-
- the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
- moral rights retained by the original author(s) and/or performer(s);
- publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
- rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
- rights protecting the extraction, dissemination, use and reuse of data in a Work;
- database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
- other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
-
-2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
-
-3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
-
-4. Limitations and Disclaimers.
-
- No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
- Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
- Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
- Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
diff --git a/op-flasher/pflash/ccan/endian/_info b/op-flasher/pflash/ccan/endian/_info
deleted file mode 100644
index 753afa7..0000000
--- a/op-flasher/pflash/ccan/endian/_info
+++ /dev/null
@@ -1,53 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include "config.h"
-
-/**
- * endian - endian conversion macros for simple types
- *
- * Portable protocols (such as on-disk formats, or network protocols)
- * are often defined to be a particular endian: little-endian (least
- * significant bytes first) or big-endian (most significant bytes
- * first).
- *
- * Similarly, some CPUs lay out values in memory in little-endian
- * order (most commonly, Intel's 8086 and derivatives), or big-endian
- * order (almost everyone else).
- *
- * This module provides conversion routines, inspired by the linux kernel.
- *
- * Example:
- * #include <stdio.h>
- * #include <err.h>
- * #include <ccan/endian/endian.h>
- *
- * //
- * int main(int argc, char *argv[])
- * {
- * uint32_t value;
- *
- * if (argc != 2)
- * errx(1, "Usage: %s <value>", argv[0]);
- *
- * value = atoi(argv[1]);
- * printf("native: %08x\n", value);
- * printf("little-endian: %08x\n", cpu_to_le32(value));
- * printf("big-endian: %08x\n", cpu_to_be32(value));
- * printf("byte-reversed: %08x\n", bswap_32(value));
- * exit(0);
- * }
- *
- * License: License: CC0 (Public domain)
- * Author: Rusty Russell <rusty@rustcorp.com.au>
- */
-int main(int argc, char *argv[])
-{
- if (argc != 2)
- return 1;
-
- if (strcmp(argv[1], "depends") == 0)
- /* Nothing */
- return 0;
-
- return 1;
-}
diff --git a/op-flasher/pflash/ccan/endian/endian.h b/op-flasher/pflash/ccan/endian/endian.h
deleted file mode 100644
index 39c5308..0000000
--- a/op-flasher/pflash/ccan/endian/endian.h
+++ /dev/null
@@ -1,314 +0,0 @@
-/* CC0 (Public domain) - see LICENSE file for details */
-#ifndef CCAN_ENDIAN_H
-#define CCAN_ENDIAN_H
-#include <stdint.h>
-#include "config.h"
-
-/**
- * BSWAP_16 - reverse bytes in a constant uint16_t value.
- * @val: constant value whose bytes to swap.
- *
- * Designed to be usable in constant-requiring initializers.
- *
- * Example:
- * struct mystruct {
- * char buf[BSWAP_16(0x1234)];
- * };
- */
-#define BSWAP_16(val) \
- ((((uint16_t)val & 0x00ff) << 8) \
- | (((uint16_t)val & 0xff00) >> 8))
-
-/**
- * BSWAP_32 - reverse bytes in a constant uint32_t value.
- * @val: constant value whose bytes to swap.
- *
- * Designed to be usable in constant-requiring initializers.
- *
- * Example:
- * struct mystruct {
- * char buf[BSWAP_32(0xff000000)];
- * };
- */
-#define BSWAP_32(val) \
- ((((uint32_t)val & 0x000000ff) << 24) \
- | (((uint32_t)val & 0x0000ff00) << 8) \
- | (((uint32_t)val & 0x00ff0000) >> 8) \
- | (((uint32_t)val & 0xff000000) >> 24))
-
-/**
- * BSWAP_64 - reverse bytes in a constant uint64_t value.
- * @val: constantvalue whose bytes to swap.
- *
- * Designed to be usable in constant-requiring initializers.
- *
- * Example:
- * struct mystruct {
- * char buf[BSWAP_64(0xff00000000000000ULL)];
- * };
- */
-#define BSWAP_64(val) \
- ((((uint64_t)val & 0x00000000000000ffULL) << 56) \
- | (((uint64_t)val & 0x000000000000ff00ULL) << 40) \
- | (((uint64_t)val & 0x0000000000ff0000ULL) << 24) \
- | (((uint64_t)val & 0x00000000ff000000ULL) << 8) \
- | (((uint64_t)val & 0x000000ff00000000ULL) >> 8) \
- | (((uint64_t)val & 0x0000ff0000000000ULL) >> 24) \
- | (((uint64_t)val & 0x00ff000000000000ULL) >> 40) \
- | (((uint64_t)val & 0xff00000000000000ULL) >> 56))
-
-#if HAVE_BYTESWAP_H
-#include <byteswap.h>
-#else
-/**
- * bswap_16 - reverse bytes in a uint16_t value.
- * @val: value whose bytes to swap.
- *
- * Example:
- * // Output contains "1024 is 4 as two bytes reversed"
- * printf("1024 is %u as two bytes reversed\n", bswap_16(1024));
- */
-static inline uint16_t bswap_16(uint16_t val)
-{
- return BSWAP_16(val);
-}
-
-/**
- * bswap_32 - reverse bytes in a uint32_t value.
- * @val: value whose bytes to swap.
- *
- * Example:
- * // Output contains "1024 is 262144 as four bytes reversed"
- * printf("1024 is %u as four bytes reversed\n", bswap_32(1024));
- */
-static inline uint32_t bswap_32(uint32_t val)
-{
- return BSWAP_32(val);
-}
-#endif /* !HAVE_BYTESWAP_H */
-
-#if !HAVE_BSWAP_64
-/**
- * bswap_64 - reverse bytes in a uint64_t value.
- * @val: value whose bytes to swap.
- *
- * Example:
- * // Output contains "1024 is 1125899906842624 as eight bytes reversed"
- * printf("1024 is %llu as eight bytes reversed\n",
- * (unsigned long long)bswap_64(1024));
- */
-static inline uint64_t bswap_64(uint64_t val)
-{
- return BSWAP_64(val);
-}
-#endif
-
-/* Sanity check the defines. We don't handle weird endianness. */
-#if !HAVE_LITTLE_ENDIAN && !HAVE_BIG_ENDIAN
-#error "Unknown endian"
-#elif HAVE_LITTLE_ENDIAN && HAVE_BIG_ENDIAN
-#error "Can't compile for both big and little endian."
-#endif
-
-#if HAVE_LITTLE_ENDIAN
-/**
- * CPU_TO_LE64 - convert a constant uint64_t value to little-endian
- * @native: constant to convert
- */
-#define CPU_TO_LE64(native) (native)
-
-/**
- * CPU_TO_LE32 - convert a constant uint32_t value to little-endian
- * @native: constant to convert
- */
-#define CPU_TO_LE32(native) (native)
-
-/**
- * CPU_TO_LE16 - convert a constant uint16_t value to little-endian
- * @native: constant to convert
- */
-#define CPU_TO_LE16(native) (native)
-
-/**
- * LE64_TO_CPU - convert a little-endian uint64_t constant
- * @le_val: little-endian constant to convert
- */
-#define LE64_TO_CPU(le_val) (le_val)
-
-/**
- * LE32_TO_CPU - convert a little-endian uint32_t constant
- * @le_val: little-endian constant to convert
- */
-#define LE32_TO_CPU(le_val) (le_val)
-
-/**
- * LE16_TO_CPU - convert a little-endian uint16_t constant
- * @le_val: little-endian constant to convert
- */
-#define LE16_TO_CPU(le_val) (le_val)
-
-#else /* ... HAVE_BIG_ENDIAN */
-#define CPU_TO_LE64(native) BSWAP_64(native)
-#define CPU_TO_LE32(native) BSWAP_32(native)
-#define CPU_TO_LE16(native) BSWAP_16(native)
-#define LE64_TO_CPU(le_val) BSWAP_64(le_val)
-#define LE32_TO_CPU(le_val) BSWAP_32(le_val)
-#define LE16_TO_CPU(le_val) BSWAP_16(le_val)
-#endif /* HAVE_BIG_ENDIAN */
-
-#if HAVE_BIG_ENDIAN
-/**
- * CPU_TO_BE64 - convert a constant uint64_t value to big-endian
- * @native: constant to convert
- */
-#define CPU_TO_BE64(native) (native)
-
-/**
- * CPU_TO_BE32 - convert a constant uint32_t value to big-endian
- * @native: constant to convert
- */
-#define CPU_TO_BE32(native) (native)
-
-/**
- * CPU_TO_BE16 - convert a constant uint16_t value to big-endian
- * @native: constant to convert
- */
-#define CPU_TO_BE16(native) (native)
-
-/**
- * BE64_TO_CPU - convert a big-endian uint64_t constant
- * @le_val: big-endian constant to convert
- */
-#define BE64_TO_CPU(le_val) (le_val)
-
-/**
- * BE32_TO_CPU - convert a big-endian uint32_t constant
- * @le_val: big-endian constant to convert
- */
-#define BE32_TO_CPU(le_val) (le_val)
-
-/**
- * BE16_TO_CPU - convert a big-endian uint16_t constant
- * @le_val: big-endian constant to convert
- */
-#define BE16_TO_CPU(le_val) (le_val)
-
-#else /* ... HAVE_LITTLE_ENDIAN */
-#define CPU_TO_BE64(native) BSWAP_64(native)
-#define CPU_TO_BE32(native) BSWAP_32(native)
-#define CPU_TO_BE16(native) BSWAP_16(native)
-#define BE64_TO_CPU(le_val) BSWAP_64(le_val)
-#define BE32_TO_CPU(le_val) BSWAP_32(le_val)
-#define BE16_TO_CPU(le_val) BSWAP_16(le_val)
-#endif /* HAVE_LITTE_ENDIAN */
-
-
-/**
- * cpu_to_le64 - convert a uint64_t value to little-endian
- * @native: value to convert
- */
-static inline uint64_t cpu_to_le64(uint64_t native)
-{
- return CPU_TO_LE64(native);
-}
-
-/**
- * cpu_to_le32 - convert a uint32_t value to little-endian
- * @native: value to convert
- */
-static inline uint32_t cpu_to_le32(uint32_t native)
-{
- return CPU_TO_LE32(native);
-}
-
-/**
- * cpu_to_le16 - convert a uint16_t value to little-endian
- * @native: value to convert
- */
-static inline uint16_t cpu_to_le16(uint16_t native)
-{
- return CPU_TO_LE16(native);
-}
-
-/**
- * le64_to_cpu - convert a little-endian uint64_t value
- * @le_val: little-endian value to convert
- */
-static inline uint64_t le64_to_cpu(uint64_t le_val)
-{
- return LE64_TO_CPU(le_val);
-}
-
-/**
- * le32_to_cpu - convert a little-endian uint32_t value
- * @le_val: little-endian value to convert
- */
-static inline uint32_t le32_to_cpu(uint32_t le_val)
-{
- return LE32_TO_CPU(le_val);
-}
-
-/**
- * le16_to_cpu - convert a little-endian uint16_t value
- * @le_val: little-endian value to convert
- */
-static inline uint16_t le16_to_cpu(uint16_t le_val)
-{
- return LE16_TO_CPU(le_val);
-}
-
-/**
- * cpu_to_be64 - convert a uint64_t value to big endian.
- * @native: value to convert
- */
-static inline uint64_t cpu_to_be64(uint64_t native)
-{
- return CPU_TO_BE64(native);
-}
-
-/**
- * cpu_to_be32 - convert a uint32_t value to big endian.
- * @native: value to convert
- */
-static inline uint32_t cpu_to_be32(uint32_t native)
-{
- return CPU_TO_BE32(native);
-}
-
-/**
- * cpu_to_be16 - convert a uint16_t value to big endian.
- * @native: value to convert
- */
-static inline uint16_t cpu_to_be16(uint16_t native)
-{
- return CPU_TO_BE16(native);
-}
-
-/**
- * be64_to_cpu - convert a big-endian uint64_t value
- * @be_val: big-endian value to convert
- */
-static inline uint64_t be64_to_cpu(uint64_t be_val)
-{
- return BE64_TO_CPU(be_val);
-}
-
-/**
- * be32_to_cpu - convert a big-endian uint32_t value
- * @be_val: big-endian value to convert
- */
-static inline uint32_t be32_to_cpu(uint32_t be_val)
-{
- return BE32_TO_CPU(be_val);
-}
-
-/**
- * be16_to_cpu - convert a big-endian uint16_t value
- * @be_val: big-endian value to convert
- */
-static inline uint16_t be16_to_cpu(uint16_t be_val)
-{
- return BE16_TO_CPU(be_val);
-}
-
-#endif /* CCAN_ENDIAN_H */
diff --git a/op-flasher/pflash/ccan/endian/test/compile_ok-constant.c b/op-flasher/pflash/ccan/endian/test/compile_ok-constant.c
deleted file mode 100644
index 93b5a03..0000000
--- a/op-flasher/pflash/ccan/endian/test/compile_ok-constant.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <ccan/endian/endian.h>
-
-struct foo {
- char one[BSWAP_16(0xFF00)];
- char two[BSWAP_32(0xFF000000)];
- char three[BSWAP_64(0xFF00000000000000ULL)];
-};
-
-int main(void)
-{
- return 0;
-}
diff --git a/op-flasher/pflash/ccan/endian/test/run.c b/op-flasher/pflash/ccan/endian/test/run.c
deleted file mode 100644
index 8604068..0000000
--- a/op-flasher/pflash/ccan/endian/test/run.c
+++ /dev/null
@@ -1,106 +0,0 @@
-#include <ccan/endian/endian.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <ccan/tap/tap.h>
-
-int main(int argc, char *argv[])
-{
- union {
- uint64_t u64;
- unsigned char u64_bytes[8];
- } u64;
- union {
- uint32_t u32;
- unsigned char u32_bytes[4];
- } u32;
- union {
- uint16_t u16;
- unsigned char u16_bytes[2];
- } u16;
-
- plan_tests(48);
-
- /* Straight swap tests. */
- u64.u64_bytes[0] = 0x00;
- u64.u64_bytes[1] = 0x11;
- u64.u64_bytes[2] = 0x22;
- u64.u64_bytes[3] = 0x33;
- u64.u64_bytes[4] = 0x44;
- u64.u64_bytes[5] = 0x55;
- u64.u64_bytes[6] = 0x66;
- u64.u64_bytes[7] = 0x77;
- u64.u64 = bswap_64(u64.u64);
- ok1(u64.u64_bytes[7] == 0x00);
- ok1(u64.u64_bytes[6] == 0x11);
- ok1(u64.u64_bytes[5] == 0x22);
- ok1(u64.u64_bytes[4] == 0x33);
- ok1(u64.u64_bytes[3] == 0x44);
- ok1(u64.u64_bytes[2] == 0x55);
- ok1(u64.u64_bytes[1] == 0x66);
- ok1(u64.u64_bytes[0] == 0x77);
-
- u32.u32_bytes[0] = 0x00;
- u32.u32_bytes[1] = 0x11;
- u32.u32_bytes[2] = 0x22;
- u32.u32_bytes[3] = 0x33;
- u32.u32 = bswap_32(u32.u32);
- ok1(u32.u32_bytes[3] == 0x00);
- ok1(u32.u32_bytes[2] == 0x11);
- ok1(u32.u32_bytes[1] == 0x22);
- ok1(u32.u32_bytes[0] == 0x33);
-
- u16.u16_bytes[0] = 0x00;
- u16.u16_bytes[1] = 0x11;
- u16.u16 = bswap_16(u16.u16);
- ok1(u16.u16_bytes[1] == 0x00);
- ok1(u16.u16_bytes[0] == 0x11);
-
- /* Endian tests. */
- u64.u64 = cpu_to_le64(0x0011223344556677ULL);
- ok1(u64.u64_bytes[0] == 0x77);
- ok1(u64.u64_bytes[1] == 0x66);
- ok1(u64.u64_bytes[2] == 0x55);
- ok1(u64.u64_bytes[3] == 0x44);
- ok1(u64.u64_bytes[4] == 0x33);
- ok1(u64.u64_bytes[5] == 0x22);
- ok1(u64.u64_bytes[6] == 0x11);
- ok1(u64.u64_bytes[7] == 0x00);
- ok1(le64_to_cpu(u64.u64) == 0x0011223344556677ULL);
-
- u64.u64 = cpu_to_be64(0x0011223344556677ULL);
- ok1(u64.u64_bytes[7] == 0x77);
- ok1(u64.u64_bytes[6] == 0x66);
- ok1(u64.u64_bytes[5] == 0x55);
- ok1(u64.u64_bytes[4] == 0x44);
- ok1(u64.u64_bytes[3] == 0x33);
- ok1(u64.u64_bytes[2] == 0x22);
- ok1(u64.u64_bytes[1] == 0x11);
- ok1(u64.u64_bytes[0] == 0x00);
- ok1(be64_to_cpu(u64.u64) == 0x0011223344556677ULL);
-
- u32.u32 = cpu_to_le32(0x00112233);
- ok1(u32.u32_bytes[0] == 0x33);
- ok1(u32.u32_bytes[1] == 0x22);
- ok1(u32.u32_bytes[2] == 0x11);
- ok1(u32.u32_bytes[3] == 0x00);
- ok1(le32_to_cpu(u32.u32) == 0x00112233);
-
- u32.u32 = cpu_to_be32(0x00112233);
- ok1(u32.u32_bytes[3] == 0x33);
- ok1(u32.u32_bytes[2] == 0x22);
- ok1(u32.u32_bytes[1] == 0x11);
- ok1(u32.u32_bytes[0] == 0x00);
- ok1(be32_to_cpu(u32.u32) == 0x00112233);
-
- u16.u16 = cpu_to_le16(0x0011);
- ok1(u16.u16_bytes[0] == 0x11);
- ok1(u16.u16_bytes[1] == 0x00);
- ok1(le16_to_cpu(u16.u16) == 0x0011);
-
- u16.u16 = cpu_to_be16(0x0011);
- ok1(u16.u16_bytes[1] == 0x11);
- ok1(u16.u16_bytes[0] == 0x00);
- ok1(be16_to_cpu(u16.u16) == 0x0011);
-
- exit(exit_status());
-}
OpenPOWER on IntegriCloud