[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] audio/jack: add JACK client audiodev
From: |
no-reply |
Subject: |
Re: [PATCH v2] audio/jack: add JACK client audiodev |
Date: |
Wed, 29 Apr 2020 02:53:40 -0700 (PDT) |
Patchew URL: https://patchew.org/QEMU/address@hidden.ktmba/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Message-id: address@hidden.ktmba
Subject: [PATCH v2] audio/jack: add JACK client audiodev
Type: series
=== 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/address@hidden -> patchew/address@hidden
- [tag update] patchew/address@hidden -> patchew/address@hidden
* [new tag] patchew/address@hidden -> patchew/address@hidden
Switched to a new branch 'test'
3831a9a audio/jack: add JACK client audiodev
=== OUTPUT BEGIN ===
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#52:
new file mode 100644
ERROR: open brace '{' following enum go on the same line
#97: FILE: audio/jackaudio.c:41:
+typedef enum QJackState
+{
ERROR: open brace '{' following struct go on the same line
#108: FILE: audio/jackaudio.c:52:
+typedef struct QJackBuffer
+{
ERROR: "foo ** bar" should be "foo **bar"
#113: FILE: audio/jackaudio.c:57:
+ float ** data;
ERROR: open brace '{' following struct go on the same line
#118: FILE: audio/jackaudio.c:62:
+typedef struct QJackClient
+{
ERROR: "foo * bar" should be "foo *bar"
#121: FILE: audio/jackaudio.c:65:
+ jack_client_t * client;
ERROR: "foo * bar" should be "foo *bar"
#124: FILE: audio/jackaudio.c:68:
+ struct QJack * j;
ERROR: "foo ** bar" should be "foo **bar"
#127: FILE: audio/jackaudio.c:71:
+ jack_port_t ** port;
ERROR: open brace '{' following struct go on the same line
#133: FILE: audio/jackaudio.c:77:
+typedef struct QJackOut
+{
ERROR: open brace '{' following struct go on the same line
#140: FILE: audio/jackaudio.c:84:
+typedef struct QJackIn
+{
ERROR: "foo * bar" should be "foo *bar"
#146: FILE: audio/jackaudio.c:90:
+static void qjack_buffer_create(QJackBuffer * buffer, int channels, int frames)
ERROR: space required before the open parenthesis '('
#154: FILE: audio/jackaudio.c:98:
+ for(int i = 0; i < channels; ++i)
ERROR: braces {} are necessary for all arms of this statement
#154: FILE: audio/jackaudio.c:98:
+ for(int i = 0; i < channels; ++i)
[...]
ERROR: "foo * bar" should be "foo *bar"
#158: FILE: audio/jackaudio.c:102:
+static void qjack_buffer_clear(QJackBuffer * buffer)
ERROR: "foo * bar" should be "foo *bar"
#165: FILE: audio/jackaudio.c:109:
+static void qjack_buffer_free(QJackBuffer * buffer)
ERROR: space required before the open parenthesis '('
#167: FILE: audio/jackaudio.c:111:
+ for(int i = 0; i < buffer->channels; ++i)
ERROR: braces {} are necessary for all arms of this statement
#167: FILE: audio/jackaudio.c:111:
+ for(int i = 0; i < buffer->channels; ++i)
[...]
ERROR: "foo * bar" should be "foo *bar"
#174: FILE: audio/jackaudio.c:118:
+inline static int qjack_buffer_used(QJackBuffer * buffer)
ERROR: storage class should be at the beginning of the declaration
#174: FILE: audio/jackaudio.c:118:
+inline static int qjack_buffer_used(QJackBuffer * buffer)
ERROR: inline keyword should sit between storage class and type
#174: FILE: audio/jackaudio.c:118:
+inline static int qjack_buffer_used(QJackBuffer * buffer)
ERROR: "foo * bar" should be "foo *bar"
#180: FILE: audio/jackaudio.c:124:
+static int qjack_buffer_write(QJackBuffer * buffer, float * data, int size)
ERROR: braces {} are necessary for all arms of this statement
#187: FILE: audio/jackaudio.c:131:
+ if (frames > avail)
[...]
ERROR: space required before the open parenthesis '('
#193: FILE: audio/jackaudio.c:137:
+ while(copy) {
ERROR: space required before the open parenthesis '('
#195: FILE: audio/jackaudio.c:139:
+ for(int c = 0; c < buffer->channels; ++c)
ERROR: braces {} are necessary for all arms of this statement
#195: FILE: audio/jackaudio.c:139:
+ for(int c = 0; c < buffer->channels; ++c)
[...]
ERROR: braces {} are necessary for all arms of this statement
#198: FILE: audio/jackaudio.c:142:
+ if (++wptr == buffer->frames)
[...]
ERROR: "foo * bar" should be "foo *bar"
#211: FILE: audio/jackaudio.c:155:
+static int qjack_buffer_write_l(QJackBuffer * buffer, float ** dest, int
frames)
ERROR: braces {} are necessary for all arms of this statement
#217: FILE: audio/jackaudio.c:161:
+ if (frames > avail)
[...]
ERROR: suspect code indent for conditional statements (4, 6)
#221: FILE: audio/jackaudio.c:165:
+ if (right > frames)
+ right = frames;
ERROR: braces {} are necessary for all arms of this statement
#221: FILE: audio/jackaudio.c:165:
+ if (right > frames)
[...]
ERROR: space required before the open parenthesis '('
#225: FILE: audio/jackaudio.c:169:
+ for(int c = 0; c < buffer->channels; ++c) {
ERROR: suspect code indent for conditional statements (4, 6)
#231: FILE: audio/jackaudio.c:175:
+ if (wptr >= buffer->frames)
+ wptr -= buffer->frames;
ERROR: braces {} are necessary for all arms of this statement
#231: FILE: audio/jackaudio.c:175:
+ if (wptr >= buffer->frames)
[...]
ERROR: "foo * bar" should be "foo *bar"
#240: FILE: audio/jackaudio.c:184:
+static int qjack_buffer_read(QJackBuffer * buffer, float * dest, int size)
ERROR: braces {} are necessary for all arms of this statement
#247: FILE: audio/jackaudio.c:191:
+ if (frames > avail)
[...]
ERROR: space required before the open parenthesis '('
#253: FILE: audio/jackaudio.c:197:
+ while(copy) {
ERROR: space required before the open parenthesis '('
#255: FILE: audio/jackaudio.c:199:
+ for(int c = 0; c < buffer->channels; ++c)
ERROR: braces {} are necessary for all arms of this statement
#255: FILE: audio/jackaudio.c:199:
+ for(int c = 0; c < buffer->channels; ++c)
[...]
ERROR: braces {} are necessary for all arms of this statement
#258: FILE: audio/jackaudio.c:202:
+ if (++rptr == buffer->frames)
[...]
ERROR: "foo * bar" should be "foo *bar"
#271: FILE: audio/jackaudio.c:215:
+static int qjack_buffer_read_l(QJackBuffer * buffer, float ** dest, int frames)
ERROR: braces {} are necessary for all arms of this statement
#277: FILE: audio/jackaudio.c:221:
+ if (copy > used)
[...]
ERROR: braces {} are necessary for all arms of this statement
#281: FILE: audio/jackaudio.c:225:
+ if (right > copy)
[...]
ERROR: space required before the open parenthesis '('
#285: FILE: audio/jackaudio.c:229:
+ for(int c = 0; c < buffer->channels; ++c) {
ERROR: braces {} are necessary for all arms of this statement
#291: FILE: audio/jackaudio.c:235:
+ if (rptr >= buffer->frames)
[...]
ERROR: braces {} are necessary for all arms of this statement
#306: FILE: audio/jackaudio.c:250:
+ if (c->state != QJACK_STATE_RUNNING)
[...]
ERROR: "foo * bar" should be "foo *bar"
#310: FILE: audio/jackaudio.c:254:
+ float * buffers[c->nchannels];
ERROR: space required before the open parenthesis '('
#311: FILE: audio/jackaudio.c:255:
+ for(int i = 0; i < c->nchannels; ++i)
ERROR: braces {} are necessary for all arms of this statement
#311: FILE: audio/jackaudio.c:255:
+ for(int i = 0; i < c->nchannels; ++i)
[...]
ERROR: braces {} are necessary for all arms of this statement
#314: FILE: audio/jackaudio.c:258:
+ if (c->out)
[...]
+ else
[...]
ERROR: braces {} are necessary for all arms of this statement
#321: FILE: audio/jackaudio.c:265:
+ if (c->state == QJACK_STATE_RUNNING)
[...]
ERROR: "foo * bar" should be "foo *bar"
#329: FILE: audio/jackaudio.c:273:
+static int qjack_xrun(void * arg)
ERROR: braces {} are necessary for all arms of this statement
#333: FILE: audio/jackaudio.c:277:
+ if (c->state != QJACK_STATE_RUNNING)
[...]
ERROR: that open brace { should be on the previous line
#344: FILE: audio/jackaudio.c:288:
+ switch(c->state)
+ {
ERROR: space required before the open parenthesis '('
#344: FILE: audio/jackaudio.c:288:
+ switch(c->state)
ERROR: suspect code indent for conditional statements (4, 6)
#369: FILE: audio/jackaudio.c:313:
+ if (jo->c.state != QJACK_STATE_RUNNING)
+ return len;
ERROR: braces {} are necessary for all arms of this statement
#369: FILE: audio/jackaudio.c:313:
+ if (jo->c.state != QJACK_STATE_RUNNING)
[...]
ERROR: suspect code indent for conditional statements (4, 6)
#379: FILE: audio/jackaudio.c:323:
+ if (ji->c.state != QJACK_STATE_RUNNING)
+ return len;
ERROR: braces {} are necessary for all arms of this statement
#379: FILE: audio/jackaudio.c:323:
+ if (ji->c.state != QJACK_STATE_RUNNING)
[...]
ERROR: suspect code indent for conditional statements (4, 6)
#398: FILE: audio/jackaudio.c:342:
+ if (opt->exact_name)
+ options |= JackUseExactName;
ERROR: braces {} are necessary for all arms of this statement
#398: FILE: audio/jackaudio.c:342:
+ if (opt->exact_name)
[...]
ERROR: suspect code indent for conditional statements (4, 6)
#401: FILE: audio/jackaudio.c:345:
+ if (!opt->start_server)
+ options |= JackNoStartServer;
ERROR: braces {} are necessary for all arms of this statement
#401: FILE: audio/jackaudio.c:345:
+ if (!opt->start_server)
[...]
ERROR: suspect code indent for conditional statements (4, 6)
#404: FILE: audio/jackaudio.c:348:
+ if (opt->server_name)
+ options |= JackServerName;
ERROR: braces {} are necessary for all arms of this statement
#404: FILE: audio/jackaudio.c:348:
+ if (opt->server_name)
[...]
ERROR: suspect code indent for conditional statements (8, 10)
#412: FILE: audio/jackaudio.c:356:
+ if (status & JackServerFailed)
+ dolog("unable to connect to JACK server\n");
ERROR: braces {} are necessary for all arms of this statement
#412: FILE: audio/jackaudio.c:356:
+ if (status & JackServerFailed)
[...]
ERROR: space prohibited between function name and open parenthesis '('
#429: FILE: audio/jackaudio.c:373:
+ jack_set_xrun_callback (c->client, qjack_xrun , c);
ERROR: space prohibited between function name and open parenthesis '('
#430: FILE: audio/jackaudio.c:374:
+ jack_on_shutdown (c->client, qjack_shutdown, c);
WARNING: Block comments use a leading /* on a separate line
#440: FILE: audio/jackaudio.c:384:
+ /* ensure the buffersize is no smaller then 512 samples, some (all?) qemu
WARNING: Block comments use a trailing */ on a separate line
#441: FILE: audio/jackaudio.c:385:
+ * virtual devices do not work correctly otherwise */
ERROR: braces {} are necessary for all arms of this statement
#442: FILE: audio/jackaudio.c:386:
+ if (c->buffersize < 512)
[...]
ERROR: space required before the open parenthesis '('
#450: FILE: audio/jackaudio.c:394:
+ for(int i = 0; i < c->nchannels; ++i) {
ERROR: braces {} are necessary for all arms of this statement
#477: FILE: audio/jackaudio.c:421:
+ if (jo->c.state != QJACK_STATE_DISCONNECTED)
[...]
ERROR: braces {} are necessary for all arms of this statement
#481: FILE: audio/jackaudio.c:425:
+ if (ret != 0)
[...]
ERROR: braces {} are necessary for all arms of this statement
#508: FILE: audio/jackaudio.c:452:
+ if (ji->c.state != QJACK_STATE_DISCONNECTED)
[...]
ERROR: braces {} are necessary for all arms of this statement
#512: FILE: audio/jackaudio.c:456:
+ if (ret != 0)
[...]
ERROR: space required before the open parenthesis '('
#539: FILE: audio/jackaudio.c:483:
+ for(int i = 0; i < c->nchannels; ++i)
ERROR: braces {} are necessary for all arms of this statement
#539: FILE: audio/jackaudio.c:483:
+ for(int i = 0; i < c->nchannels; ++i)
[...]
ERROR: braces {} are necessary for all arms of this statement
#558: FILE: audio/jackaudio.c:502:
+ if (c->state != QJACK_STATE_IDLE)
[...]
ERROR: "foo * bar" should be "foo *bar"
#582: FILE: audio/jackaudio.c:526:
+static int qjack_thread_creator(jack_native_thread_t * thread,
ERROR: braces {} are necessary for all arms of this statement
#586: FILE: audio/jackaudio.c:530:
+ if (ret != 0)
[...]
ERROR: "foo* bar" should be "foo *bar"
#595: FILE: audio/jackaudio.c:539:
+static void* qjack_init(Audiodev *dev)
ERROR: space prohibited between function name and open parenthesis '('
#604: FILE: audio/jackaudio.c:548:
+static void qjack_fini (void *opaque)
total: 80 errors, 3 warnings, 703 lines checked
Commit 3831a9a183c6 (audio/jack: add JACK client audiodev) 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/address@hidden.ktmba/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to address@hidden