forked from Imagelibrary/rtems
sonic.c: Fix warning on gcc 6
GCC 6.0 previews give the following warning on sonic.c: ../../../../../rtems/c/src/libchip/network/sonic.c:837:11: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] This was discussed here: https://lists.rtems.org/pipermail/devel/2016-March/014004.html and we concluded it would be better to rewrite the entire snippet.
This commit is contained in:
@@ -826,19 +826,17 @@ SONIC_STATIC void sonic_rda_wait(
|
|||||||
* driver has to move the RRP back *two* entries to
|
* driver has to move the RRP back *two* entries to
|
||||||
* reuse the receive buffer holding the giant packet.
|
* reuse the receive buffer holding the giant packet.
|
||||||
*/
|
*/
|
||||||
for (i = 0 ; i < 2 ; i++) {
|
for (i = 0; i < 2; ++i) {
|
||||||
if ((*sc->read_register)( rp, SONIC_REG_RRP ) ==
|
uint32_t rrp = (*sc->read_register)( rp, SONIC_REG_RRP );
|
||||||
(*sc->read_register)( rp, SONIC_REG_RSA ))
|
const uint32_t rsa = (*sc->read_register)( rp, SONIC_REG_RSA );
|
||||||
(*sc->write_register)(
|
|
||||||
rp,
|
if (rrp == rsa) {
|
||||||
SONIC_REG_RRP,
|
const uint32_t rea = (*sc->read_register)( rp, SONIC_REG_REA );
|
||||||
(*sc->read_register)( rp, SONIC_REG_REA )
|
(*sc->write_register)( rp, SONIC_REG_RRP, rea );
|
||||||
);
|
}
|
||||||
(*sc->write_register)(
|
|
||||||
rp,
|
rrp = (*sc->read_register)( rp, SONIC_REG_RRP );
|
||||||
SONIC_REG_RRP,
|
(*sc->write_register)( rp, SONIC_REG_RRP, rrp - sizeof(ReceiveResource_t) );
|
||||||
(*sc->read_register)(rp, SONIC_REG_RRP) - sizeof(ReceiveResource_t)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user