ssb: Remove home-grown printk wrappers
Michael Büsch
maintainerReplace the ssb printk wrappers by standard print helpers. Also remove SSB_SILENT. Nobody should use it anyway.
Originally submitted by Joe Perches <[email protected]>. Modified to add dev_... based printks.
--- drivers/ssb/Kconfig | 14 +------ drivers/ssb/b43_pci_bridge.c | 4 +- drivers/ssb/bridge_pcmcia_80211.c | 6 +-- drivers/ssb/driver_chipcommon.c | 6 +-- drivers/ssb/driver_chipcommon_pmu.c | 30 +++++++------- drivers/ssb/driver_chipcommon_sflash.c | 6 +-- drivers/ssb/driver_extif.c | 4 +- drivers/ssb/driver_gpio.c | 4 +- drivers/ssb/driver_mipscore.c | 17 ++++---- drivers/ssb/driver_pcicore.c | 17 ++++---- drivers/ssb/embedded.c | 8 ++-- drivers/ssb/host_soc.c | 4 +- drivers/ssb/main.c | 45 ++++++++++++--------- drivers/ssb/pci.c | 56 +++++++++++++------------- drivers/ssb/pcmcia.c | 48 ++++++++++------------ drivers/ssb/scan.c | 34 ++++++++-------- drivers/ssb/sdio.c | 4 +- drivers/ssb/sprom.c | 4 +- drivers/ssb/ssb_private.h | 30 ++------------ 19 files changed, 152 insertions(+), 189 deletions(-)
drivers/ssb/Kconfig +1 -13
@@ -89,21 +89,9 @@ config SSB_HOST_SOC If unsure, say N -config SSB_SILENT - bool "No SSB kernel messages" - depends on SSB && EXPERT - help - This option turns off all Sonics Silicon Backplane printks. - Note that you won't be able to identify problems, once - messages are turned off. - This might only be desired for production kernels on - embedded devices to reduce the kernel size. - - Say N - config SSB_DEBUG bool "SSB debugging" - depends on SSB && !SSB_SILENT + depends on SSB help This turns on additional runtime checks and debugging messages. Turn this on for SSB troubleshooting.
drivers/ssb/b43_pci_bridge.c +2 -2
@@ -10,12 +10,12 @@* Licensed under the GNU/GPL. See COPYING for details. */ +#include "ssb_private.h" +#include <linux/pci.h> #include <linux/module.h> #include <linux/ssb/ssb.h> -#include "ssb_private.h" -static const struct pci_device_id b43_pci_bridge_tbl[] = { {PCI_DEVICE (PCI_VENDOR_ID_BROADCOM ,0x4301 ) },
drivers/ssb/bridge_pcmcia_80211.c +3 -3
@@ -6,6 +6,8 @@* Licensed under the GNU/GPL. See COPYING for details. */ +#include "ssb_private.h" +#include <linux/ssb/ssb.h> #include <linux/slab.h> #include <linux/module.h>
@@ -15,8 +17,6 @@#include <pcmcia/ds.h> #include <pcmcia/cisreg.h> -#include "ssb_private.h" -static const struct pcmcia_device_id ssb_host_pcmcia_tbl[] = {PCMCIA_DEVICE_MANF_CARD (0x2D0 ,0x448 ),PCMCIA_DEVICE_MANF_CARD (0x2D0 ,0x476 ),
@@ -70,7 +70,7 @@ static int ssb_host_pcmcia_probe(struct pcmcia_device *dev) err_kfree_ssb:kfree (ssb); out_error: -ssb_err ("Initialization failed (%d, %d)\n" , res, err); +dev_err (&dev->dev,"Initialization failed (%d, %d)\n" , res, err);return err; }
drivers/ssb/driver_chipcommon.c +3 -3
@@ -9,14 +9,14 @@* Licensed under the GNU/GPL. See COPYING for details. */ +#include "ssb_private.h" +#include <linux/ssb/ssb.h> #include <linux/ssb/ssb_regs.h> #include <linux/export.h> #include <linux/pci.h> #include <linux/bcm47xx_wdt.h> -#include "ssb_private.h" -/* Clock sources */ enum ssb_clksrc {
@@ -354,7 +354,7 @@ void ssb_chipcommon_init(struct ssb_chipcommon *cc)if (cc->dev->id.revision >=11 ) cc->status =chipco_read32 (cc,SSB_CHIPCO_CHIPSTAT ); -ssb_dbg ("chipcommon status is 0x%x\n" , cc->status); +dev_dbg (cc->dev->dev,"chipcommon status is 0x%x\n" , cc->status);if (cc->dev->id.revision >=20 ) {chipco_write32 (cc,SSB_CHIPCO_GPIOPULLUP ,0 );
drivers/ssb/driver_chipcommon_pmu.c +15 -15
@@ -8,6 +8,8 @@* Licensed under the GNU/GPL. See COPYING for details. */ +#include "ssb_private.h" +#include <linux/ssb/ssb.h> #include <linux/ssb/ssb_regs.h> #include <linux/ssb/ssb_driver_chipcommon.h>
@@ -17,8 +19,6 @@#include <linux/bcm47xx_nvram.h> #endif -#include "ssb_private.h" -static u32 ssb_chipco_pll_read (struct ssb_chipcommon *cc,u32 offset) {chipco_write32 (cc,SSB_CHIPCO_PLLCTL_ADDR , offset);
@@ -110,7 +110,7 @@ static void ssb_pmu0_pllinit_r0(struct ssb_chipcommon *cc,return ; } -ssb_info ("Programming PLL to %u.%03u MHz\n" , +dev_info (cc->dev->dev,"Programming PLL to %u.%03u MHz\n" , crystalfreq /1000 , crystalfreq %1000 );/* First turn the PLL off. */
@@ -138,7 +138,7 @@ static void ssb_pmu0_pllinit_r0(struct ssb_chipcommon *cc, } tmp =chipco_read32 (cc,SSB_CHIPCO_CLKCTLST );if (tmp &SSB_CHIPCO_CLKCTLST_HAVEHT ) -ssb_emerg ("Failed to turn the PLL off!\n" ); +dev_emerg (cc->dev->dev,"Failed to turn the PLL off!\n" );/* Set PDIV in PLL control 0. */ pllctl =ssb_chipco_pll_read (cc,SSB_PMU0_PLLCTL0 );
@@ -249,7 +249,7 @@ static void ssb_pmu1_pllinit_r0(struct ssb_chipcommon *cc,return ; } -ssb_info ("Programming PLL to %u.%03u MHz\n" , +dev_info (cc->dev->dev,"Programming PLL to %u.%03u MHz\n" , crystalfreq /1000 , crystalfreq %1000 );/* First turn the PLL off. */
@@ -275,7 +275,7 @@ static void ssb_pmu1_pllinit_r0(struct ssb_chipcommon *cc, } tmp =chipco_read32 (cc,SSB_CHIPCO_CLKCTLST );if (tmp &SSB_CHIPCO_CLKCTLST_HAVEHT ) -ssb_emerg ("Failed to turn the PLL off!\n" ); +dev_emerg (cc->dev->dev,"Failed to turn the PLL off!\n" );/* Set p1div and p2div. */ pllctl =ssb_chipco_pll_read (cc,SSB_PMU1_PLLCTL0 );
@@ -349,7 +349,7 @@ static void ssb_pmu_pll_init(struct ssb_chipcommon *cc)case 43222 :break ;default : -ssb_err ("ERROR: PLL init unknown for device %04X\n" , +dev_err (cc->dev->dev,"ERROR: PLL init unknown for device %04X\n" , bus->chip_id); } }
@@ -471,7 +471,7 @@ static void ssb_pmu_resources_init(struct ssb_chipcommon *cc) max_msk =0xFFFFF ;break ;default : -ssb_err ("ERROR: PMU resource config unknown for device %04X\n" , +dev_err (cc->dev->dev,"ERROR: PMU resource config unknown for device %04X\n" , bus->chip_id); }
@@ -524,7 +524,7 @@ void ssb_pmu_init(struct ssb_chipcommon *cc) pmucap =chipco_read32 (cc,SSB_CHIPCO_PMU_CAP ); cc->pmu.rev = (pmucap &SSB_CHIPCO_PMU_CAP_REVISION ); -ssb_dbg ("Found rev %u PMU (capabilities 0x%08X)\n" , +dev_dbg (cc->dev->dev,"Found rev %u PMU (capabilities 0x%08X)\n" , cc->pmu.rev, pmucap);if (cc->pmu.rev ==1 )
@@ -636,7 +636,7 @@ u32 ssb_pmu_get_alp_clock(struct ssb_chipcommon *cc)case 0x5354 :return ssb_pmu_get_alp_clock_clk0 (cc);default : -ssb_err ("ERROR: PMU alp clock unknown for device %04X\n" , +dev_err (cc->dev->dev,"ERROR: PMU alp clock unknown for device %04X\n" , bus->chip_id);return 0 ; }
@@ -651,7 +651,7 @@ u32 ssb_pmu_get_cpu_clock(struct ssb_chipcommon *cc)/* 5354 chip uses a non programmable PLL of frequency 240MHz */ return 240000000 ;default : -ssb_err ("ERROR: PMU cpu clock unknown for device %04X\n" , +dev_err (cc->dev->dev,"ERROR: PMU cpu clock unknown for device %04X\n" , bus->chip_id);return 0 ; }
@@ -665,7 +665,7 @@ u32 ssb_pmu_get_controlclock(struct ssb_chipcommon *cc)case 0x5354 :return 120000000 ;default : -ssb_err ("ERROR: PMU controlclock unknown for device %04X\n" , +dev_err (cc->dev->dev,"ERROR: PMU controlclock unknown for device %04X\n" , bus->chip_id);return 0 ; }
@@ -705,9 +705,9 @@ void ssb_pmu_spuravoid_pllupdate(struct ssb_chipcommon *cc, int spuravoid) pmu_ctl =SSB_CHIPCO_PMU_CTL_PLL_UPD ;break ;default : - ssb_printk(KERN_ERR PFX -"Unknown spuravoidance settings for chip 0x%04X, not changing PLL\n" , - cc->dev->bus->chip_id); +dev_err (cc->dev->dev, +"Unknown spuravoidance settings for chip 0x%04X, not changing PLL\n" , + cc->dev->bus->chip_id);return ; }
drivers/ssb/driver_chipcommon_sflash.c +3 -3
@@ -5,10 +5,10 @@* Licensed under the GNU/GPL. See COPYING for details. */ -#include <linux/ssb/ssb.h> -#include "ssb_private.h" +#include <linux/ssb/ssb.h> +static struct resource ssb_sflash_resource = { .name ="ssb_sflash" , .start =SSB_FLASH2 ,
@@ -80,7 +80,7 @@ static void ssb_sflash_cmd(struct ssb_chipcommon *cc, u32 opcode)return ;cpu_relax (); } -pr_err ("SFLASH control command failed (timeout)!\n" ); +dev_err (cc->dev->dev,"SFLASH control command failed (timeout)!\n" ); }/* Initialize serial flash access */
drivers/ssb/driver_extif.c +2 -2
@@ -10,12 +10,12 @@* Licensed under the GNU/GPL. See COPYING for details. */ +#include "ssb_private.h" +#include <linux/serial.h> #include <linux/serial_core.h> #include <linux/serial_reg.h> -#include "ssb_private.h" -static inline u32 extif_read32 (struct ssb_extif *extif,u16 offset) {
drivers/ssb/driver_gpio.c +2 -2
@@ -8,6 +8,8 @@* Licensed under the GNU/GPL. See COPYING for details. */ +#include "ssb_private.h" +#include <linux/gpio/driver.h> #include <linux/irq.h> #include <linux/interrupt.h>
@@ -15,8 +17,6 @@#include <linux/export.h> #include <linux/ssb/ssb.h> -#include "ssb_private.h" -/************************************************** * Shared
drivers/ssb/driver_mipscore.c +9 -8
@@ -8,6 +8,8 @@* Licensed under the GNU/GPL. See COPYING for details. */ +#include "ssb_private.h" +#include <linux/ssb/ssb.h> #include <linux/mtd/physmap.h>
@@ -19,8 +21,6 @@#include <linux/bcm47xx_nvram.h> #endif -#include "ssb_private.h" -static const char *const part_probes[] = {"bcm47xxpart" ,NULL };static struct physmap_flash_data ssb_pflash_data = {
@@ -170,14 +170,15 @@ static void set_irq(struct ssb_device *dev, unsigned int irq) irqflag |= (ipsflag & ~ipsflag_irq_mask[irq]);ssb_write32 (mdev,SSB_IPSFLAG , irqflag); } -ssb_dbg ("set_irq: core 0x%04x, irq %d => %d\n" , +dev_dbg (dev->dev,"set_irq: core 0x%04x, irq %d => %d\n" , dev->id.coreid, oldirq+2 , irq+2 ); }static void print_irq (struct ssb_device *dev,unsigned int irq) {static const char *irq_name[] = {"2(S)" ,"3" ,"4" ,"5" ,"6" ,"D" ,"I" }; - ssb_dbg("core 0x%04x, irq : %s%s %s%s %s%s %s%s %s%s %s%s %s%s\n", + dev_dbg(dev->dev, + "core 0x%04x, irq : %s%s %s%s %s%s %s%s %s%s %s%s %s%s\n", dev->id.coreid, irq_name[0], irq == 0 ? "*" : " ", irq_name[1], irq == 1 ? "*" : " ",
@@ -229,11 +230,11 @@ static void ssb_mips_flash_detect(struct ssb_mipscore *mcore)switch (bus->chipco.capabilities &SSB_CHIPCO_CAP_FLASHT ) {case SSB_CHIPCO_FLASHT_STSER :case SSB_CHIPCO_FLASHT_ATSER : -pr_debug ("Found serial flash\n" ); +dev_dbg (mcore->dev->dev,"Found serial flash\n" );ssb_sflash_init (&bus->chipco);break ;case SSB_CHIPCO_FLASHT_PARA : -pr_debug ("Found parallel flash\n" ); +dev_dbg (mcore->dev->dev,"Found parallel flash\n" ); pflash->present = true; pflash->window =SSB_FLASH2 ; pflash->window_size =SSB_FLASH2_SZ ;
@@ -299,7 +300,7 @@ void ssb_mipscore_init(struct ssb_mipscore *mcore)if (!mcore->dev)return ;/* We don't have a MIPS core */ -ssb_dbg ("Initializing MIPS core...\n" ); +dev_dbg (mcore->dev->dev,"Initializing MIPS core...\n" ); bus = mcore->dev->bus; hz =ssb_clockspeed (bus);
@@ -347,7 +348,7 @@ void ssb_mipscore_init(struct ssb_mipscore *mcore)break ; } } -ssb_dbg ("after irq reconfiguration\n" ); +dev_dbg (mcore->dev->dev,"after irq reconfiguration\n" );dump_irq (bus);ssb_mips_serial_init (mcore);
drivers/ssb/driver_pcicore.c +9 -8
@@ -8,14 +8,14 @@* Licensed under the GNU/GPL. See COPYING for details. */ +#include "ssb_private.h" +#include <linux/ssb/ssb.h> #include <linux/pci.h> #include <linux/export.h> #include <linux/delay.h> #include <linux/ssb/ssb_embedded.h> -#include "ssb_private.h" -static u32 ssb_pcie_read (struct ssb_pcicore *pc,u32 address);static void ssb_pcie_write (struct ssb_pcicore *pc,u32 address,u32 data);static u16 ssb_pcie_mdio_read (struct ssb_pcicore *pc,u8 device,u8 address);
@@ -263,7 +263,7 @@ int ssb_pcicore_plat_dev_init(struct pci_dev *d)return -ENODEV ; } -ssb_info ("PCI: Fixing up device %s\n" ,pci_name (d)); +dev_info (&d->dev,"PCI: Fixing up device %s\n" ,pci_name (d));/* Fix up interrupt lines */ d->irq =ssb_mips_irq (extpci_core->dev) +2 ;
@@ -284,12 +284,12 @@ static void ssb_pcicore_fixup_pcibridge(struct pci_dev *dev)if (dev->bus->number !=0 ||PCI_SLOT (dev->devfn) !=0 )return ; -ssb_info ("PCI: Fixing up bridge %s\n" ,pci_name (dev)); +dev_info (&dev->dev,"PCI: Fixing up bridge %s\n" ,pci_name (dev));/* Enable PCI bridge bus mastering and memory space */ pci_set_master (dev);if (pcibios_enable_device (dev, ~0 ) <0 ) { -ssb_err ("PCI: SSB bridge enable failed\n" ); +dev_err (&dev->dev,"PCI: SSB bridge enable failed\n" );return ; }
@@ -298,7 +298,8 @@ static void ssb_pcicore_fixup_pcibridge(struct pci_dev *dev)/* Make sure our latency is high enough to handle the devices behind us */ lat =168 ; -ssb_info ("PCI: Fixing latency timer of device %s to %u\n" , +dev_info (&dev->dev, +"PCI: Fixing latency timer of device %s to %u\n" ,pci_name (dev), lat);pci_write_config_byte (dev,PCI_LATENCY_TIMER , lat); }
@@ -322,7 +323,7 @@ static void ssb_pcicore_init_hostmode(struct ssb_pcicore *pc)return ; extpci_core = pc; -ssb_dbg ("PCIcore in host mode found\n" ); +dev_dbg (pc->dev->dev,"PCIcore in host mode found\n" );/* Reset devices on the external PCI bus */ val =SSB_PCICORE_CTL_RST_OE ; val |=SSB_PCICORE_CTL_CLK_OE ;
@@ -337,7 +338,7 @@ static void ssb_pcicore_init_hostmode(struct ssb_pcicore *pc)udelay (1 );/* Assertion time demanded by the PCI standard */ if (pc->dev->bus->has_cardbus_slot) { -ssb_dbg ("CardBus slot detected\n" ); +dev_dbg (pc->dev->dev,"CardBus slot detected\n" ); pc->cardbusmode =1 ;/* GPIO 1 resets the bridge */ ssb_gpio_out (pc->dev->bus,1 ,1 );
drivers/ssb/embedded.c +4 -4
@@ -9,6 +9,8 @@* Licensed under the GNU/GPL. See COPYING for details. */ +#include "ssb_private.h" +#include <linux/export.h> #include <linux/platform_device.h> #include <linux/ssb/ssb.h>
@@ -17,8 +19,6 @@#include <linux/ssb/ssb_driver_gige.h> #include <linux/pci.h> -#include "ssb_private.h" -int ssb_watchdog_timer_set (struct ssb_bus *bus,u32 ticks) {
@@ -57,8 +57,8 @@ int ssb_watchdog_register(struct ssb_bus *bus) bus->busnumber, &wdt, sizeof(wdt));if (IS_ERR (pdev)) { -ssb_dbg ("can not register watchdog device, err: %li\n" , -PTR_ERR (pdev)); +pr_debug ("can not register watchdog device, err: %li\n" , +PTR_ERR (pdev));return PTR_ERR (pdev); }
drivers/ssb/host_soc.c +2 -2
@@ -8,11 +8,11 @@* Licensed under the GNU/GPL. See COPYING for details. */ +#include "ssb_private.h" +#include <linux/bcm47xx_nvram.h> #include <linux/ssb/ssb.h> -#include "ssb_private.h" -static u8 ssb_host_soc_read8 (struct ssb_device *dev,u16 offset) {struct ssb_bus *bus = dev->bus;
drivers/ssb/main.c +25 -20
131 lines not on this page · raw message
drivers/ssb/pci.c +27 -29
160 lines not on this page · raw message
drivers/ssb/pcmcia.c +22 -26
129 lines not on this page · raw message
drivers/ssb/scan.c +16 -18
@@ -12,6 +12,8 @@* Licensed under the GNU/GPL. See COPYING for details. */ +#include "ssb_private.h" +#include <linux/ssb/ssb.h> #include <linux/ssb/ssb_regs.h> #include <linux/pci.h>
@@ -20,8 +22,6 @@#include <pcmcia/cistpl.h> #include <pcmcia/ds.h> -#include "ssb_private.h" -const char *ssb_core_name (u16 coreid) {
@@ -125,7 +125,7 @@ static u16 pcidev_to_chipid(struct pci_dev *pci_dev) chipid_fallback =0x4401 ;break ;default : -ssb_err ("PCI-ID not in fallback list\n" ); +dev_err (&pci_dev->dev,"PCI-ID not in fallback list\n" ); }return chipid_fallback;
@@ -151,7 +151,7 @@ static u8 chipid_to_nrcores(u16 chipid)case 0x4704 :return 9 ;default : -ssb_err ("CHIPID not in nrcores fallback list\n" ); +pr_err ("CHIPID not in nrcores fallback list\n" ); }return 1 ;
@@ -318,13 +318,13 @@ int ssb_bus_scan(struct ssb_bus *bus, bus->chip_package =0 ; } } -ssb_info ("Found chip with id 0x%04X, rev 0x%02X and package 0x%02X\n" , - bus->chip_id, bus->chip_rev, bus->chip_package); +pr_info ("Found chip with id 0x%04X, rev 0x%02X and package 0x%02X\n" , + bus->chip_id, bus->chip_rev, bus->chip_package);if (!bus->nr_devices) bus->nr_devices =chipid_to_nrcores (bus->chip_id);if (bus->nr_devices >ARRAY_SIZE (bus->devices)) { -ssb_err ("More than %d ssb cores found (%d)\n" , -SSB_MAX_NR_CORES , bus->nr_devices); +pr_err ("More than %d ssb cores found (%d)\n" , +SSB_MAX_NR_CORES , bus->nr_devices); goto err_unmap; }if (bus->bustype ==SSB_BUSTYPE_SSB ) {
@@ -355,18 +355,16 @@ int ssb_bus_scan(struct ssb_bus *bus, dev->bus = bus; dev->ops = bus->ops; - printk(KERN_DEBUG PFX -"Core %d found: %s " -"(cc 0x%03X, rev 0x%02X, vendor 0x%04X)\n" , - i,ssb_core_name (dev->id.coreid), - dev->id.coreid, dev->id.revision, dev->id.vendor); +pr_debug ("Core %d found: %s (cc 0x%03X, rev 0x%02X, vendor 0x%04X)\n" , + i,ssb_core_name (dev->id.coreid), + dev->id.coreid, dev->id.revision, dev->id.vendor);switch (dev->id.coreid) {case SSB_DEV_80211 : nr_80211_cores++;if (nr_80211_cores >1 ) {if (!we_support_multiple_80211_cores (bus)) { -ssb_dbg ("Ignoring additional 802.11 core\n" ); +pr_debug ("Ignoring additional 802.11 core\n" );continue ; } }
@@ -374,7 +372,7 @@ int ssb_bus_scan(struct ssb_bus *bus,case SSB_DEV_EXTIF :#ifdef CONFIG_SSB_DRIVER_EXTIF if (bus->extif.dev) { -ssb_warn ("WARNING: Multiple EXTIFs found\n" ); +pr_warn ("WARNING: Multiple EXTIFs found\n" );break ; } bus->extif.dev = dev;
@@ -382,7 +380,7 @@ int ssb_bus_scan(struct ssb_bus *bus,break ;case SSB_DEV_CHIPCOMMON :if (bus->chipco.dev) { -ssb_warn ("WARNING: Multiple ChipCommon found\n" ); +pr_warn ("WARNING: Multiple ChipCommon found\n" );break ; } bus->chipco.dev = dev;
@@ -391,7 +389,7 @@ int ssb_bus_scan(struct ssb_bus *bus,case SSB_DEV_MIPS_3302 :#ifdef CONFIG_SSB_DRIVER_MIPS if (bus->mipscore.dev) { -ssb_warn ("WARNING: Multiple MIPS cores found\n" ); +pr_warn ("WARNING: Multiple MIPS cores found\n" );break ; } bus->mipscore.dev = dev;
@@ -412,7 +410,7 @@ int ssb_bus_scan(struct ssb_bus *bus, } }if (bus->pcicore.dev) { -ssb_warn ("WARNING: Multiple PCI(E) cores found\n" ); +pr_warn ("WARNING: Multiple PCI(E) cores found\n" );break ; } bus->pcicore.dev = dev;
drivers/ssb/sdio.c +2 -2
@@ -12,14 +12,14 @@* */ +#include "ssb_private.h" +#include <linux/ssb/ssb.h> #include <linux/delay.h> #include <linux/io.h> #include <linux/etherdevice.h> #include <linux/mmc/sdio_func.h> -#include "ssb_private.h" -/* Define the following to 1 to enable a printk on each coreswitch. */ #define SSB_VERBOSE_SDIOCORESWITCH_DEBUG 0
drivers/ssb/sprom.c +2 -2
@@ -127,13 +127,13 @@ ssize_t ssb_attr_sprom_store(struct ssb_bus *bus, goto out_kfree; err =ssb_devices_freeze (bus, &freeze);if (err) { -ssb_err ("SPROM write: Could not freeze all devices\n" ); +pr_err ("SPROM write: Could not freeze all devices\n" ); goto out_unlock; } res =sprom_write (bus, sprom); err =ssb_devices_thaw (&freeze);if (err) -ssb_err ("SPROM write: Could not thaw all devices\n" ); +pr_err ("SPROM write: Could not thaw all devices\n" ); out_unlock:mutex_unlock (&bus->sprom_mutex); out_kfree:
drivers/ssb/ssb_private.h +3 -27
@@ -2,37 +2,13 @@#ifndef LINUX_SSB_PRIVATE_H_ #define LINUX_SSB_PRIVATE_H_ +#define PFX "ssb: " +#define pr_fmt (fmt) PFX fmt +#include <linux/ssb/ssb.h> #include <linux/types.h> #include <linux/bcm47xx_wdt.h> - -#define PFX "ssb: " - -#ifdef CONFIG_SSB_SILENT -# define ssb_printk (fmt, ...) \ - do { if (0) printk(fmt, ##__VA_ARGS__); } while (0) -#else -# define ssb_printk (fmt, ...) \ - printk(fmt, ##__VA_ARGS__) -#endif /* CONFIG_SSB_SILENT */ - -#define ssb_emerg (fmt, ...) ssb_printk(KERN_EMERG PFX fmt, ##__VA_ARGS__) -#define ssb_err (fmt, ...) ssb_printk(KERN_ERR PFX fmt, ##__VA_ARGS__) -#define ssb_warn (fmt, ...) ssb_printk(KERN_WARNING PFX fmt, ##__VA_ARGS__) -#define ssb_notice (fmt, ...) ssb_printk(KERN_NOTICE PFX fmt, ##__VA_ARGS__) -#define ssb_info (fmt, ...) ssb_printk(KERN_INFO PFX fmt, ##__VA_ARGS__) -#define ssb_cont (fmt, ...) ssb_printk(KERN_CONT fmt, ##__VA_ARGS__) - -/* dprintk: Debugging printk; vanishes for non-debug compilation */ -#ifdef CONFIG_SSB_DEBUG -# define ssb_dbg (fmt, ...) \ - ssb_printk(KERN_DEBUG PFX fmt, ##__VA_ARGS__) -#else -# define ssb_dbg (fmt, ...) \ - do { if (0) printk(KERN_DEBUG PFX fmt, ##__VA_ARGS__); } while (0) -#endif -#ifdef CONFIG_SSB_DEBUG # define SSB_WARN_ON (x) WARN_ON(x)# define SSB_BUG_ON (x) BUG_ON(x)
Signature · 7 lines
2.18.0 -- Michael
Quoted 9 lines · Michael B=C3=BCsch <[email protected]> writes:
Replace the ssb printk wrappers by standard print helpers. Also remove
SSB_SILENT. Nobody should use it anyway.Originally submitted by Joe Perches <[email protected]>. Modified to add
dev_... based printks.Signed-off-by Michael Buesch <[email protected]>Tested-by Michael Buesch <[email protected]>Cc Joe Perches <[email protected]>
Applied manually:
4d77a89e3924 b43legacy/leds: Ensure NUL-termination of LED name string
--=20
Kalle Valo
Quoted 8 lines · Kalle Valo
Quoted 6 lines · Michael B=C3=BCsch <[email protected]> writes:
Replace the ssb printk wrappers by standard print helpers. Also remove
SSB_SILENT. Nobody should use it anyway.Originally submitted by Joe Perches <[email protected]>. Modified to add
dev_... based printks.
Quoted 7 lines
Quoted 3 lines
Signed-off-by Michael Buesch <[email protected]>Tested-by Michael Buesch <[email protected]>Cc Joe Perches <[email protected]>Applied manually:
4d77a89e3924b43legacy/leds: Ensure NUL-termination of LED name string
Heh, a copy paste error. Shows that I should not be applying anything manually. Anyway, the correct commit id is:
b8b6069cf208 ssb: Remove home-grown printk wrappers
--=20
Kalle Valo