Re: [PATCH 0/9] Fix some style problems in net

2021-01-31 Thread zhanghan (J)
ping?This patch set about code style problem in net receives no replies.

Did I miss any response?

The link follows:
http://patchwork.ozlabs.org/project/qemu-devel/cover/20201222082340.67405-1-zhangha...@huawei.com/



Re: [PATCH 0/9] Fix some style problems in net

2021-01-13 Thread zhanghan (J)
ping?

This patch set is submmitted a month ago, and have received no replies.
Did I miss any replies?

The link follows:
http://patchwork.ozlabs.org/project/qemu-devel/cover/20201222082340.67405-1-zhangha...@huawei.com/



Re: [PATCH 0/9] Fix some style problems in net

2020-12-22 Thread no-reply
Patchew URL: 
https://patchew.org/QEMU/20201222082340.67405-1-zhangha...@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-zhangha...@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.edmond...@oracle.com -> 
patchew/20201221134931.1194806-1-david.edmond...@oracle.com
 * [new tag] patchew/20201222082340.67405-1-zhangha...@huawei.com -> 
patchew/20201222082340.67405-1-zhangha...@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, _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, _ppa)) < 0)
[...]

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

ERROR: braces {} are necessary for all arms of this statement
#174: FILE: net/tap-solaris.c:129:
+if (ioctl(if_fd, SIOCGLIFFLAGS, ) < 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, ) < 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, 
>write_overlapped,

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

[PATCH 0/9] Fix some style problems in net

2020-12-22 Thread Zhang Han
Some style problems in net directory are found by checkpatch.pl. Fix these
style problems.

Zhang Han (9):
  net: Add spaces around operator/delete redundant spaces
  net: Add braces for statements/fix braces' position
  net: transfer // comments to /**/
  net: transfer "foo* bar" to "foo *"
  net: fix lines over 90 characters
  net: Transfer tabs to spcaes
  net: remove assignment in if condition
  net: Remove initialization of static ints
  net: Fix the indent problems

 net/checksum.c|  11 +-
 net/eth.c |   2 +-
 net/net.c |  26 +++--
 net/queue.c   |   5 +-
 net/slirp.c   |   8 +-
 net/socket.c  |  32 +++---
 net/tap-bsd.c |   6 +-
 net/tap-linux.c   |  20 ++--
 net/tap-linux.h   |  10 +-
 net/tap-solaris.c |  76 --
 net/tap-win32.c   | 258 +-
 net/vde.c |   4 +-
 net/vhost-user.c  |   2 +-
 13 files changed, 259 insertions(+), 201 deletions(-)

-- 
2.29.1.59.gf9b6481aed