diff options
-rw-r--r-- | CONTRIBUTING | 43 | ||||
-rw-r--r-- | LICENSE | 27 |
2 files changed, 70 insertions, 0 deletions
diff --git a/CONTRIBUTING b/CONTRIBUTING new file mode 100644 index 0000000..b3a9095 --- /dev/null +++ b/CONTRIBUTING @@ -0,0 +1,43 @@ +Contributing to the Open Dataplane API (ODP) + +The Open Dataplane API follows the linux kernel coding style [1] and code +submission process [2], albeit patch submissions are to be submitted to the +linaro-networking mailing list [3] (not LKML, etc.). + +To certify you wrote the code, or otherwise have the right to pass it +on (presumably from a compatibly licensed project), we use the "Developer's +Certificate of Origin" (see [2]). Using this sign-off process, we are able to +keep track of compliance to our license (see LICENSE file). + +There are tools we use to maintain CodingStyle and other good programming +practice consistency, including type-checking without overuse of casts. + +(a) perform a one-time setup for the tools: + +checkpatch: + +git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git + +semantic parser 'sparse' [4]: + +git clone git://git.kernel.org/pub/scm/devel/sparse/sparse.git +cd sparse +make +export PATH=$PATH:$PWD + +(b) when building, use sparse to check for stricter type checking than the +compiler: + +make CC=cgcc + +[TODO: update for cross-building, endianness checks] + +(c) Prior to submission, to style-check the patch 'file.patch', run: + +${PATH_TO_LINUX}/scripts/checkpatch.pl --no-tree --strict file.patch + + +[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/CodingStyle +[2] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches +[3] https://groups.google.com/a/linaro.org/forum/#!forum/linaro-networking +[4] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/sparse.txt @@ -0,0 +1,27 @@ +Copyright (c) 2013, Linaro Limited +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +Neither the name of Linaro Limited nor the names of its contributors may be +used to endorse or promote products derived from this software without specific +prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |