mips: mipssim: Renovate coding style
The script checkpatch.pl located in scripts folder was used to detect all errors and warrnings in files: hw/mips/mips_mipssim.c hw/net/mipsnet.c All these mips mipssim machine files were edited and all the errors and warrings generated by the checkpatch.pl script were corrected and then the script was ran again to make sure there are no more errors and warnings. Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1575640687-20744-4-git-send-email-Filip.Bozuta@rt-rk.com>
This commit is contained in:
parent
dbd07eda9d
commit
83aecbaa45
@ -64,8 +64,9 @@ static void mipsnet_update_irq(MIPSnetState *s)
|
||||
|
||||
static int mipsnet_buffer_full(MIPSnetState *s)
|
||||
{
|
||||
if (s->rx_count >= MAX_ETH_FRAME_SIZE)
|
||||
if (s->rx_count >= MAX_ETH_FRAME_SIZE) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -73,18 +74,21 @@ static int mipsnet_can_receive(NetClientState *nc)
|
||||
{
|
||||
MIPSnetState *s = qemu_get_nic_opaque(nc);
|
||||
|
||||
if (s->busy)
|
||||
if (s->busy) {
|
||||
return 0;
|
||||
}
|
||||
return !mipsnet_buffer_full(s);
|
||||
}
|
||||
|
||||
static ssize_t mipsnet_receive(NetClientState *nc, const uint8_t *buf, size_t size)
|
||||
static ssize_t mipsnet_receive(NetClientState *nc,
|
||||
const uint8_t *buf, size_t size)
|
||||
{
|
||||
MIPSnetState *s = qemu_get_nic_opaque(nc);
|
||||
|
||||
trace_mipsnet_receive(size);
|
||||
if (!mipsnet_can_receive(nc))
|
||||
if (!mipsnet_can_receive(nc)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (size >= sizeof(s->rx_buffer)) {
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user