Skip to content

Commit 536a4f7

Browse files
andy-shevgregkh
authored andcommitted
staging: ks7010: Use %pM format specifier for MAC addresses
Convert to %pM instead of using custom code. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d8a0f85 commit 536a4f7

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

drivers/staging/ks7010/ks_hostif.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info *ap_info)
161161
wireless_send_event(netdev, SIOCGIWAP, &wrqu, NULL);
162162
}
163163
netdev_dbg(priv->net_dev, "Link AP\n"
164-
"- bssid=%02X:%02X:%02X:%02X:%02X:%02X\n"
164+
"- bssid=%pM\n"
165165
"- essid=%s\n"
166166
"- rate_set=%02X,%02X,%02X,%02X,%02X,%02X,%02X,%02X\n"
167167
"- channel=%d\n"
@@ -172,8 +172,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info *ap_info)
172172
"- rsn.size=%d\n"
173173
"- ext_rate_set_size=%d\n"
174174
"- rate_set_size=%d\n",
175-
ap->bssid[0], ap->bssid[1], ap->bssid[2],
176-
ap->bssid[3], ap->bssid[4], ap->bssid[5],
175+
ap->bssid,
177176
&ap->ssid.body[0],
178177
ap->rate_set.body[0], ap->rate_set.body[1],
179178
ap->rate_set.body[2], ap->rate_set.body[3],
@@ -439,11 +438,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
439438
/* source address check */
440439
if (ether_addr_equal(&priv->eth_addr[0], eth_hdr->h_source)) {
441440
netdev_err(priv->net_dev, "invalid : source is own mac address !!\n");
442-
netdev_err(priv->net_dev,
443-
"eth_hdrernet->h_dest=%02X:%02X:%02X:%02X:%02X:%02X\n",
444-
eth_hdr->h_source[0], eth_hdr->h_source[1],
445-
eth_hdr->h_source[2], eth_hdr->h_source[3],
446-
eth_hdr->h_source[4], eth_hdr->h_source[5]);
441+
netdev_err(priv->net_dev, "eth_hdrernet->h_dest=%pM\n", eth_hdr->h_source);
447442
priv->nstats.rx_errors++;
448443
return;
449444
}

0 commit comments

Comments
 (0)