[PATCH v2 1/7] audio: Add braces for statements/fix braces' position

2021-01-14 Thread Zhang Han
Fix problems about braces: -braces are necessary for all arms of if/for/while statements -else should follow close brace '}' Signed-off-by: Zhang Han --- audio/alsaaudio.c | 15 +-- audio/audio.c | 26 -- audio/audio_template.h | 12

[PATCH v2 5/7] audio: Don't use '%#' in format strings

2021-01-14 Thread Zhang Han
Use '0x' prefix instead of '%#' Signed-off-by: Zhang Han --- audio/dsoundaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/dsoundaudio.c b/audio/dsoundaudio.c index 1891a38bee..f7a3351306 100644 --- a/audio/dsoundaudio.c +++ b/audio/dsoundaudio.c @@ -215,7 +215,7

[PATCH v2 3/7] audio: foo* bar" should be "foo *bar".

2021-01-14 Thread Zhang Han
transfer "foo* " to "foo *" Signed-off-by: Zhang Han --- audio/coreaudio.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/audio/coreaudio.c b/audio/coreaudio.c index 6ca0d79c1f..b7c02e0e51 100644 --- a/audio/coreaudio.c +++ b/audio/co

[PATCH v2 6/7] audio: Suspect code indent for conditional statements

2021-01-14 Thread Zhang Han
Fix code indent. Signed-off-by: Zhang Han --- audio/paaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index b052084698..7ea9f637c2 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -437,7 +437,7 @@ static pa_stream

[PATCH v2 7/7] audio: space prohibited between function name and parenthesis'('

2021-01-14 Thread Zhang Han
Delete spaces between function name and open parenthesis'(' Signed-off-by: Zhang Han --- audio/audio_template.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/audio/audio_template.h b/audio/audio_template.h index 6d42fa7011..05e793f61f 100644 --- a/audio

[PATCH v2 4/7] audio: Fix lines over 90 characters

2021-01-14 Thread Zhang Han
Fix the line width of code. Signed-off-by: Zhang Han --- audio/dsoundaudio.c | 37 +++-- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/audio/dsoundaudio.c b/audio/dsoundaudio.c index 38ae2471f6..1891a38bee 100644 --- a/audio/dsoundaudio.c +++ b

[PATCH v2 2/7] audio: Add spaces around operator/delete redundant spaces

2021-01-14 Thread Zhang Han
Fix problems about spaces: -operator needs spaces around it, add them. -somespaces are redundant, remove them. Signed-off-by: Zhang Han --- audio/audio_template.h | 2 +- audio/coreaudio.c | 2 +- audio/dsoundaudio.c| 2 +- audio/jackaudio.c | 2 +- 4 files changed, 4 insertions

[PATCH v2 0/7]Fix some style problems in audio

2021-01-14 Thread Zhang Han
Some style problems in audio directory are found by checkpatch.pl. Fix these style problems. v2: - fix style problem: redundant spaces between function name and open parenthesis'(' - fix subject of patch[5/7] for email display Zhang Han (7): audio: Add braces for statements/fix braces

[PATCH 4/6] audio: Fix lines over 90 characters

2021-01-14 Thread Zhang Han
Fix the line width of code. Signed-off-by: Zhang Han --- audio/dsoundaudio.c | 37 +++-- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/audio/dsoundaudio.c b/audio/dsoundaudio.c index 38ae2471f6..1891a38bee 100644 --- a/audio/dsoundaudio.c +++ b

[PATCH 6/6] audio: Suspect code indent for conditional statements

2021-01-14 Thread Zhang Han
Fix code indent. Signed-off-by: Zhang Han --- audio/paaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index b052084698..7ea9f637c2 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -437,7 +437,7 @@ static pa_stream

[PATCH 3/6] audio: foo* bar" should be "foo *bar".

2021-01-14 Thread Zhang Han
Transfer "foo* " to "foo *" Signed-off-by: Zhang Han --- audio/coreaudio.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/audio/coreaudio.c b/audio/coreaudio.c index 6ca0d79c1f..b7c02e0e51 100644 --- a/audio/coreaudio.c +++ b/audio/co

[PATCH 5/6] audio: Don't use '#' flag of printf format ('%#') in

2021-01-14 Thread Zhang Han
Use '0x' prefix instead of '%#' Signed-off-by: Zhang Han --- audio/dsoundaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/dsoundaudio.c b/audio/dsoundaudio.c index 1891a38bee..f7a3351306 100644 --- a/audio/dsoundaudio.c +++ b/audio/dsoundaudio.c @@ -215,7 +215,7

[PATCH 1/6] audio: Add braces for statements/fix braces' position

2021-01-14 Thread Zhang Han
Fix problems about braces: -braces are necessary for all arms of if/for/while statements -else should follow close brace '}' Signed-off-by: Zhang Han --- audio/alsaaudio.c | 15 +-- audio/audio.c | 26 -- audio/audio_template.h | 12

[PATCH 2/6] audio: Add spaces around operator/delete redundant spaces

2021-01-14 Thread Zhang Han
Fix problems about spaces: -operator needs spaces around it, add them. -somespaces are redundant, remove them. Signed-off-by: Zhang Han --- audio/audio_template.h | 2 +- audio/coreaudio.c | 2 +- audio/dsoundaudio.c| 2 +- audio/jackaudio.c | 2 +- 4 files changed, 4 insertions

[PATCH 0/6] Fix some style problems in audio

2021-01-14 Thread Zhang Han
Some style problems in audio directory are found by checkpatch.pl. Fix these style problems. Zhang Han (6): audio: Add braces for statements/fix braces' position audio: Add spaces around operator/delete redundant spaces audio: foo* bar" should be "foo *bar". audio: Fi

