Skip to content

Commit 395059f

Browse files
viviendavem330
authored andcommitted
net: dsa: mv88e6xxx: rename ATU MAC accessors
Rename the __mv88e6xxx_{read,write}_addr functions to more explicit _mv88e6xxx_atu_mac_{read,write} functions, which also respect the single underscore convention used in the file (meaning SMI lock must be held). In the meantime, define their MAC address parameters as an array of ETH_ALEN bytes instead of a char pointer. Signed-off-by: Vivien Didelot <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 368b1d9 commit 395059f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/net/dsa/mv88e6xxx.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,8 +1182,8 @@ int mv88e6xxx_port_stp_update(struct dsa_switch *ds, int port, u8 state)
11821182
return 0;
11831183
}
11841184

1185-
static int __mv88e6xxx_write_addr(struct dsa_switch *ds,
1186-
const unsigned char *addr)
1185+
static int _mv88e6xxx_atu_mac_write(struct dsa_switch *ds,
1186+
const u8 addr[ETH_ALEN])
11871187
{
11881188
int i, ret;
11891189

@@ -1198,7 +1198,7 @@ static int __mv88e6xxx_write_addr(struct dsa_switch *ds,
11981198
return 0;
11991199
}
12001200

1201-
static int __mv88e6xxx_read_addr(struct dsa_switch *ds, unsigned char *addr)
1201+
static int _mv88e6xxx_atu_mac_read(struct dsa_switch *ds, u8 addr[ETH_ALEN])
12021202
{
12031203
int i, ret;
12041204

@@ -1225,7 +1225,7 @@ static int __mv88e6xxx_port_fdb_cmd(struct dsa_switch *ds, int port,
12251225
if (ret < 0)
12261226
return ret;
12271227

1228-
ret = __mv88e6xxx_write_addr(ds, addr);
1228+
ret = _mv88e6xxx_atu_mac_write(ds, addr);
12291229
if (ret < 0)
12301230
return ret;
12311231

@@ -1280,7 +1280,7 @@ static int __mv88e6xxx_port_getnext(struct dsa_switch *ds, int port,
12801280
if (ret < 0)
12811281
return ret;
12821282

1283-
ret = __mv88e6xxx_write_addr(ds, addr);
1283+
ret = _mv88e6xxx_atu_mac_write(ds, addr);
12841284
if (ret < 0)
12851285
return ret;
12861286

@@ -1297,7 +1297,7 @@ static int __mv88e6xxx_port_getnext(struct dsa_switch *ds, int port,
12971297
return -ENOENT;
12981298
} while (!(((ret >> 4) & 0xff) & (1 << port)));
12991299

1300-
ret = __mv88e6xxx_read_addr(ds, addr);
1300+
ret = _mv88e6xxx_atu_mac_read(ds, addr);
13011301
if (ret < 0)
13021302
return ret;
13031303

@@ -1659,7 +1659,7 @@ static int mv88e6xxx_atu_show_db(struct seq_file *s, struct dsa_switch *ds,
16591659
unsigned char addr[6];
16601660
int ret, data, state;
16611661

1662-
ret = __mv88e6xxx_write_addr(ds, bcast);
1662+
ret = _mv88e6xxx_atu_mac_write(ds, bcast);
16631663
if (ret < 0)
16641664
return ret;
16651665

@@ -1674,7 +1674,7 @@ static int mv88e6xxx_atu_show_db(struct seq_file *s, struct dsa_switch *ds,
16741674
state = data & GLOBAL_ATU_DATA_STATE_MASK;
16751675
if (state == GLOBAL_ATU_DATA_STATE_UNUSED)
16761676
break;
1677-
ret = __mv88e6xxx_read_addr(ds, addr);
1677+
ret = _mv88e6xxx_atu_mac_read(ds, addr);
16781678
if (ret < 0)
16791679
return ret;
16801680
mv88e6xxx_atu_show_entry(s, dbnum, addr, data);

0 commit comments

Comments
 (0)