rtlwifi: Convert RT_TRACE macro to use ##__VA_ARGS__
Consolidate printks to avoid possible message interleaving and reduce the object size. Remove unnecessary RT_TRACE parentheses. Miscellaneous typo and grammar fixes. Add missing newlines to formats. Remove duplicate KERN_DEBUG prefixes. Coalesce formats. Align arguments. $ size drivers/net/wireless/rtlwifi/built-in.o* text data bss dec hex filename 594841 55333 129680 779854 be64e drivers/net/wireless/rtlwifi/built-in.o.new 607022 55333 138720 801075 c3933 drivers/net/wireless/rtlwifi/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
af08687b4e
commit
f30d7507a8
@@ -276,14 +276,14 @@ static int _rtl_usb_init_tx(struct ieee80211_hw *hw)
|
||||
? USB_HIGH_SPEED_BULK_SIZE
|
||||
: USB_FULL_SPEED_BULK_SIZE;
|
||||
|
||||
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, ("USB Max Bulk-out Size=%d\n",
|
||||
rtlusb->max_bulk_out_size));
|
||||
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "USB Max Bulk-out Size=%d\n",
|
||||
rtlusb->max_bulk_out_size);
|
||||
|
||||
for (i = 0; i < __RTL_TXQ_NUM; i++) {
|
||||
u32 ep_num = rtlusb->ep_map.ep_mapping[i];
|
||||
if (!ep_num) {
|
||||
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
|
||||
("Invalid endpoint map setting!\n"));
|
||||
"Invalid endpoint map setting!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
@@ -345,9 +345,9 @@ static int _rtl_usb_init(struct ieee80211_hw *hw)
|
||||
rtlusb->out_ep_nums++;
|
||||
|
||||
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
|
||||
("USB EP(0x%02x), MaxPacketSize=%d ,Interval=%d.\n",
|
||||
"USB EP(0x%02x), MaxPacketSize=%d, Interval=%d\n",
|
||||
pep_desc->bEndpointAddress, pep_desc->wMaxPacketSize,
|
||||
pep_desc->bInterval));
|
||||
pep_desc->bInterval);
|
||||
}
|
||||
if (rtlusb->in_ep_nums < rtlpriv->cfg->usb_interface_cfg->in_ep_num)
|
||||
return -EINVAL ;
|
||||
@@ -414,7 +414,7 @@ static struct sk_buff *_rtl_prep_rx_urb(struct ieee80211_hw *hw,
|
||||
gfp_mask);
|
||||
if (!skb) {
|
||||
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
|
||||
("Failed to __dev_alloc_skb!!\n"));
|
||||
"Failed to __dev_alloc_skb!!\n");
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
@@ -575,7 +575,7 @@ static void _rtl_rx_completed(struct urb *_urb)
|
||||
if (IS_ERR(_skb)) {
|
||||
err = PTR_ERR(_skb);
|
||||
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
|
||||
("Can't allocate skb for bulk IN!\n"));
|
||||
"Can't allocate skb for bulk IN!\n");
|
||||
return;
|
||||
}
|
||||
skb = _skb;
|
||||
@@ -632,14 +632,14 @@ static int _rtl_usb_receive(struct ieee80211_hw *hw)
|
||||
urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||
if (!urb) {
|
||||
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
|
||||
("Failed to alloc URB!!\n"));
|
||||
"Failed to alloc URB!!\n");
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
skb = _rtl_prep_rx_urb(hw, rtlusb, urb, GFP_KERNEL);
|
||||
if (IS_ERR(skb)) {
|
||||
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
|
||||
("Failed to prep_rx_urb!!\n"));
|
||||
"Failed to prep_rx_urb!!\n");
|
||||
err = PTR_ERR(skb);
|
||||
goto err_out;
|
||||
}
|
||||
@@ -745,7 +745,7 @@ static void _rtl_submit_tx_urb(struct ieee80211_hw *hw, struct urb *_urb)
|
||||
struct sk_buff *skb;
|
||||
|
||||
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
|
||||
("Failed to submit urb.\n"));
|
||||
"Failed to submit urb\n");
|
||||
usb_unanchor_urb(_urb);
|
||||
skb = (struct sk_buff *)_urb->context;
|
||||
kfree_skb(skb);
|
||||
@@ -768,7 +768,7 @@ static int _usb_tx_post(struct ieee80211_hw *hw, struct urb *urb,
|
||||
|
||||
if (urb->status) {
|
||||
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
|
||||
("Urb has error status 0x%X\n", urb->status));
|
||||
"Urb has error status 0x%X\n", urb->status);
|
||||
goto out;
|
||||
}
|
||||
/* TODO: statistics */
|
||||
@@ -805,7 +805,7 @@ static struct urb *_rtl_usb_tx_urb_setup(struct ieee80211_hw *hw,
|
||||
_urb = usb_alloc_urb(0, GFP_ATOMIC);
|
||||
if (!_urb) {
|
||||
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
|
||||
("Can't allocate URB for bulk out!\n"));
|
||||
"Can't allocate URB for bulk out!\n");
|
||||
kfree_skb(skb);
|
||||
return NULL;
|
||||
}
|
||||
@@ -830,7 +830,7 @@ static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb,
|
||||
WARN_ON(NULL == rtlusb->usb_tx_aggregate_hdl);
|
||||
if (unlikely(IS_USB_STOP(rtlusb))) {
|
||||
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
|
||||
("USB device is stopping...\n"));
|
||||
"USB device is stopping...\n");
|
||||
kfree_skb(skb);
|
||||
return;
|
||||
}
|
||||
@@ -840,7 +840,7 @@ static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb,
|
||||
_urb = _rtl_usb_tx_urb_setup(hw, _skb, ep_num);
|
||||
if (unlikely(!_urb)) {
|
||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
|
||||
("Can't allocate urb. Drop skb!\n"));
|
||||
"Can't allocate urb. Drop skb!\n");
|
||||
return;
|
||||
}
|
||||
urb_list = &rtlusb->tx_pending[ep_num];
|
||||
@@ -865,7 +865,7 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
|
||||
|
||||
memset(&tcb_desc, 0, sizeof(struct rtl_tcb_desc));
|
||||
if (ieee80211_is_auth(fc)) {
|
||||
RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, ("MAC80211_LINKING\n"));
|
||||
RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, "MAC80211_LINKING\n");
|
||||
rtl_ips_nic_on(hw);
|
||||
}
|
||||
|
||||
@@ -969,8 +969,7 @@ int __devinit rtl_usb_probe(struct usb_interface *intf,
|
||||
/*like read eeprom and so on */
|
||||
rtlpriv->cfg->ops->read_eeprom_info(hw);
|
||||
if (rtlpriv->cfg->ops->init_sw_vars(hw)) {
|
||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
|
||||
("Can't init_sw_vars.\n"));
|
||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n");
|
||||
goto error_out;
|
||||
}
|
||||
rtlpriv->cfg->ops->init_sw_leds(hw);
|
||||
@@ -980,7 +979,7 @@ int __devinit rtl_usb_probe(struct usb_interface *intf,
|
||||
err = rtl_init_core(hw);
|
||||
if (err) {
|
||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
|
||||
("Can't allocate sw for mac80211.\n"));
|
||||
"Can't allocate sw for mac80211\n");
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
@@ -990,7 +989,7 @@ int __devinit rtl_usb_probe(struct usb_interface *intf,
|
||||
err = ieee80211_register_hw(hw);
|
||||
if (err) {
|
||||
RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG,
|
||||
("Can't register mac80211 hw.\n"));
|
||||
"Can't register mac80211 hw\n");
|
||||
goto error_out;
|
||||
} else {
|
||||
rtlpriv->mac80211.mac80211_registered = 1;
|
||||
|
Reference in New Issue
Block a user