[PATCH 4/4] qobject: braces {} are necessary for all arms of this statement

2020-12-27 Thread Zhang Han
Add braces {} for arms of if/for statement Signed-off-by: Zhang Han --- qobject/qdict.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qobject/qdict.c b/qobject/qdict.c index 05ec950e05..0a49b787ab 100644 --- a/qobject/qdict.c +++ b/qobject/qdict.c @@ -42,8 +42,9

[PATCH 3/4] qobject: spaces required around that operators

2020-12-27 Thread Zhang Han
Add spaces around operators. Signed-off-by: Zhang Han --- qobject/qdict.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qobject/qdict.c b/qobject/qdict.c index 2c07b3c87f..05ec950e05 100644 --- a/qobject/qdict.c +++ b/qobject/qdict.c @@ -42,8 +42,8 @@ static unsigned

[PATCH 1/4] qobject: open brace '{' following struct go on the same line

2020-12-27 Thread Zhang Han
Put open brace '{' on the same line of struct. Signed-off-by: Zhang Han --- qobject/json-parser.c | 3 +-- qobject/qjson.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/qobject/json-parser.c b/qobject/json-parser.c index c0f521b56b..18b87a42f3 100644

[PATCH 0/4] Fix some style problems in qobject

2020-12-27 Thread Zhang Han
Some style problems in qobject directory are found by checkpatch.pl. Fix these style problems. Zhang Han (4): qobject: open brace '{' following struct go on the same line qobject: code indent should never use tabs qobject: spaces required around that operators qobject: braces

[PATCH 2/4] qobject: code indent should never use tabs

2020-12-27 Thread Zhang Han
Transfer tabs to spaces. Signed-off-by: Zhang Han --- qobject/qdict.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qobject/qdict.c b/qobject/qdict.c index 1079bd3f6f..2c07b3c87f 100644 --- a/qobject/qdict.c +++ b/qobject/qdict.c @@ -38,8 +38,8 @@ QDict *qdict_new(void

[PATCH 7/9] net: Remove assignment in if condition

2020-12-22 Thread Zhang Han
Put the assignment before the if condition Signed-off-by: Zhang Han --- net/tap-bsd.c | 3 ++- net/tap-solaris.c | 9 ++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/net/tap-bsd.c b/net/tap-bsd.c index dc8f9c8658..d1dca793f9 100644 --- a/net/tap-bsd.c +++ b/net/tap

[PATCH 2/9] net: Add braces for statements/fix braces' position

2020-12-22 Thread Zhang Han
Fix problems about braces: -braces are necessary for all arms of if/for/while statements -open brace { should follow if/for/while statements on the same line -else should follow close brace '}' Signed-off-by: Zhang Han --- net/checksum.c| 3 ++- net/net.c | 24

[PATCH 3/9] net: Transfer // comments to /**/

2020-12-22 Thread Zhang Han
Do not use C99 // comments, thransfer // to /**/ Signed-off-by: Zhang Han --- net/checksum.c| 6 ++--- net/tap-solaris.c | 2 +- net/tap-win32.c | 60 +++ 3 files changed, 38 insertions(+), 30 deletions(-) diff --git a/net/checksum.c b/net

[PATCH 8/9] net: Remove initialization of static ints

2020-12-22 Thread Zhang Han
Do not initialise statics to 0 or NULL Signed-off-by: Zhang Han --- net/tap-solaris.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/tap-solaris.c b/net/tap-solaris.c index d5af4efd60..0b4f709abc 100644 --- a/net/tap-solaris.c +++ b/net/tap-solaris.c @@ -63,10

[PATCH 4/9] net: Transfer "foo* " to "foo *"

2020-12-22 Thread Zhang Han
Fix style problems about "foo*" -"foo* bar" should be "foo *bar". -"foo* const bar" should be "foo * const bar". -"(foo*)" should be "(foo *)" Signed-off-by: Zhang Han --- net/slirp.c | 2 +- net/tap-win32.c | 34 +++

[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 &qu

[PATCH 6/9] net: Transfer tabs to spcaes

2020-12-22 Thread Zhang Han
Code indent use spaces instead of tabs. Signed-off-by: Zhang Han --- net/tap-linux.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/tap-linux.h b/net/tap-linux.h index 2f36d100fc..db72960c19 100644 --- a/net/tap-linux.h +++ b/net/tap-linux.h @@ -44,10 +44,10

[PATCH 5/9] net: Fix lines over 90 characters

2020-12-22 Thread Zhang Han
Fix the line width of code. Signed-off-by: Zhang Han --- net/socket.c| 11 +++ net/tap-win32.c | 39 ++- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/net/socket.c b/net/socket.c index 61671e41e3..0093ed2794 100644 --- a/net

[PATCH 9/9] net: Fix the indent problems

2020-12-22 Thread Zhang Han
Fix Suspect code indent for statements Signed-off-by: Zhang Han --- net/tap-solaris.c | 18 +- net/tap-win32.c | 28 ++-- net/vde.c | 2 +- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/net/tap-solaris.c b/net/tap-solaris.c

[PATCH 1/9] net: Add spaces around operator/delete redundant spaces

2020-12-22 Thread Zhang Han
Fix problems about spaces: -operator needs spaces around it, add them. -somespaces are redundant, remove them. Signed-off-by: Zhang Han --- net/checksum.c| 4 +-- net/eth.c | 2 +- net/net.c | 2 +- net/queue.c | 2 +- net/socket.c | 12 +++ net/tap