On Mon, 2017-08-14 at 16:17 -0500, Larry Finger wrote: > On 08/14/2017 01:56 PM, Joe Perches wrote: > > On Sun, 2017-06-25 at 10:43 -0500, Larry Finger wrote: > > > From: Ping-Ke Shih <pkshih@xxxxxxxxxxx> > > > > > > Use debugfs to dump register and btcoex status. > > > > [] > > > diff --git a/drivers/net/wireless/realtek/rtlwifi/debug.c b/drivers/net/wireless/realtek/rtlwifi/debug.c > > > > [] > > > +void rtl_debug_add_one(struct ieee80211_hw *hw) > > > +{ > > > + struct rtl_priv *rtlpriv = rtl_priv(hw); > > > + struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); > > > + struct dentry *parent; > > > + > > > + snprintf(rtlpriv->dbg.debugfs_name, 18, "%02x-%02x-%02x-%02x-%02x-%02x", > > > + rtlefuse->dev_addr[0], rtlefuse->dev_addr[1], > > > + rtlefuse->dev_addr[2], rtlefuse->dev_addr[3], > > > + rtlefuse->dev_addr[4], rtlefuse->dev_addr[5]); > > > > Why uses dashes and why not just use %pM > > This snprintf() supplies the MAC address in a file name of the type > /sys/kernel/debug/rtlwifi/00-11-22-33-44-55-66/mac_0 > Using %pM would put colons there, and I have had trouble with colons in a file > name. We could use %#pM and drop the separators. %pm emits without colons