All of lore.kernel.org
 help / color / mirror / Atom feed
From: no-reply@patchew.org
To: zhanghan64@huawei.com
Cc: hang.zhanghailiang@huawei.com, hunongda@huawei.com,
	qemu-trivial@nongnu.org, jasowang@redhat.com,
	qemu-devel@nongnu.org, alex.chen@huawei.com
Subject: Re: [PATCH 0/9] Fix some style problems in net
Date: Tue, 22 Dec 2020 09:00:46 -0800 (PST)	[thread overview]
Message-ID: <160865644490.22007.1893392783918998373@600e7e483b3a> (raw)
In-Reply-To: <20201222082340.67405-1-zhanghan64@huawei.com>

Patchew URL: https://patchew.org/QEMU/20201222082340.67405-1-zhanghan64@huawei.com/



Hi,

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

Type: series
Message-id: 20201222082340.67405-1-zhanghan64@huawei.com
Subject: [PATCH 0/9] Fix some style problems in net

=== 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
 - [tag update]      patchew/20201221134931.1194806-1-david.edmondson@oracle.com -> patchew/20201221134931.1194806-1-david.edmondson@oracle.com
 * [new tag]         patchew/20201222082340.67405-1-zhanghan64@huawei.com -> patchew/20201222082340.67405-1-zhanghan64@huawei.com
Switched to a new branch 'test'
a1e8031 net: Fix the indent problems
3a9a235 net: Remove initialization of static ints
e1c36e1 net: Remove assignment in if condition
55fc567 net: Transfer tabs to spcaes
c96ec8e net: Fix lines over 90 characters
a9b2502 net: Transfer "foo* " to "foo *"
9dd5b80 net: Transfer // comments to /**/
cb5a663 net: Add braces for statements/fix braces' position
3256d58 net: Add spaces around operator/delete redundant spaces

=== OUTPUT BEGIN ===
1/9 Checking commit 3256d589d47c (net: Add spaces around operator/delete redundant spaces)
ERROR: braces {} are necessary for all arms of this statement
#24: FILE: net/checksum.c:44:
+    while (sum >> 16)
[...]

