Skip to content

Commit f35ba49

Browse files
Qinghao ShiQinghao Shi
authored andcommitted
remove empty lines and redundant variables
1 parent bc03c20 commit f35ba49

File tree

7 files changed

+1176
-1179
lines changed

7 files changed

+1176
-1179
lines changed

targets/TARGET_ARM_FM/TARGET_FVP_MPS2/SDK/ETH_MPS2.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ unsigned int smsc9220_read_id(void)
188188
return SMSC9220->ID_REV;
189189
}
190190

191-
// Initiates a soft reset, returns failure or success.
191+
// Initiates a soft reset, returns 0 on success, or 1 on failure.
192192
unsigned int smsc9220_soft_reset(void)
193193
{
194194
int timedout;
@@ -260,18 +260,14 @@ unsigned int smsc9220_check_phy(void)
260260
unsigned int smsc9220_reset_phy(void)
261261
{
262262
unsigned short read;
263-
int error;
264263

265-
error = 0;
266264
if (smsc9220_phy_regread(SMSC9220_PHY_BCONTROL, &read)) {
267-
error = 1;
268-
return error;
265+
return 1;
269266
}
270267

271268
read |= (1 << 15);
272269
if (smsc9220_phy_regwrite(SMSC9220_PHY_BCONTROL, read)) {
273-
error = 1;
274-
return error;
270+
return 1;
275271
}
276272
return 0;
277273
}

targets/TARGET_ARM_FM/TARGET_FVP_MPS2/SDK/mps2_ethernet_api.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,11 @@ int smsc9220_check_id(void)
6060

6161
int smsc9220_check_macaddress(void)
6262
{
63-
int error;
6463
const unsigned int mac_valid_high = 0xC00A;
6564
const unsigned int mac_valid_low = 0x00F70200;
6665
unsigned int mac_low;
6766
unsigned int mac_high;
6867

69-
error = 0;
70-
7168
// Read current mac address.
7269
smsc9220_mac_regread(SMSC9220_MAC_ADDRH, &mac_high);
7370
smsc9220_mac_regread(SMSC9220_MAC_ADDRL, &mac_low);
@@ -82,11 +79,10 @@ int smsc9220_check_macaddress(void)
8279

8380

8481
if (mac_high != mac_valid_high || mac_low != mac_valid_low) {
85-
error = TRUE;
86-
return error;
82+
return 1;
8783
}
8884

89-
return error;
85+
return 0;
9086
}
9187

9288
void smsc9220_print_mac_registers()

targets/TARGET_ARM_FM/TARGET_FVP_MPS2/TARGET_FVP_MPS2_M0P/device/SMM_MPS2.h

Lines changed: 288 additions & 282 deletions
Large diffs are not rendered by default.

targets/TARGET_ARM_FM/TARGET_FVP_MPS2/TARGET_FVP_MPS2_M3/device/SMM_MPS2.h

Lines changed: 288 additions & 282 deletions
Large diffs are not rendered by default.

targets/TARGET_ARM_FM/TARGET_FVP_MPS2/TARGET_FVP_MPS2_M4/device/SMM_MPS2.h

Lines changed: 285 additions & 279 deletions
Large diffs are not rendered by default.

targets/TARGET_ARM_FM/TARGET_FVP_MPS2/TARGET_FVP_MPS2_M7/device/SMM_MPS2.h

Lines changed: 310 additions & 304 deletions
Large diffs are not rendered by default.

targets/TARGET_ARM_FM/TARGET_FVP_MPS2/device.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,5 @@
2020
#ifndef MBED_DEVICE_H
2121
#define MBED_DEVICE_H
2222

23-
24-
25-
26-
27-
28-
29-
30-
31-
32-
33-
34-
35-
36-
37-
38-
39-
40-
4123
#include "objects.h"
42-
4324
#endif

0 commit comments

Comments
 (0)