wes3 commented on a change in pull request #2371:
URL: https://github.com/apache/mynewt-core/pull/2371#discussion_r487422823
##########
File path: hw/drivers/i2s/src/i2s.c
##########
@@ -125,10 +126,16 @@ i2s_buffers_from_pool(struct i2s *i2s, struct
i2s_buffer_pool *pool)
sample_data = (uintptr_t)&buffers[pool->buffer_count];
for (i = 0; i < pool->buffer_count; ++i) {
+ for (j = 0; j < I2S_BUFFER_GUARD; ++j, ++sample_data) {
+ *(uint8_t *)sample_data = 0xFD;
Review comment:
Another nit-pick: Maybe define the buffer guard value and use the
definition instead of the hard-coded value.
##########
File path: hw/drivers/i2s/src/i2s.c
##########
@@ -125,10 +126,16 @@ i2s_buffers_from_pool(struct i2s *i2s, struct
i2s_buffer_pool *pool)
sample_data = (uintptr_t)&buffers[pool->buffer_count];
for (i = 0; i < pool->buffer_count; ++i) {
+ for (j = 0; j < I2S_BUFFER_GUARD; ++j, ++sample_data) {
+ *(uint8_t *)sample_data = 0xFD;
Review comment:
Another nit-pick: Maybe define the buffer guard value and use the
definition instead of the hard-coded value.
##########
File path: hw/drivers/i2s/src/i2s.c
##########
@@ -125,10 +126,16 @@ i2s_buffers_from_pool(struct i2s *i2s, struct
i2s_buffer_pool *pool)
sample_data = (uintptr_t)&buffers[pool->buffer_count];
for (i = 0; i < pool->buffer_count; ++i) {
+ for (j = 0; j < I2S_BUFFER_GUARD; ++j, ++sample_data) {
+ *(uint8_t *)sample_data = 0xFD;
Review comment:
Another nit-pick: Maybe define the buffer guard value and use the
definition instead of the hard-coded value.
##########
File path: hw/drivers/i2s/src/i2s.c
##########
@@ -125,10 +126,16 @@ i2s_buffers_from_pool(struct i2s *i2s, struct
i2s_buffer_pool *pool)
sample_data = (uintptr_t)&buffers[pool->buffer_count];
for (i = 0; i < pool->buffer_count; ++i) {
+ for (j = 0; j < I2S_BUFFER_GUARD; ++j, ++sample_data) {
+ *(uint8_t *)sample_data = 0xFD;
Review comment:
Another nit-pick: Maybe define the buffer guard value and use the
definition instead of the hard-coded value.
##########
File path: hw/drivers/i2s/src/i2s.c
##########
@@ -125,10 +126,16 @@ i2s_buffers_from_pool(struct i2s *i2s, struct
i2s_buffer_pool *pool)
sample_data = (uintptr_t)&buffers[pool->buffer_count];
for (i = 0; i < pool->buffer_count; ++i) {
+ for (j = 0; j < I2S_BUFFER_GUARD; ++j, ++sample_data) {
+ *(uint8_t *)sample_data = 0xFD;
Review comment:
Another nit-pick: Maybe define the buffer guard value and use the
definition instead of the hard-coded value.
##########
File path: hw/drivers/i2s/src/i2s.c
##########
@@ -125,10 +126,16 @@ i2s_buffers_from_pool(struct i2s *i2s, struct
i2s_buffer_pool *pool)
sample_data = (uintptr_t)&buffers[pool->buffer_count];
for (i = 0; i < pool->buffer_count; ++i) {
+ for (j = 0; j < I2S_BUFFER_GUARD; ++j, ++sample_data) {
+ *(uint8_t *)sample_data = 0xFD;
Review comment:
Another nit-pick: Maybe define the buffer guard value and use the
definition instead of the hard-coded value.
##########
File path: hw/drivers/i2s/src/i2s.c
##########
@@ -125,10 +126,16 @@ i2s_buffers_from_pool(struct i2s *i2s, struct
i2s_buffer_pool *pool)
sample_data = (uintptr_t)&buffers[pool->buffer_count];
for (i = 0; i < pool->buffer_count; ++i) {
+ for (j = 0; j < I2S_BUFFER_GUARD; ++j, ++sample_data) {
+ *(uint8_t *)sample_data = 0xFD;
Review comment:
Another nit-pick: Maybe define the buffer guard value and use the
definition instead of the hard-coded value.
##########
File path: hw/drivers/i2s/src/i2s.c
##########
@@ -125,10 +126,16 @@ i2s_buffers_from_pool(struct i2s *i2s, struct
i2s_buffer_pool *pool)
sample_data = (uintptr_t)&buffers[pool->buffer_count];
for (i = 0; i < pool->buffer_count; ++i) {
+ for (j = 0; j < I2S_BUFFER_GUARD; ++j, ++sample_data) {
+ *(uint8_t *)sample_data = 0xFD;
Review comment:
Another nit-pick: Maybe define the buffer guard value and use the
definition instead of the hard-coded value.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]