aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/pci.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-01-04 22:40:43 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-24 14:07:40 -0500
commit9d833ed752e91c71792dd8ebfd0f865e6a568a37 (patch)
treea0b03e38ee9a2186523df595c18e3839ab603c1f /drivers/net/wireless/rtlwifi/pci.c
parent4c48869f5d6e4ee4a773fd67a01e1b934faa57f8 (diff)
rtlwifi: Convert RT_ASSERT macro to use ##__VA_ARGS__
Consolidate printks to avoid possible message interleaving and reduce the object size. Remove unnecessary RT_ASSERT parentheses. Align arguments. Coalesce formats. Remove unnecessary __func__ use as the macro uses it. $ size drivers/net/wireless/rtlwifi/built-in.o* text data bss dec hex filename 588901 55333 127216 771450 bc57a drivers/net/wireless/rtlwifi/built-in.o.new 590002 55333 127560 772895 bcb1f 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>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/pci.c')
-rw-r--r--drivers/net/wireless/rtlwifi/pci.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index b52fef235754..3c4ae5d9de4f 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -1746,16 +1746,15 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
1746 1746
1747 err = pci_enable_device(pdev); 1747 err = pci_enable_device(pdev);
1748 if (err) { 1748 if (err) {
1749 RT_ASSERT(false, 1749 RT_ASSERT(false, "%s : Cannot enable new PCI device\n",
1750 ("%s : Cannot enable new PCI device\n", 1750 pci_name(pdev));
1751 pci_name(pdev)));
1752 return err; 1751 return err;
1753 } 1752 }
1754 1753
1755 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { 1754 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
1756 if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) { 1755 if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
1757 RT_ASSERT(false, ("Unable to obtain 32bit DMA " 1756 RT_ASSERT(false,
1758 "for consistent allocations\n")); 1757 "Unable to obtain 32bit DMA for consistent allocations\n");
1759 pci_disable_device(pdev); 1758 pci_disable_device(pdev);
1760 return -ENOMEM; 1759 return -ENOMEM;
1761 } 1760 }
@@ -1767,7 +1766,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
1767 sizeof(struct rtl_priv), &rtl_ops); 1766 sizeof(struct rtl_priv), &rtl_ops);
1768 if (!hw) { 1767 if (!hw) {
1769 RT_ASSERT(false, 1768 RT_ASSERT(false,
1770 ("%s : ieee80211 alloc failed\n", pci_name(pdev))); 1769 "%s : ieee80211 alloc failed\n", pci_name(pdev));
1771 err = -ENOMEM; 1770 err = -ENOMEM;
1772 goto fail1; 1771 goto fail1;
1773 } 1772 }
@@ -1797,7 +1796,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
1797 /* MEM map */ 1796 /* MEM map */
1798 err = pci_request_regions(pdev, KBUILD_MODNAME); 1797 err = pci_request_regions(pdev, KBUILD_MODNAME);
1799 if (err) { 1798 if (err) {
1800 RT_ASSERT(false, ("Can't obtain PCI resources\n")); 1799 RT_ASSERT(false, "Can't obtain PCI resources\n");
1801 return err; 1800 return err;
1802 } 1801 }
1803 1802
@@ -1810,7 +1809,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
1810 (unsigned long)pci_iomap(pdev, 1809 (unsigned long)pci_iomap(pdev,
1811 rtlpriv->cfg->bar_id, pmem_len); 1810 rtlpriv->cfg->bar_id, pmem_len);
1812 if (rtlpriv->io.pci_mem_start == 0) { 1811 if (rtlpriv->io.pci_mem_start == 0) {
1813 RT_ASSERT(false, ("Can't map PCI mem\n")); 1812 RT_ASSERT(false, "Can't map PCI mem\n");
1814 goto fail2; 1813 goto fail2;
1815 } 1814 }
1816 1815