ERROR: suspect code indent for conditional statements (4, 7)
#128: FILE: net/tap-solaris.c:78:
+    if (*dev) {
        ptr = dev;

ERROR: trailing statements should be on next line
#131: FILE: net/tap-solaris.c:80:
+       while (*ptr && !qemu_isdigit((int)*ptr)) ptr++;

ERROR: braces {} are necessary for all arms of this statement
#131: FILE: net/tap-solaris.c:80:
+       while (*ptr && !qemu_isdigit((int)*ptr)) ptr++;
[...]

ERROR: suspect code indent for conditional statements (4, 7)
#137: FILE: net/tap-solaris.c:85:
+    if (ip_fd)
        close(ip_fd);

ERROR: braces {} are necessary for all arms of this statement
#137: FILE: net/tap-solaris.c:85:
+    if (ip_fd)
[...]

ERROR: do not use assignment in if condition
#146: FILE: net/tap-solaris.c:105:
+    if ((ppa = ioctl(tap_fd, I_STR, &strioc_ppa)) < 0)

ERROR: braces {} are necessary for all arms of this statement
#146: FILE: net/tap-solaris.c:105:
+    if ((ppa = ioctl(tap_fd, I_STR, &strioc_ppa)) < 0)
[...]

ERROR: braces {} are necessary for all arms of this statement
#171: FILE: net/tap-solaris.c:127:
+    if (ioctl(if_fd, SIOCSLIFNAME, &ifr) < 0)
[...]

ERROR: braces {} are necessary for all arms of this statement
#174: FILE: net/tap-solaris.c:129:
+    if (ioctl(if_fd, SIOCGLIFFLAGS, &ifr) < 0)
[...]

ERROR: braces {} are necessary for all arms of this statement
#178: FILE: net/tap-solaris.c:132:
+    if (ioctl(if_fd, I_PUSH, "arp") < 0)
[...]

ERROR: braces {} are necessary for all arms of this statement
#183: FILE: net/tap-solaris.c:136:
+    if (ioctl(ip_fd, I_POP, NULL) < 0)
[...]

ERROR: braces {} are necessary for all arms of this statement
#186: FILE: net/tap-solaris.c:138:
+    if (ioctl(ip_fd, I_PUSH, "arp") < 0)
[...]

ERROR: do not use assignment in if condition
#204: FILE: net/tap-solaris.c:154:
+    if ((ip_muxid = ioctl(ip_fd, I_LINK, if_fd)) < 0) {

ERROR: do not use assignment in if condition
#210: FILE: net/tap-solaris.c:159:
+    if ((arp_muxid = ioctl(ip_fd, link_type, arp_fd)) < 0)

ERROR: braces {} are necessary for all arms of this statement
#210: FILE: net/tap-solaris.c:159:
+    if ((arp_muxid = ioctl(ip_fd, link_type, arp_fd)) < 0)
[...]

ERROR: suspect code indent for conditional statements (4, 6)
#222: FILE: net/tap-solaris.c:169:
+    if (ioctl(ip_fd, SIOCSLIFMUXID, &ifr) < 0)
     {

ERROR: line over 90 characters
#297: FILE: net/tap-win32.c:174:
+static tun_buffer_t* get_buffer_from_output_queue_immediate(tap_win32_overlapped_t* const overlapped)

ERROR: "foo* bar" should be "foo *bar"
#297: FILE: net/tap-win32.c:174:
+static tun_buffer_t* get_buffer_from_output_queue_immediate(tap_win32_overlapped_t* const overlapped)

WARNING: line over 80 characters
#306: FILE: net/tap-win32.c:183:
+    if (overlapped->output_queue_front == NULL && overlapped->output_queue_back == NULL) {

ERROR: braces {} are necessary for all arms of this statement
#416: FILE: net/tap-win32.c:458:
+    if (!overlapped->tap_semaphore)
[...]

WARNING: line over 80 characters
#425: FILE: net/tap-win32.c:470:
+    result = GetOverlappedResult(overlapped->handle, &overlapped->write_overlapped,

WARNING: line over 80 characters
#434: FILE: net/tap-win32.c:503:
+        FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,

ERROR: line over 90 characters
#443: FILE: net/tap-win32.c:534:
+                result = GetOverlappedResult(overlapped->handle, &overlapped->read_overlapped,

ERROR: line over 90 characters
#450: FILE: net/tap-win32.c:540:
+                    FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,

WARNING: line over 80 characters
#463: FILE: net/tap-win32.c:550:
+                FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,

total: 22 errors, 4 warnings, 457 lines checked

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

2/9 Checking commit cb5a6632624a (net: Add braces for statements/fix braces' position)
ERROR: suspect code indent for conditional statements (7, 11)
#251: FILE: net/tap-solaris.c:80:
+       while (*ptr && !qemu_isdigit((int)*ptr)) {
+           ptr++;

ERROR: suspect code indent for conditional statements (4, 7)
#259: FILE: net/tap-solaris.c:87:
+    if (ip_fd) {
        close(ip_fd);

ERROR: do not use assignment in if condition
#270: FILE: net/tap-solaris.c:108:
+    if ((ppa = ioctl(tap_fd, I_STR, &strioc_ppa)) < 0) {

ERROR: do not use assignment in if condition
#328: FILE: net/tap-solaris.c:170:
+    if ((arp_muxid = ioctl(ip_fd, link_type, arp_fd)) < 0) {

ERROR: suspect code indent for conditional statements (4, 6)
#340: FILE: net/tap-solaris.c:181:
+    if (ioctl(ip_fd, SIOCSLIFMUXID, &ifr) < 0) {
       ioctl(ip_fd, I_PUNLINK , arp_muxid);

total: 5 errors, 0 warnings, 381 lines checked

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

3/9 Checking commit 9dd5b80ec06d (net: Transfer // comments to /**/)
4/9 Checking commit a9b2502fcb92 (net: Transfer "foo* " to "foo *")
WARNING: line over 80 characters
#56: FILE: net/tap-win32.c:126:
+static tun_buffer_t *get_buffer_from_free_list(tap_win32_overlapped_t *const overlapped)

ERROR: line over 90 characters
#68: FILE: net/tap-win32.c:139:
+static void put_buffer_on_free_list(tap_win32_overlapped_t *const overlapped, tun_buffer_t *const buffer)

ERROR: line over 90 characters
#77: FILE: net/tap-win32.c:148:
+static tun_buffer_t *get_buffer_from_output_queue(tap_win32_overlapped_t *const overlapped, const int block)

ERROR: line over 90 characters
#89: FILE: net/tap-win32.c:180:
+static tun_buffer_t *get_buffer_from_output_queue_immediate(tap_win32_overlapped_t *const overlapped)

ERROR: line over 90 characters
#95: FILE: net/tap-win32.c:185:
+static void put_buffer_on_output_queue(tap_win32_overlapped_t *const overlapped, tun_buffer_t *const buffer)

ERROR: line over 90 characters
#104: FILE: net/tap-win32.c:412:
+static void tap_win32_overlapped_init(tap_win32_overlapped_t *const overlapped, const HANDLE handle)

total: 5 errors, 1 warnings, 115 lines checked

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

5/9 Checking commit c96ec8e7f974 (net: Fix lines over 90 characters)
WARNING: Block comments use a leading /* on a separate line
#34: FILE: net/socket.c:358:
+    /* fd passed: multicast: "learn" dgram_dst address from bound address

ERROR: line over 90 characters
#74: FILE: net/tap-win32.c:151:
+static tun_buffer_t *get_buffer_from_output_queue(tap_win32_overlapped_t *const overlapped,

WARNING: line over 80 characters
#139: FILE: net/tap-win32.c:560:
+                    fprintf(stderr, "Tap-Win32: Error GetOverlappedResult %d - %s\n",

total: 1 errors, 2 warnings, 123 lines checked

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

6/9 Checking commit 55fc567376cd (net: Transfer tabs to spcaes)
7/9 Checking commit e1c36e115c99 (net: Remove assignment in if condition)
8/9 Checking commit 3a9a235f5e6f (net: Remove initialization of static ints)
9/9 Checking commit a1e8031d967e (net: Fix the indent problems)
=== OUTPUT END ===

Test command exited with code: 1


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

  parent reply	other threads:[~2020-12-22 17:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-22  8:23 [PATCH 0/9] Fix some style problems in net Zhang Han
2020-12-22  8:23 ` [PATCH 1/9] net: Add spaces around operator/delete redundant spaces Zhang Han
2020-12-22  8:23 ` [PATCH 2/9] net: Add braces for statements/fix braces' position Zhang Han
2020-12-22  8:23 ` [PATCH 3/9] net: Transfer // comments to /**/ Zhang Han
2020-12-22  8:23 ` [PATCH 4/9] net: Transfer "foo* " to "foo *" Zhang Han
2020-12-22  8:23 ` [PATCH 5/9] net: Fix lines over 90 characters Zhang Han
2020-12-22  8:23 ` [PATCH 6/9] net: Transfer tabs to spcaes Zhang Han
2021-01-14 11:34   ` Philippe Mathieu-Daudé
2020-12-22  8:23 ` [PATCH 7/9] net: Remove assignment in if condition Zhang Han
2021-01-14 11:35   ` Philippe Mathieu-Daudé
2020-12-22  8:23 ` [PATCH 8/9] net: Remove initialization of static ints Zhang Han
2020-12-22  8:23 ` [PATCH 9/9] net: Fix the indent problems Zhang Han
2020-12-22 17:00 ` no-reply [this message]
2021-01-14  2:34   ` [PATCH 0/9] Fix some style problems in net zhanghan (J)
2021-02-01  6:18     ` zhanghan (J)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=160865644490.22007.1893392783918998373@600e7e483b3a \
    --to=no-reply@patchew.org \
    --cc=alex.chen@huawei.com \
    --cc=hang.zhanghailiang@huawei.com \
    --cc=hunongda@huawei.com \
    --cc=jasowang@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=zhanghan64@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.