[Qemu-devel] [PATCH v3 0/2] Nios II generic board config and semihosting support

Julian Brown posted 2 patches 5 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/cover.1526671191.git.julian@codesourcery.com
Test checkpatch failed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test s390x passed
hw/nios2/Makefile.objs     |   2 +-
hw/nios2/boot.c            |   5 +-
hw/nios2/generic_nommu.c   | 128 ++++++++++++++
qemu-options.hx            |   8 +-
target/nios2/Makefile.objs |   2 +-
target/nios2/cpu.h         |   4 +-
target/nios2/helper.c      |  11 ++
target/nios2/nios2-semi.c  | 429 +++++++++++++++++++++++++++++++++++++++++++++
8 files changed, 581 insertions(+), 8 deletions(-)
create mode 100644 hw/nios2/generic_nommu.c
create mode 100644 target/nios2/nios2-semi.c
[Qemu-devel] [PATCH v3 0/2] Nios II generic board config and semihosting support
Posted by Julian Brown 5 years, 11 months ago
This is a third attempt at sending the patch series:

http://lists.gnu.org/archive/html/qemu-devel/2018-05/msg04259.html

Turns out the git format-patch "--inline" option didn't do what I thought
it did. Apologies for the noise!

Thanks,

Julian

Julian Brown (2):
  Add generic Nios II board.
  Add Nios II semihosting support.

 hw/nios2/Makefile.objs     |   2 +-
 hw/nios2/boot.c            |   5 +-
 hw/nios2/generic_nommu.c   | 128 ++++++++++++++
 qemu-options.hx            |   8 +-
 target/nios2/Makefile.objs |   2 +-
 target/nios2/cpu.h         |   4 +-
 target/nios2/helper.c      |  11 ++
 target/nios2/nios2-semi.c  | 429 +++++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 581 insertions(+), 8 deletions(-)
 create mode 100644 hw/nios2/generic_nommu.c
 create mode 100644 target/nios2/nios2-semi.c

-- 
1.9.1


Re: [Qemu-devel] [PATCH v3 0/2] Nios II generic board config and semihosting support
Posted by Marek Vasut 5 years, 11 months ago
On 05/18/2018 09:23 PM, Julian Brown wrote:
> This is a third attempt at sending the patch series:
> 
> http://lists.gnu.org/archive/html/qemu-devel/2018-05/msg04259.html
> 
> Turns out the git format-patch "--inline" option didn't do what I thought
> it did. Apologies for the noise!

Success !

-- 
Best regards,
Marek Vasut

Re: [Qemu-devel] [PATCH v3 0/2] Nios II generic board config and semihosting support
Posted by no-reply@patchew.org 5 years, 11 months ago
Hi,

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

Type: series
Message-id: cover.1526671191.git.julian@codesourcery.com
Subject: [Qemu-devel] [PATCH v3 0/2] Nios II generic board config and semihosting support

=== 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
Switched to a new branch 'test'
659c5a97f6 Add Nios II semihosting support.
c917ea3908 Add generic Nios II board.

=== OUTPUT BEGIN ===
Checking PATCH 1/2: Add generic Nios II board....
ERROR: code indent should never use tabs
#38: FILE: hw/nios2/boot.c:143:
+^Iint kernel_space = 0;$

ERROR: code indent should never use tabs
#46: FILE: hw/nios2/boot.c:158:
+^I    kernel_space = 1;$

ERROR: code indent should never use tabs
#52: FILE: hw/nios2/boot.c:163:
+^I    + (entry & 0x07ffffff);$

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#57: 
new file mode 100644

ERROR: do not use C99 // comments
#175: FILE: hw/nios2/generic_nommu.c:114:
+    cpu->reset_addr = 0xd0000000; //0xd4000000;

ERROR: do not use C99 // comments
#177: FILE: hw/nios2/generic_nommu.c:116:
+    cpu->fast_tlb_miss_addr = 0x7fff400; //0xc0000100;

total: 5 errors, 1 warnings, 150 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.

Checking PATCH 2/2: Add Nios II semihosting support....
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#105: 
new file mode 100644

ERROR: braces {} are necessary for all arms of this statement
#194: FILE: target/nios2/nios2-semi.c:85:
+    if (flags & GDB_O_WRONLY)
[...]
+    else if (flags & GDB_O_RDWR)
[...]
+    else
[...]

ERROR: braces {} are necessary for all arms of this statement
#196: FILE: target/nios2/nios2-semi.c:87:
+    else if (flags & GDB_O_RDWR)
[...]
+    else
[...]

ERROR: trailing statements should be on next line
#201: FILE: target/nios2/nios2-semi.c:92:
+    if (flags & GDB_O_APPEND) hf |= O_APPEND;

ERROR: braces {} are necessary for all arms of this statement
#201: FILE: target/nios2/nios2-semi.c:92:
+    if (flags & GDB_O_APPEND) hf |= O_APPEND;
[...]

ERROR: trailing statements should be on next line
#202: FILE: target/nios2/nios2-semi.c:93:
+    if (flags & GDB_O_CREAT) hf |= O_CREAT;

ERROR: braces {} are necessary for all arms of this statement
#202: FILE: target/nios2/nios2-semi.c:93:
+    if (flags & GDB_O_CREAT) hf |= O_CREAT;
[...]

ERROR: trailing statements should be on next line
#203: FILE: target/nios2/nios2-semi.c:94:
+    if (flags & GDB_O_TRUNC) hf |= O_TRUNC;

ERROR: braces {} are necessary for all arms of this statement
#203: FILE: target/nios2/nios2-semi.c:94:
+    if (flags & GDB_O_TRUNC) hf |= O_TRUNC;
[...]

ERROR: trailing statements should be on next line
#204: FILE: target/nios2/nios2-semi.c:95:
+    if (flags & GDB_O_EXCL) hf |= O_EXCL;

ERROR: braces {} are necessary for all arms of this statement
#204: FILE: target/nios2/nios2-semi.c:95:
+    if (flags & GDB_O_EXCL) hf |= O_EXCL;
[...]

WARNING: line over 80 characters
#209: FILE: target/nios2/nios2-semi.c:100:
+static void translate_stat(CPUNios2State *env, target_ulong addr, struct stat *s)

ERROR: do not use assignment in if condition
#213: FILE: target/nios2/nios2-semi.c:104:
+    if (!(p = lock_user(VERIFY_WRITE, addr, sizeof(struct nios2_gdb_stat), 0)))

WARNING: line over 80 characters
#238: FILE: target/nios2/nios2-semi.c:129:
+static void nios2_semi_return_u32(CPUNios2State *env, uint32_t ret, uint32_t err)

WARNING: line over 80 characters
#252: FILE: target/nios2/nios2-semi.c:143:
+static void nios2_semi_return_u64(CPUNios2State *env, uint64_t ret, uint32_t err)

ERROR: do not use assignment in if condition
#493: FILE: target/nios2/nios2-semi.c:384:
+                if (!(p = lock_user(VERIFY_WRITE,

ERROR: line over 90 characters
#533: FILE: target/nios2/nios2-semi.c:424:
+        cpu_abort(CPU(nios2_env_get_cpu(env)), "Unsupported semihosting syscall %d\n", nr);

total: 13 errors, 4 warnings, 498 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 patchew-devel@redhat.com