[PATCH 0/2] thunk, linux-user: Add support for SIOCETHTOOL ioctl

Shu-Chun Weng via posted 2 patches 3 years, 4 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201218214142.3673709-1-scw@google.com
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, Laurent Vivier <laurent@vivier.eu>, Riku Voipio <riku.voipio@iki.fi>
include/exec/user/thunk.h     |  24 +
linux-user/ethtool.c          | 848 ++++++++++++++++++++++++++++++++++
linux-user/ethtool.h          |  20 +
linux-user/ethtool_entries.h  | 107 +++++
linux-user/ioctls.h           |   2 +
linux-user/meson.build        |   1 +
linux-user/qemu.h             |   1 +
linux-user/syscall.c          |  36 +-
linux-user/syscall_defs.h     |  12 +
linux-user/syscall_types.h    | 280 +++++++++++
tests/tcg/multiarch/ethtool.c | 423 +++++++++++++++++
thunk.c                       | 152 +++++-
12 files changed, 1893 insertions(+), 13 deletions(-)
create mode 100644 linux-user/ethtool.c
create mode 100644 linux-user/ethtool.h
create mode 100644 linux-user/ethtool_entries.h
create mode 100644 tests/tcg/multiarch/ethtool.c
[PATCH 0/2] thunk, linux-user: Add support for SIOCETHTOOL ioctl
Posted by Shu-Chun Weng via 3 years, 4 months ago
Hi Riku and Laurent,

These two patches together implements the SIOCETHTOOL ioctl operations. Many of
the kernel structures in this operations make use of flexible arrays (array with
no size / zero size at the end of the structure), so I extended thunk to handle
these fields natively.

This patch set was previously sent out under "[PATCH 0/6] fcntl, sockopt, and
ioctl options" and the following revisions, but did not get any feedback.

Shu-Chun Weng (2):
  thunk: supports flexible arrays
  linux-user: Add support for SIOCETHTOOL ioctl

 include/exec/user/thunk.h     |  24 +
 linux-user/ethtool.c          | 848 ++++++++++++++++++++++++++++++++++
 linux-user/ethtool.h          |  20 +
 linux-user/ethtool_entries.h  | 107 +++++
 linux-user/ioctls.h           |   2 +
 linux-user/meson.build        |   1 +
 linux-user/qemu.h             |   1 +
 linux-user/syscall.c          |  36 +-
 linux-user/syscall_defs.h     |  12 +
 linux-user/syscall_types.h    | 280 +++++++++++
 tests/tcg/multiarch/ethtool.c | 423 +++++++++++++++++
 thunk.c                       | 152 +++++-
 12 files changed, 1893 insertions(+), 13 deletions(-)
 create mode 100644 linux-user/ethtool.c
 create mode 100644 linux-user/ethtool.h
 create mode 100644 linux-user/ethtool_entries.h
 create mode 100644 tests/tcg/multiarch/ethtool.c

-- 
2.29.2.684.gfbc64c5ab5-goog


Re: [PATCH 0/2] thunk, linux-user: Add support for SIOCETHTOOL ioctl
Posted by no-reply@patchew.org 3 years, 4 months ago
Patchew URL: https://patchew.org/QEMU/20201218214142.3673709-1-scw@google.com/



Hi,

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

Type: series
Message-id: 20201218214142.3673709-1-scw@google.com
Subject: [PATCH 0/2] thunk, linux-user: Add support for SIOCETHTOOL ioctl

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20201218214142.3673709-1-scw@google.com -> patchew/20201218214142.3673709-1-scw@google.com
Switched to a new branch 'test'
747a460 linux-user: Add support for SIOCETHTOOL ioctl
c3a717f thunk: supports flexible arrays

=== OUTPUT BEGIN ===
1/2 Checking commit c3a717f27be8 (thunk: supports flexible arrays)
ERROR: Macros with complex values should be enclosed in parenthesis
#52: FILE: include/exec/user/thunk.h:54:
+#define MK_FLEXIBLE_ARRAY(type, len_field_idx) \
+    TYPE_FLEXIBLE_ARRAY, (len_field_idx), type

total: 1 errors, 0 warnings, 266 lines checked

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

2/2 Checking commit 747a4602f093 (linux-user: Add support for SIOCETHTOOL ioctl)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#25: 
new file mode 100644

WARNING: Block comments use a leading /* on a separate line
#765: FILE: linux-user/ethtool.c:736:
+    int type_size = thunk_type_size(type_ptr, /*is_host=*/ 0);

WARNING: Block comments use a leading /* on a separate line
#771: FILE: linux-user/ethtool.c:742:
+    type_size = thunk_type_size_with_src(src, type_ptr, /*is_host=*/ 0);

ERROR: Macros with complex values should be enclosed in parenthesis
#1139: FILE: linux-user/syscall_defs.h:2869:
+#define STRUCT(name, ...) STRUCT_ ## name,

ERROR: Macros with complex values should be enclosed in parenthesis
#1140: FILE: linux-user/syscall_defs.h:2870:
+#define STRUCT_SPECIAL(name) STRUCT_ ## name,

total: 2 errors, 3 warnings, 1787 lines checked

Patch 2/2 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


The full log is available at
http://patchew.org/logs/20201218214142.3673709-1-scw@google.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com