- Dec 13, 2020
-
-
Peter Maydell authored
Relax the wording about line lengths a little bit; this goes with the checkpatch changes to warn at 100 characters rather than 80. (Compare the Linux kernel commit bdc48fa11e46f8; our coding style is not theirs, but the rationale is good and applies to us too.) Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Message-Id: <20201106112940.31300-1-peter.maydell@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Sep 10, 2020
-
-
Alex Bennée authored
Mention a few of the more common naming conventions we follow in the code base including common variable names and function prefix and suffix examples. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20200909112742.25730-2-alex.bennee@linaro.org>
-
- Sep 05, 2019
-
-
Daniel P. Berrangé authored
Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Daniel P. Berrangé authored
Document the use of g_autofree and g_autoptr in glib for automatic freeing of memory. Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Daniel P. Berrangé authored
The split of information between the two docs is rather arbitary and unclear. It is simpler for contributors if all the information is in one file. Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Daniel P. Berrangé authored
Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com>
-
- May 02, 2019
-
-
Wei Yang authored
All the example code are indented with four spaces except this one. Fix this by adding four spaces here. Signed-off-by:
Wei Yang <richardw.yang@linux.intel.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Stefano Garzarella <sgarzare@redhat.com> Message-Id: <20190304071631.27567-3-richardw.yang@linux.intel.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Wei Yang authored
We didn't specify the indent rule for multiline code here, which may mislead users. And in current code, the code use various styles. Add this rule in CODING_STYLE to make sure this is clear to every one. Signed-off-by:
Wei Yang <richardw.yang@linux.intel.com> Suggested-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Stefano Garzarella <sgarzare@redhat.com> Message-Id: <20190304071631.27567-2-richardw.yang@linux.intel.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Jun 15, 2018
-
-
Peter Maydell authored
The codebase has a bit of a mix of different multiline comment styles. State a preference for the Linux kernel style: /* * Star on the left for each line. * Leading slash-star and trailing star-slash * each go on a line of their own. */ Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Alex Williamson <alex.williamson@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20180611141716.3813-1-peter.maydell@linaro.org
-
- Aug 01, 2017
-
-
Vladimir Sementsov-Ogievskiy authored
Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 20170731160135.12101-2-vsementsov@virtuozzo.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Feb 28, 2017
-
-
Peter Maydell authored
Our defacto coding style strongly prefers /* */ style comments over the single-line // style, and checkpatch enforces this, but we don't actually document this. Mention it in CODING_STYLE. Suggested-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Oct 08, 2016
-
-
Jonathan Neuschäfer authored
Signed-off-by:
Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Aug 10, 2016
-
-
Paolo Bonzini authored
Line lengths above 80 characters do exist. They are rare, but they happen from time to time. An ignored rule is worse than an exception to the rule, so do the latter. Some on the list expressed their preference for a soft limit that is slightly lower than 80 characters, to account for extra characters in unified diffs (including three-way diffs) and for email quoting. However, there was no consensus on this so keep the 80-character soft limit and add a hard limit at 90. Acked-by:
Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 09, 2015
-
-
Paolo Bonzini authored
Mixed declarations do come in handy at the top of #ifdef blocks. Reluctantly allow this particular usage and suggest an alternative. Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Aug 15, 2014
-
-
Gonglei (Arei) authored
Yoda conditions lack readability, and QEMU has a strict compiler configuration for checking a common mistake like "if (dev = NULL)". Make it a written rule. Signed-off-by:
Gonglei <arei.gonglei@huawei.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Mar 27, 2014
-
-
Eduardo Habkost authored
We had an unwritten rule about declarations having to be at beginning of blocks. Make it a written rule. Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Reviewed-by:
Stefan Weil <sw@weilnetz.de> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Apr 07, 2012
-
-
Stefan Weil authored
The official spelling is QEMU. Signed-off-by:
Stefan Weil <sw@weilnetz.de> Reviewed-by:
Andreas Färber <afaerber@suse.de> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Feb 10, 2012
-
-
Peter Maydell authored
Clarify that enum type names and function type names should follow the CamelCase style used for structured type names. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- Jul 29, 2011
-
-
Avi Kivity authored
It's already allowed by the example; there are about 1800 instances in the tree; and disallowing it would lead to if (a) { ... } else { if (b) { ... } else { if (c) { ... } else { if (d) { ... } else { ... } } } } instead of if (a) { ... } else if (b) { ... } else if (c) { ... } else if (d) { ... } else { ... } which is more readable. Acked-by:
Blue Swirl <blauwirbel@gmail.com> Signed-off-by:
Avi Kivity <avi@redhat.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- Jan 20, 2011
-
-
Blue Swirl authored
Change checkpatch.pl for QEMU use: - Root directory detection - Forbid tabs - Indent at 4 spaces - Allow typedefs - Enforce brace use even for single statement blocks - Don't suggest nonexistent cleanup tools Mention the script in CODING_STYLE. Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Sep 10, 2010
-
-
Blue Swirl authored
Add C type rules, adapted from libvirt HACKING. Also include a description of special QEMU scalar types. Move typedef rule from CODING_STYLE rule 3 to HACKING rule 6 where it belongs. Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Mar 19, 2010
-
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@redhat.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- Oct 01, 2009
-
-
Anthony Liguori authored
In the very least, a change like this requires discussion on the list. The naming convention is goofy and it causes a massive merge problem. Something like this _must_ be presented on the list first so people can provide input and cope with it. This reverts commit 99a0949b. Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
malc authored
Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by:
malc <av1474@comtv.ru>
-
- Apr 07, 2009
-
-
Edgar E. Iglesias authored
Signed-off-by:
Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7014 c046a42c-6fe2-441c-8c8c-71466251a162
-
- Apr 05, 2009
-
-
Anthony Liguori authored
With the help of some Limoncino I noted several aspects of the QEMU coding style, particularly where it differs from the Linux coding style as many contributors work on both projects. Signed-off-by:
Avi Kivity <avi@redhat.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6976 c046a42c-6fe2-441c-8c8c-71466251a162
-