rt2x00: Use more current logging styles, shrink object size
Reduce object space ~2% using more current logging styles. Neaten and simplify logging macros. Use wiphy_<level> where appropriate. Coalesce formats. Convert ERROR/WARNING/INFO macros to rt2x00_<level> Convert EEPROM to rt2x00_eeprom_dbg Convert PROBE_ERROR to rt2x00_probe_err Convert DEBUG to rt2x00_dbg Convert EEPROM to rt2x00_eeprom_dbg $ size drivers/net/wireless/rt2x00/built-in.o* text data bss dec hex filename 245639 71696 69584 386919 5e767 drivers/net/wireless/rt2x00/built-in.o.new 240609 70096 68944 379649 5cb01 drivers/net/wireless/rt2x00/built-in.o.new.nodyndbg 240609 70096 68944 379649 5cb01 drivers/net/wireless/rt2x00/built-in.o.new.no_rt2x00_debug 249198 70096 70352 389646 5f20e drivers/net/wireless/rt2x00/built-in.o.old 249198 70096 70352 389646 5f20e drivers/net/wireless/rt2x00/built-in.o.old.nodyndbg 244222 70096 69712 384030 5dc1e drivers/net/wireless/rt2x00/built-in.o.old.no_rt2x00_debug Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
624708b85e
commit
ec9c498991
@@ -68,7 +68,7 @@ static int rt2x00pci_alloc_reg(struct rt2x00_dev *rt2x00dev)
|
||||
return 0;
|
||||
|
||||
exit:
|
||||
ERROR_PROBE("Failed to allocate registers.\n");
|
||||
rt2x00_probe_err("Failed to allocate registers\n");
|
||||
|
||||
rt2x00pci_free_reg(rt2x00dev);
|
||||
|
||||
@@ -84,30 +84,30 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct rt2x00_ops *ops)
|
||||
|
||||
retval = pci_enable_device(pci_dev);
|
||||
if (retval) {
|
||||
ERROR_PROBE("Enable device failed.\n");
|
||||
rt2x00_probe_err("Enable device failed\n");
|
||||
return retval;
|
||||
}
|
||||
|
||||
retval = pci_request_regions(pci_dev, pci_name(pci_dev));
|
||||
if (retval) {
|
||||
ERROR_PROBE("PCI request regions failed.\n");
|
||||
rt2x00_probe_err("PCI request regions failed\n");
|
||||
goto exit_disable_device;
|
||||
}
|
||||
|
||||
pci_set_master(pci_dev);
|
||||
|
||||
if (pci_set_mwi(pci_dev))
|
||||
ERROR_PROBE("MWI not available.\n");
|
||||
rt2x00_probe_err("MWI not available\n");
|
||||
|
||||
if (dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(32))) {
|
||||
ERROR_PROBE("PCI DMA not supported.\n");
|
||||
rt2x00_probe_err("PCI DMA not supported\n");
|
||||
retval = -EIO;
|
||||
goto exit_release_regions;
|
||||
}
|
||||
|
||||
hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw);
|
||||
if (!hw) {
|
||||
ERROR_PROBE("Failed to allocate hardware.\n");
|
||||
rt2x00_probe_err("Failed to allocate hardware\n");
|
||||
retval = -ENOMEM;
|
||||
goto exit_release_regions;
|
||||
}
|
||||
@@ -207,7 +207,7 @@ int rt2x00pci_resume(struct pci_dev *pci_dev)
|
||||
|
||||
if (pci_set_power_state(pci_dev, PCI_D0) ||
|
||||
pci_enable_device(pci_dev)) {
|
||||
ERROR(rt2x00dev, "Failed to resume device.\n");
|
||||
rt2x00_err(rt2x00dev, "Failed to resume device\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user