qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC] Add NRF51 RNG peripheral


From: no-reply
Subject: Re: [Qemu-devel] [RFC] Add NRF51 RNG peripheral
Date: Tue, 19 Jun 2018 06:02:46 -0700 (PDT)

Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: address@hidden
Subject: [Qemu-devel] [RFC] Add NRF51 RNG peripheral

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 t [tag update]            patchew/address@hidden -> patchew/address@hidden
 t [tag update]            patchew/address@hidden -> patchew/address@hidden
 * [new tag]               patchew/address@hidden -> patchew/address@hidden
Switched to a new branch 'test'
2a46903e1e Add NRF51 RNG peripheral

=== OUTPUT BEGIN ===
Checking PATCH 1/1: Add NRF51 RNG peripheral...
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#24: 
new file mode 100644

ERROR: open brace '{' following function declarations go on the next line
#97: FILE: hw/misc/nrf51_rng.c:69:
+static int64_t calc_next_timeout(Nrf51RNGState *s) {

ERROR: space required before the open parenthesis '('
#99: FILE: hw/misc/nrf51_rng.c:71:
+    if(s->state.filter_enabled) {

ERROR: open brace '{' following function declarations go on the next line
#109: FILE: hw/misc/nrf51_rng.c:81:
+static void rng_update_timer(Nrf51RNGState *s) {

ERROR: space required before the open parenthesis '('
#127: FILE: hw/misc/nrf51_rng.c:99:
+        if(value == NRF51_TRIGGER_TASK)  {

ERROR: space required before the open parenthesis '('
#133: FILE: hw/misc/nrf51_rng.c:105:
+        if(value == NRF51_TRIGGER_TASK)  {

ERROR: space required before the open parenthesis '('
#139: FILE: hw/misc/nrf51_rng.c:111:
+        if(value == NRF51_EVENT_CLEAR)  {

ERROR: space required before the open parenthesis '('
#153: FILE: hw/misc/nrf51_rng.c:125:
+        if(value & BIT_MASK(NRF51_RNG_REG_INTEN_VALRDY)) {

ERROR: space required before the open parenthesis '('
#158: FILE: hw/misc/nrf51_rng.c:130:
+        if(value & BIT_MASK(NRF51_RNG_REG_INTEN_VALRDY)) {

ERROR: open brace '{' following function declarations go on the next line
#180: FILE: hw/misc/nrf51_rng.c:152:
+static void nrf51_rng_timer_expire(void *opaque) {

ERROR: space required before the open parenthesis '('
#188: FILE: hw/misc/nrf51_rng.c:160:
+    if(s->state.interrupt_enabled) {

ERROR: space required before the open parenthesis '('
#192: FILE: hw/misc/nrf51_rng.c:164:
+    if(s->state.shortcut_stop_on_valrdy) {

ERROR: space required before the open parenthesis '('
#203: FILE: hw/misc/nrf51_rng.c:175:
+    if(level) {

ERROR: suspect code indent for conditional statements (4, 7)
#213: FILE: hw/misc/nrf51_rng.c:185:
+    if(level) {
+       s->state.active = 0;

ERROR: space required before the open parenthesis '('
#213: FILE: hw/misc/nrf51_rng.c:185:
+    if(level) {

ERROR: spaces prohibited around that ':' (ctx:VxW)
#326: FILE: include/hw/misc/nrf51_rng.h:51:
+        uint32_t active: 1;
                        ^

ERROR: spaces prohibited around that ':' (ctx:VxW)
#327: FILE: include/hw/misc/nrf51_rng.h:52:
+        uint32_t event_valrdy: 1;
                              ^

ERROR: spaces prohibited around that ':' (ctx:VxW)
#328: FILE: include/hw/misc/nrf51_rng.h:53:
+        uint32_t shortcut_stop_on_valrdy: 1;
                                         ^

ERROR: spaces prohibited around that ':' (ctx:VxW)
#329: FILE: include/hw/misc/nrf51_rng.h:54:
+        uint32_t interrupt_enabled: 1;
                                   ^

ERROR: spaces prohibited around that ':' (ctx:VxW)
#330: FILE: include/hw/misc/nrf51_rng.h:55:
+        uint32_t filter_enabled: 1;
                                ^

total: 19 errors, 1 warnings, 306 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]