ARM: OMAP: smatch warning cleanup and string unwrapping
Subsystems (8)
Paul Walmsley
maintainercover ARM: OMAP: smatch warning cleanup and string unwrapping
This series fixes several bugs uncovered by smatch. It also unwraps all of the wrapped strings across the arch/arm/*omap* codebase. Some warning messages have been reformatted for concision and consistency. And some printk(KERN_* ... have been converted to pr_*( ...
This series is intended for v3.7 cleanup. It has been only lightly tested; a pull request will be sent after testing is completed.
- Paul
---
warnings_cleanup_3.7
text data bss dec hex filename
7318144 764324 5613004 13695472 d0f9f0 vmlinux.omap2plus_defconfig.orig
7318188 764348 5613004 13695540 d0fa34 vmlinux.omap2plus_defconfig
Paul Walmsley (2):
ARM: OMAP: clean up some smatch warnings, fix some printk(KERN_ERR ...
ARM: OMAP: unwrap strings
arch/arm/mach-omap1/board-htcherald.c | 3 - arch/arm/mach-omap1/clock.c | 4 + arch/arm/mach-omap1/clock_data.c | 13 ++--- arch/arm/mach-omap1/dma.c | 5 +- arch/arm/mach-omap1/lcd_dma.c | 15 +---- arch/arm/mach-omap1/leds-h2p2-debug.c | 12 +++- arch/arm/mach-omap2/board-n8x0.c | 7 +-- arch/arm/mach-omap2/board-overo.c | 6 +- arch/arm/mach-omap2/board-zoom-debugboard.c | 7 +-- arch/arm/mach-omap2/clkt34xx_dpll3m2.c | 10 +--- arch/arm/mach-omap2/clkt_clksel.c | 28 +++++----- arch/arm/mach-omap2/clkt_dpll.c | 8 +-- arch/arm/mach-omap2/clock.c | 20 +++---- arch/arm/mach-omap2/clock3xxx.c | 3 - arch/arm/mach-omap2/clockdomain.c | 74 ++++++++++++--------------- arch/arm/mach-omap2/common-board-devices.c | 3 - arch/arm/mach-omap2/dpll3xxx.c | 7 ++- arch/arm/mach-omap2/gpio.c | 1 arch/arm/mach-omap2/gpmc.c | 5 +- arch/arm/mach-omap2/id.c | 5 +- arch/arm/mach-omap2/irq.c | 5 +- arch/arm/mach-omap2/omap_hwmod.c | 16 +++--- arch/arm/mach-omap2/opp.c | 15 ++--- arch/arm/mach-omap2/pm.c | 4 + arch/arm/mach-omap2/pm34xx.c | 8 +-- arch/arm/mach-omap2/pm44xx.c | 8 +-- arch/arm/mach-omap2/powerdomain.c | 36 ++++++------- arch/arm/mach-omap2/powerdomain2xxx_3xxx.c | 4 + arch/arm/mach-omap2/powerdomain44xx.c | 4 + arch/arm/mach-omap2/prcm.c | 8 +-- arch/arm/mach-omap2/serial.c | 12 +++- arch/arm/mach-omap2/sr_device.c | 13 ++--- arch/arm/mach-omap2/timer.c | 2 - arch/arm/mach-omap2/vc.c | 5 +- arch/arm/mach-omap2/voltage.c | 12 ++-- arch/arm/mach-omap2/vp.c | 16 +++--- arch/arm/plat-omap/dma.c | 61 +++++++++------------- arch/arm/plat-omap/mux.c | 2 - arch/arm/plat-omap/omap-pm-noop.c | 39 +++++++------- arch/arm/plat-omap/omap_device.c | 25 ++++----- 40 files changed, 239 insertions(+), 292 deletions(-)
Paul Walmsley
maintainerPATCH 1/2 ARM: OMAP: clean up some smatch warnings, fix some printk(KERN_ERR ...
Resolve the following warnings from smatch:
arch/arm/mach-omap2/gpmc.c:282 gpmc_cs_set_timings() info: why not propagate 'div' from gpmc_cs_calc_divider() instead of -1? arch/arm/mach-omap2/gpmc.c:456 gpmc_cs_free() info: ignoring unreachable code.arch/arm/mach-omap2/gpmc.c:456 gpmc_cs_free() info: ignoring unreachable code.arch/arm/mach-omap2/serial.c:328 omap_serial_init_port() error: 'pdev' dereferencing possible ERR_PTR() arch/arm/mach-omap2/timer.c:213 omap2_gp_clockevent_init() Error invalid range 4096 to -1 arch/arm/mach-omap2/gpio.c:63 omap2_gpio_dev_init() warn: possible memory leak of 'pdata' arch/arm/mach-omap2/omap_hwmod.c:1478 _assert_hardreset() warn: assigning -22 to unsigned variable 'ret' arch/arm/mach-omap2/omap_hwmod.c:1487 _assert_hardreset() warn: 4294963201 is more than 255 (max '(ret)' can be) so this is always the same. arch/arm/mach-omap2/omap_hwmod.c:1545 _read_hardreset() warn: assigning -22 to unsigned variable 'ret' arch/arm/mach-omap2/omap_hwmod.c:1554 _read_hardreset() warn: 4294963201 is more than 255 (max '(ret)' can be) so this is always the same. arch/arm/mach-omap2/dpll3xxx.c:629 omap3_clkoutx2_recalc() error: we previously assumed 'pclk' could be null (see line 627) arch/arm/mach-omap2/board-n8x0.c:422 n8x0_mmc_late_init() Error invalid range 14 to 13 arch/arm/mach-omap1/leds-h2p2-debug.c:71 h2p2_dbg_leds_event() error: potentially derefencing uninitialized 'fpga'. arch/arm/mach-omap1/lcd_dma.c:97 omap_set_lcd_dma_b1_rotation() info: ignoring unreachable code. arch/arm/mach-omap1/lcd_dma.c:157 set_b1_regs() info: ignoring unreachable code.arch/arm/mach-omap1/lcd_dma.c:237 set_b1_regs() info: ignoring unreachable code.arch/arm/mach-omap1/lcd_dma.c:313 omap_request_lcd_dma() info: ignoring unreachable code. arch/arm/mach-omap1/lcd_dma.c:340 omap_free_lcd_dma() info: ignoring unreachable code.arch/arm/plat-omap/dma.c:200 omap_set_dma_priority() info: ignoring unreachable code.arch/arm/plat-omap/dma.c:567 omap_set_dma_dest_burst_mode() info: ignoring unreachable code. arch/arm/plat-omap/dma.c:1152 omap_dma_link_lch() info: ignoring unreachable code.arch/arm/plat-omap/dma.c:1179 omap_dma_unlink_lch() info: ignoring unreachable code.arch/arm/plat-omap/mux.c:79 omap_cfg_reg() Error invalid range 4096 to -1arch/arm/plat-omap/dma.c:200 omap_set_dma_priority() info: ignoring unreachable code.arch/arm/plat-omap/dma.c:567 omap_set_dma_dest_burst_mode() info: ignoring unreachable code.
Also, convert some nearby "printk(KERN_ERR ..." into "pr_err( ...", and unwrap some strings.
--- arch/arm/mach-omap1/lcd_dma.c | 9 ++------- arch/arm/mach-omap1/leds-h2p2-debug.c | 12 +++++++----- arch/arm/mach-omap2/dpll3xxx.c | 7 +++++-- arch/arm/mach-omap2/gpio.c | 1 + arch/arm/mach-omap2/gpmc.c | 5 ++--- arch/arm/mach-omap2/omap_hwmod.c | 12 ++++++------ arch/arm/mach-omap2/serial.c | 7 +++++-- arch/arm/mach-omap2/timer.c | 2 +- arch/arm/plat-omap/dma.c | 19 ++++++------------- arch/arm/plat-omap/mux.c | 2 +- 10 files changed, 36 insertions(+), 40 deletions(-)
arch/arm/mach-omap1/lcd_dma.c +2 -7
@@ -94,7 +94,6 @@ void omap_set_lcd_dma_b1_rotation(int rotate)if (cpu_is_omap15xx ()) {printk (KERN_ERR "DMA rotation is not supported in 1510 mode\n" );BUG (); -return ; } lcd_dma.rotate = rotate; }
@@ -154,7 +153,6 @@ static void set_b1_regs(void)break ;default :BUG (); -return ; } vxres = lcd_dma.vxres ? lcd_dma.vxres : lcd_dma.xres;
@@ -234,7 +232,6 @@ static void set_b1_regs(void)break ;default :BUG (); -return ;/* Suppress warning about uninitialized vars */ }if (cpu_is_omap15xx ()) {
@@ -308,9 +305,8 @@ int omap_request_lcd_dma(void (*callback)(u16 status, void *data),spin_lock_irq (&lcd_dma.lock);if (lcd_dma.reserved) {spin_unlock_irq (&lcd_dma.lock); -printk (KERN_ERR "LCD DMA channel already reserved\n" ); +pr_err ("LCD DMA channel already reserved\n" );BUG (); -return -EBUSY ; } lcd_dma.reserved =1 ;spin_unlock_irq (&lcd_dma.lock);
@@ -335,9 +331,8 @@ void omap_free_lcd_dma(void)spin_lock (&lcd_dma.lock);if (!lcd_dma.reserved) {spin_unlock (&lcd_dma.lock); -printk (KERN_ERR "LCD DMA is not reserved\n" ); +pr_err ("LCD DMA is not reserved\n" );BUG (); -return ; }if (!cpu_is_omap15xx ()) omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) & ~1,
arch/arm/mach-omap1/leds-h2p2-debug.c +7 -5
@@ -68,11 +68,13 @@ void h2p2_dbg_leds_event(led_event_t evt)gpio_set_value (GPIO_IDLE ,0 ); } -__raw_writew (~0 , &fpga->leds); led_state &= ~LED_STATE_ENABLED ; -if (evt == led_halted) { -iounmap (fpga); - fpga =NULL ; +if (fpga) { +__raw_writew (~0 , &fpga->leds); +if (evt == led_halted) { +iounmap (fpga); + fpga =NULL ; + } } goto done;
@@ -158,7 +160,7 @@ void h2p2_dbg_leds_event(led_event_t evt)/* * Actually burn the LEDs */ -if (led_state &LED_STATE_ENABLED ) +if (led_state &LED_STATE_ENABLED && fpga)__raw_writew (~hw_led_state, &fpga->leds); done:
arch/arm/mach-omap2/dpll3xxx.c +5 -2
@@ -623,8 +623,11 @@ unsigned long omap3_clkoutx2_recalc(struct clk *clk)while (pclk && !pclk->dpll_data) pclk = pclk->parent; -/* clk does not have a DPLL as a parent? */ -WARN_ON (!pclk); +/* clk does not have a DPLL as a parent? error in the clock data */ +if (!pclk) { +WARN_ON (1 ); +return 0 ; + } dd = pclk->dpll_data;
arch/arm/mach-omap2/gpio.c +1 -0
@@ -60,6 +60,7 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) pdata->regs =kzalloc (sizeof (struct omap_gpio_reg_offs ),GFP_KERNEL );if (!pdata->regs) {pr_err ("gpio%d: Memory allocation failed\n" , id); +kfree (pdata);return -ENOMEM ; }
arch/arm/mach-omap2/gpmc.c +2 -3
@@ -279,7 +279,7 @@ int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t) div =gpmc_cs_calc_divider (cs, t->sync_clk);if (div <0 ) -return -1 ; +return div;GPMC_SET_ONE (GPMC_CS_CONFIG2 ,0 ,3 , cs_on);GPMC_SET_ONE (GPMC_CS_CONFIG2 ,8 ,12 , cs_rd_off);
@@ -451,9 +451,8 @@ void gpmc_cs_free(int cs) {spin_lock (&gpmc_mem_lock);if (cs >=GPMC_CS_NUM || cs <0 || !gpmc_cs_reserved (cs)) { -printk (KERN_ERR "Trying to free non-reserved GPMC CS%d\n" , cs); -BUG ();spin_unlock (&gpmc_mem_lock); +pr_err ("Trying to free non-reserved GPMC CS%d\n" , cs);return ; }gpmc_cs_disable_mem (cs);
arch/arm/mach-omap2/omap_hwmod.c +6 -6
@@ -1438,8 +1438,8 @@ static int _init_clocks(struct omap_hwmod *oh, void *data)* Return the bit position of the reset line that match the * input name. Return -ENOENT if not found. */ -static u8 _lookup_hardreset (struct omap_hwmod *oh,const char *name, -struct omap_hwmod_rst_info *ohri) +static int _lookup_hardreset (struct omap_hwmod *oh,const char *name, +struct omap_hwmod_rst_info *ohri) {int i;
@@ -1475,7 +1475,7 @@ static u8 _lookup_hardreset(struct omap_hwmod *oh, const char *name,static int _assert_hardreset (struct omap_hwmod *oh,const char *name) {struct omap_hwmod_rst_info ohri; -u8 ret = -EINVAL ; +int ret = -EINVAL ;if (!oh)return -EINVAL ;
@@ -1484,7 +1484,7 @@ static int _assert_hardreset(struct omap_hwmod *oh, const char *name)return -ENOSYS ; ret =_lookup_hardreset (oh, name, &ohri); -if (IS_ERR_VALUE (ret)) +if (ret <0 )return ret; ret = soc_ops.assert_hardreset (oh, &ohri);
@@ -1542,7 +1542,7 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name)static int _read_hardreset (struct omap_hwmod *oh,const char *name) {struct omap_hwmod_rst_info ohri; -u8 ret = -EINVAL ; +int ret = -EINVAL ;if (!oh)return -EINVAL ;
@@ -1551,7 +1551,7 @@ static int _read_hardreset(struct omap_hwmod *oh, const char *name)return -ENOSYS ; ret =_lookup_hardreset (oh, name, &ohri); -if (IS_ERR_VALUE (ret)) +if (ret <0 )return ret;return soc_ops.is_hardreset_asserted (oh, &ohri);
arch/arm/mach-omap2/serial.c +5 -2
@@ -313,8 +313,11 @@ void __init omap_serial_init_port(struct omap_board_data *bdata, pdev =omap_device_build (name, uart->num, oh, pdata, pdata_size,NULL ,0 , false); -WARN (IS_ERR (pdev),"Could not build omap_device for %s: %s.\n" , - name, oh->name); +if (IS_ERR (pdev)) { +WARN (1 ,"Could not build omap_device for %s: %s.\n" , name, + oh->name); +return ; + }if ((console_uart_id == bdata->id) && no_console_suspend)omap_device_disable_idle_on_suspend (pdev);
arch/arm/mach-omap2/timer.c +1 -1
@@ -211,7 +211,7 @@ static void __init omap2_gp_clockevent_init(int gptimer_id, res =omap_dm_timer_init_one (&clkev, gptimer_id, fck_source);BUG_ON (res); - omap2_gp_timer_irq.dev_id = (void *)&clkev; + omap2_gp_timer_irq.dev_id = &clkev;setup_irq (clkev.irq, &omap2_gp_timer_irq);__omap_dm_timer_int_enable (&clkev,OMAP_TIMER_INT_OVERFLOW );
arch/arm/plat-omap/dma.c +6 -13
@@ -197,7 +197,6 @@ void omap_set_dma_priority(int lch, int dst_port, int priority)break ;default :BUG (); -return ; } l =omap_readl (reg); l &= ~(0xf <<8 );
@@ -562,9 +561,8 @@ void omap_set_dma_dest_burst_mode(int lch, enum omap_dma_burst_mode burst_mode)* fall through */ default : -printk (KERN_ERR "Invalid DMA burst mode\n" ); +pr_err ("Invalid DMA burst mode\n" );BUG (); -return ; } l |= (burst <<14 ); p->dma_write (l,CSDP , lch);
@@ -1147,15 +1145,13 @@ void omap_dma_link_lch(int lch_head, int lch_queue) CCR, lch_head);return ; } -printk (KERN_ERR "DMA linking is not supported in 1510 mode\n" ); +pr_err ("DMA linking is not supported in 1510 mode\n" );BUG (); -return ; }if ((dma_chan[lch_head].dev_id ==-1 ) || (dma_chan[lch_queue].dev_id ==-1 )) { -printk (KERN_ERR "omap_dma: trying to link " -"non requested channels\n" ); +pr_err ("omap_dma: trying to link non requested channels\n" );dump_stack (); }
@@ -1174,22 +1170,19 @@ void omap_dma_unlink_lch(int lch_head, int lch_queue) CCR, lch_head);return ; } -printk (KERN_ERR "DMA linking is not supported in 1510 mode\n" ); +pr_err ("DMA linking is not supported in 1510 mode\n" );BUG (); -return ; }if (dma_chan[lch_head].next_lch != lch_queue || dma_chan[lch_head].next_lch ==-1 ) { -printk (KERN_ERR "omap_dma: trying to unlink " -"non linked channels\n" ); +pr_err ("omap_dma: trying to unlink non linked channels\n" );dump_stack (); }if ((dma_chan[lch_head].flags &OMAP_DMA_ACTIVE ) || (dma_chan[lch_queue].flags &OMAP_DMA_ACTIVE )) { -printk (KERN_ERR "omap_dma: You need to stop the DMA channels " -"before unlinking\n" ); +pr_err ("omap_dma: You need to stop the DMA channels before unlinking\n" );dump_stack (); }
arch/arm/plat-omap/mux.c +1 -1
@@ -76,7 +76,7 @@ int __init_or_module omap_cfg_reg(const unsigned long index)return -ENODEV ; } - reg = (struct pin_config *)&mux_cfg->pins[index]; + reg = &mux_cfg->pins[index];if (!mux_cfg->cfg_reg)return -ENODEV ;
Tony Lindgren
maintainerPATCH 1/2 ARM: OMAP: clean up some smatch warnings, fix some printk(KERN_ERR ...
Quoted 19 lines · Paul Walmsley
arch/arm/mach-omap1/lcd_dma.c +0
-2@@ -94,7 +94,6 @@ void omap_set_lcd_dma_b1_rotation(int rotate)if (cpu_is_omap15xx ()) {printk (KERN_ERR "DMA rotation is not supported in 1510 mode\n" );BUG (); -return ; } lcd_dma.rotate = rotate; }@@ -154,7 +153,6 @@ static void set_b1_regs(void)break ;default :BUG (); -return ; } vxres = lcd_dma.vxres ? lcd_dma.vxres : lcd_dma.xres;
arch/arm/mach-omap1/lcd_dma.c static void set_b1_regs(void) · line 237
Quoted 7 lines
arch/arm/mach-omap1/lcd_dma.c +0
-1@@ -234,7 +232,6 @@ static void set_b1_regs(void)break ;default :BUG (); -return ;/* Suppress warning about uninitialized vars */ }if (cpu_is_omap15xx ()) {
I think these will cause new randconfig warnings without CONFIG_BUG set.
Tony
Paul Walmsley
maintainerPATCH 1/2 ARM: OMAP: clean up some smatch warnings, fix some printk(KERN_ERR ...
Quoted 1 line · Tony Lindgren
I think these will cause new randconfig warnings without
CONFIG_BUGset.
Thanks for the comment. Did not know BUG() could be disabled. Will drop those changes.
- Paul
Paul Walmsley
maintainerPATCH 2/2 ARM: OMAP: unwrap strings
In reply to Paul WalmsleyFind and unwrap wrapped strings in the style:
pr_debug("clockdomain: hardware cannot set/clear wake up of "
"%s when %s wakes up\n", clkdm1->name, clkdm2->name);Keeping these strings contiguous seems to be the current Linux kernel policy.
The offending lines were found with the following command:
pcregrep -rnM '"\s*$\s*"' arch/arm/*omap*
While here, some messages have been clarified, some pr_warning( ... calls have been converted to pr_warn( ..., and some printk(KERN_* ... have been converted to pr_*.
--- arch/arm/mach-omap1/board-htcherald.c | 3 - arch/arm/mach-omap1/clock.c | 4 + arch/arm/mach-omap1/clock_data.c | 13 ++--- arch/arm/mach-omap1/dma.c | 5 +- arch/arm/mach-omap1/lcd_dma.c | 6 +- arch/arm/mach-omap2/board-n8x0.c | 7 +-- arch/arm/mach-omap2/board-overo.c | 6 +- arch/arm/mach-omap2/board-zoom-debugboard.c | 7 +-- arch/arm/mach-omap2/clkt34xx_dpll3m2.c | 10 +--- arch/arm/mach-omap2/clkt_clksel.c | 28 +++++----- arch/arm/mach-omap2/clkt_dpll.c | 8 +-- arch/arm/mach-omap2/clock.c | 20 +++---- arch/arm/mach-omap2/clock3xxx.c | 3 - arch/arm/mach-omap2/clockdomain.c | 74 ++++++++++++--------------- arch/arm/mach-omap2/common-board-devices.c | 3 - arch/arm/mach-omap2/id.c | 5 +- arch/arm/mach-omap2/irq.c | 5 +- arch/arm/mach-omap2/omap_hwmod.c | 4 + arch/arm/mach-omap2/opp.c | 15 ++--- arch/arm/mach-omap2/pm.c | 4 + arch/arm/mach-omap2/pm34xx.c | 8 +-- arch/arm/mach-omap2/pm44xx.c | 8 +-- arch/arm/mach-omap2/powerdomain.c | 36 ++++++------- arch/arm/mach-omap2/powerdomain2xxx_3xxx.c | 4 + arch/arm/mach-omap2/powerdomain44xx.c | 4 + arch/arm/mach-omap2/prcm.c | 8 +-- arch/arm/mach-omap2/serial.c | 5 +- arch/arm/mach-omap2/sr_device.c | 13 ++--- arch/arm/mach-omap2/vc.c | 5 +- arch/arm/mach-omap2/voltage.c | 12 ++-- arch/arm/mach-omap2/vp.c | 16 +++--- arch/arm/plat-omap/dma.c | 42 +++++++-------- arch/arm/plat-omap/omap-pm-noop.c | 39 +++++++------- arch/arm/plat-omap/omap_device.c | 25 ++++----- 34 files changed, 203 insertions(+), 252 deletions(-)
arch/arm/mach-omap1/board-htcherald.c +1 -2
@@ -476,8 +476,7 @@ static void __init htcherald_lcd_init(void)break ; }if (!tries) -printk (KERN_WARNING "Timeout waiting for end of frame " -"-- LCD may not be available\n" ); +pr_err ("Timeout waiting for end of frame -- LCD may not be available\n" );/* turn off DMA */ reg =omap_readw (OMAP_DMA_LCD_CCR );
arch/arm/mach-omap1/clock.c +2 -2
@@ -587,8 +587,8 @@ void omap1_clk_disable_unused(struct clk *clk)/* Clocks in the DSP domain need api_ck. Just assume bootloader * has not enabled any DSP clocks */ if (clk->enable_reg ==DSP_IDLECT2 ) { -printk (KERN_INFO "Skipping reset check for DSP domain " -"clock \"%s\"\n" , clk->name); +pr_info ("Skipping reset check for DSP domain clock \"%s\"\n" , + clk->name);return ; }
arch/arm/mach-omap1/clock_data.c +6 -7
@@ -776,11 +776,10 @@ static struct clk_functions omap1_clk_functions = {static void __init omap1_show_rates (void ) { -pr_notice ("Clocking rate (xtal/DPLL1/MPU): " -"%ld.%01ld/%ld.%01ld/%ld.%01ld MHz\n" , - ck_ref.rate /1000000 , (ck_ref.rate /100000 ) %10 , - ck_dpll1.rate /1000000 , (ck_dpll1.rate /100000 ) %10 , - arm_ck.rate /1000000 , (arm_ck.rate /100000 ) %10 ); +pr_notice ("Clocking rate (xtal/DPLL1/MPU): %ld.%01ld/%ld.%01ld/%ld.%01ld MHz\n" , + ck_ref.rate /1000000 , (ck_ref.rate /100000 ) %10 , + ck_dpll1.rate /1000000 , (ck_dpll1.rate /100000 ) %10 , + arm_ck.rate /1000000 , (arm_ck.rate /100000 ) %10 ); }u32 cpu_mask;
@@ -848,8 +847,8 @@ int __init omap1_clk_init(void)if (cpu_is_omap16xx () && crystal_type ==2 ) ck_ref.rate =19200000 ; -pr_info ("Clocks: ARM_SYSST: 0x%04x DPLL_CTL: 0x%04x ARM_CKCTL: " -"0x%04x\n" ,omap_readw (ARM_SYSST ),omap_readw (DPLL_CTL ), +pr_info ("Clocks: ARM_SYSST: 0x%04x DPLL_CTL: 0x%04x ARM_CKCTL: 0x%04x\n" , +omap_readw (ARM_SYSST ),omap_readw (DPLL_CTL ),omap_readw (ARM_CKCTL ));/* We want to be in syncronous scalable mode */
arch/arm/mach-omap1/dma.c +3 -2
@@ -330,8 +330,9 @@ static int __init omap1_system_dma_init(void) d->chan =kzalloc (sizeof (struct omap_dma_lch ) * (d->lch_count),GFP_KERNEL );if (!d->chan) { -dev_err (&pdev->dev,"%s: Memory allocation failed" -"for d->chan!!!\n" , __func__); +dev_err (&pdev->dev, +"%s: Memory allocation failed for d->chan!\n" , + __func__); goto exit_release_d; }
arch/arm/mach-omap1/lcd_dma.c +2 -4
@@ -112,8 +112,7 @@ EXPORT_SYMBOL(omap_set_lcd_dma_b1_mirror);void omap_set_lcd_dma_b1_vxres (unsigned long vxres) {if (cpu_is_omap15xx ()) { -printk (KERN_ERR "DMA virtual resolution is not supported " -"in 1510 mode\n" ); +pr_err ("DMA virtual resolution is not supported in 1510 mode\n" );BUG (); } lcd_dma.vxres = vxres;
@@ -432,8 +431,7 @@ static int __init omap_init_lcd_dma(void) r =request_irq (INT_DMA_LCD , lcd_dma_irq_handler,0 ,"LCD DMA" ,NULL );if (r !=0 ) -printk (KERN_ERR "unable to request IRQ for LCD DMA " -"(error %d)\n" , r); +pr_err ("unable to request IRQ for LCD DMA (error %d)\n" , r);return r; }
arch/arm/mach-omap2/board-n8x0.c +3 -4
@@ -553,8 +553,8 @@ static int n8x0_auto_sleep_regulators(void) ret =menelaus_set_regulator_sleep (1 , val);if (ret <0 ) { -printk (KERN_ERR "Could not set regulators to sleep on " -"menelaus: %u\n" , ret); +pr_err ("Could not set regulators to sleep on menelaus: %u\n" , + ret);return ret; }return 0 ;
@@ -566,8 +566,7 @@ static int n8x0_auto_voltage_scale(void) ret =menelaus_set_vcore_hw (1400 ,1050 );if (ret <0 ) { -printk (KERN_ERR "Could not set VCORE voltage on " -"menelaus: %u\n" , ret); +pr_err ("Could not set VCORE voltage on menelaus: %u\n" , ret);return ret; }return 0 ;
arch/arm/mach-omap2/board-overo.c +2 -4
@@ -522,8 +522,7 @@ static void __init overo_init(void)udelay (10 );gpio_set_value (OVERO_GPIO_W2W_NRESET ,1 ); }else { -printk (KERN_ERR "could not obtain gpio for " -"OVERO_GPIO_W2W_NRESET\n" ); +pr_err ("could not obtain gpio for OVERO_GPIO_W2W_NRESET\n" ); } ret =gpio_request_array (overo_bt_gpios,ARRAY_SIZE (overo_bt_gpios));
@@ -542,8 +541,7 @@ static void __init overo_init(void)if (ret ==0 )gpio_export (OVERO_GPIO_USBH_CPEN ,0 );else -printk (KERN_ERR "could not obtain gpio for " -"OVERO_GPIO_USBH_CPEN\n" ); +pr_err ("could not obtain gpio for OVERO_GPIO_USBH_CPEN\n" ); }MACHINE_START (OVERO ,"Gumstix Overo" )
arch/arm/mach-omap2/board-zoom-debugboard.c +3 -4
@@ -81,8 +81,7 @@ static inline void __init zoom_init_quaduart(void) quart_cs =ZOOM_QUADUART_CS ;if (gpmc_cs_request (quart_cs,SZ_1M , &cs_mem_base) <0 ) { -printk (KERN_ERR "Failed to request GPMC mem" -"for Quad UART(TL16CP754C)\n" ); +pr_err ("Failed to request GPMC mem for Quad UART(TL16CP754C)\n" );return ; }
@@ -104,8 +103,8 @@ static inline int omap_zoom_debugboard_detect(void)if (gpio_request_one (debug_board_detect,GPIOF_IN ,"Zoom debug board detect" ) <0 ) { -printk (KERN_ERR "Failed to request GPIO%d for Zoom debug" -"board detect\n" , debug_board_detect); +pr_err ("Failed to request GPIO%d for Zoom debug board detect\n" , + debug_board_detect);return 0 ; }
arch/arm/mach-omap2/clkt34xx_dpll3m2.c +4 -6
@@ -92,15 +92,13 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate)pr_debug ("clock: changing CORE DPLL rate from %lu to %lu\n" , clk->rate, validrate); -pr_debug ("clock: SDRC CS0 timing params used:" -" RFR %08x CTRLA %08x CTRLB %08x MR %08x\n" , +pr_debug ("clock: SDRC CS0 timing params used: RFR %08x CTRLA %08x CTRLB %08x MR %08x\n" , sdrc_cs0->rfr_ctrl, sdrc_cs0->actim_ctrla, sdrc_cs0->actim_ctrlb, sdrc_cs0->mr);if (sdrc_cs1) -pr_debug ("clock: SDRC CS1 timing params used: " -" RFR %08x CTRLA %08x CTRLB %08x MR %08x\n" , - sdrc_cs1->rfr_ctrl, sdrc_cs1->actim_ctrla, - sdrc_cs1->actim_ctrlb, sdrc_cs1->mr); +pr_debug ("clock: SDRC CS1 timing params used: RFR %08x CTRLA %08x CTRLB %08x MR %08x\n" , + sdrc_cs1->rfr_ctrl, sdrc_cs1->actim_ctrla, + sdrc_cs1->actim_ctrlb, sdrc_cs1->mr);if (sdrc_cs1) omap3_configure_core_dpll(
arch/arm/mach-omap2/clkt_clksel.c +13 -15
@@ -71,8 +71,8 @@ static const struct clksel *_get_clksel_by_parent(struct clk *clk,if (!clks->parent) {/* This indicates a data problem */ -WARN (1 ,"clock: Could not find parent clock %s in clksel array " -"of clock %s\n" , src_clk->name, clk->name); +WARN (1 ,"clock: %s: could not find parent clock %s in clksel array\n" , + clk->name, src_clk->name);return NULL ; }
@@ -126,8 +126,8 @@ static u8 _get_div_and_fieldval(struct clk *src_clk, struct clk *clk,if (max_div ==0 ) {/* This indicates an error in the clksel data */ -WARN (1 ,"clock: Could not find divisor for clock %s parent %s" -"\n" , clk->name, src_clk->parent->name); +WARN (1 ,"clock: %s: could not find divisor for parent %s\n" , + clk->name, src_clk->parent->name);return 0 ; }
@@ -191,8 +191,8 @@ static u32 _clksel_to_divisor(struct clk *clk, u32 field_val)if (!clkr->div) {/* This indicates a data error */ -WARN (1 ,"clock: Could not find fieldval %d for clock %s parent " -"%s\n" , field_val, clk->name, clk->parent->name); +WARN (1 ,"clock: %s: could not find fieldval %d parent %s\n" , + clk->name, field_val, clk->parent->name);return 0 ; }
@@ -230,8 +230,8 @@ static u32 _divisor_to_clksel(struct clk *clk, u32 div) }if (!clkr->div) { -pr_err ("clock: Could not find divisor %d for clock %s parent " -"%s\n" , div, clk->name, clk->parent->name); +pr_err ("clock: %s: could not find divisor %d parent %s\n" , + clk->name, div, clk->parent->name);return ~0 ; }
@@ -300,8 +300,8 @@ u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate,/* Sanity check */ if (clkr->div <= last_div) -pr_err ("clock: clksel_rate table not sorted " -"for clock %s" , clk->name); +pr_err ("clock: %s: clksel_rate table not sorted" , + clk->name); last_div = clkr->div;
@@ -312,9 +312,8 @@ u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate, }if (!clkr->div) { -pr_err ("clock: Could not find divisor for target " -"rate %ld for clock %s parent %s\n" , target_rate, - clk->name, clk->parent->name); +pr_err ("clock: %s: could not find divisor for target rate %ld parent %s\n" , + clk->name, target_rate, clk->parent->name);return ~0 ; }
@@ -359,8 +358,7 @@ void omap2_init_clksel_parent(struct clk *clk)if (clkr->val == r) {if (clk->parent != clks->parent) { -pr_debug ("clock: inited %s parent " -"to %s (was %s)\n" , +pr_debug ("clock: %s: inited parent to %s (was %s)\n" , clk->name, clks->parent->name, ((clk->parent) ? clk->parent->name :"NULL" ));
arch/arm/mach-omap2/clkt_dpll.c +4 -4
@@ -105,13 +105,13 @@ static int _dpll_test_fint(struct clk *clk, u8 n) }if (fint < fint_min) { -pr_debug ("rejecting n=%d due to Fint failure, " -"lowering max_divider\n" , n); +pr_debug ("rejecting n=%d due to Fint failure, lowering max_divider\n" , + n); dd->max_divider = n; ret =DPLL_FINT_UNDERFLOW ; }else if (fint > fint_max) { -pr_debug ("rejecting n=%d due to Fint failure, " -"boosting min_divider\n" , n); +pr_debug ("rejecting n=%d due to Fint failure, boosting min_divider\n" , + n); dd->min_divider = n; ret =DPLL_FINT_INVALID ; } else if (cpu_is_omap3430() && fint > OMAP3430_DPLL_FINT_BAND1_MAX &&
arch/arm/mach-omap2/clock.c +8 -12
@@ -102,8 +102,8 @@ void omap2_init_clk_clkdm(struct clk *clk) clk->name, clk->clkdm_name); clk->clkdm = clkdm; }else { -pr_debug ("clock: could not associate clk %s to " -"clkdm %s\n" , clk->name, clk->clkdm_name); +pr_debug ("clock: could not associate clk %s to clkdm %s\n" , + clk->name, clk->clkdm_name); } }
@@ -226,8 +226,7 @@ void omap2_dflt_clk_disable(struct clk *clk)* 'Independent' here refers to a clock which is not * controlled by its parent. */ -printk (KERN_ERR "clock: clk_disable called on independent " -"clock %s which has no enable_reg\n" , clk->name); +pr_err ("clock: clk_disable called on independent clock %s which has no enable_reg\n" , clk->name);return ; }
@@ -270,8 +269,7 @@ const struct clkops clkops_omap2_dflt = {void omap2_clk_disable (struct clk *clk) {if (clk->usecount ==0 ) { -WARN (1 ,"clock: %s: omap2_clk_disable() called, but usecount " -"already 0?" , clk->name); +WARN (1 ,"clock: %s: omap2_clk_disable() called, but usecount already 0?" , clk->name);return ; }
@@ -332,8 +330,8 @@ int omap2_clk_enable(struct clk *clk)if (clkdm_control && clk->clkdm) { ret =clkdm_clk_enable (clk->clkdm, clk);if (ret) { -WARN (1 ,"clock: %s: could not enable clockdomain %s: " -"%d\n" , clk->name, clk->clkdm->name, ret); +WARN (1 ,"clock: %s: could not enable clockdomain %s: %d\n" , + clk->name, clk->clkdm->name, ret); goto oce_err2; } }
@@ -501,10 +499,8 @@ void __init omap2_clk_print_new_rates(const char *hfclkin_ck_name, hfclkin_rate =clk_get_rate (hfclkin_ck); -pr_info ("Switched to new clocking rate (Crystal/Core/MPU): " -"%ld.%01ld/%ld/%ld MHz\n" , - (hfclkin_rate /1000000 ), - ((hfclkin_rate /100000 ) %10 ), +pr_info ("Switched to new clocking rate (Crystal/Core/MPU): %ld.%01ld/%ld/%ld MHz\n" , + (hfclkin_rate /1000000 ), ((hfclkin_rate /100000 ) %10 ), (clk_get_rate (core_ck) /1000000 ), (clk_get_rate (mpu_ck) /1000000 )); }
arch/arm/mach-omap2/clock3xxx.c +1 -2
@@ -49,8 +49,7 @@ int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate)* on DPLL4. */ if (omap_rev () ==OMAP3430_REV_ES1_0 ) { -pr_err ("clock: DPLL4 cannot change rate due to " -"silicon 'Limitation 2.5' on 3430ES1.\n" ); +pr_err ("clock: DPLL4 cannot change rate due to silicon 'Limitation 2.5' on 3430ES1.\n" );return -EINVAL ; }
arch/arm/mach-omap2/clockdomain.c +34 -40
174 lines not on this page · raw message
arch/arm/mach-omap2/common-board-devices.c +1 -2
@@ -130,8 +130,7 @@ void __init omap_nand_flash_init(int options, struct mtd_partition *parts, }if (nandcs >GPMC_CS_NUM ) { -printk (KERN_INFO "NAND: Unable to find configuration " -"in GPMC\n " ); +pr_info ("NAND: Unable to find configuration in GPMC\n" );return ; }
arch/arm/mach-omap2/id.c +2 -3
@@ -161,9 +161,8 @@ void __init omap2xxx_check_revision(void) }if (j ==ARRAY_SIZE (omap_ids)) { -printk (KERN_ERR "Unknown OMAP device type. " -"Handling it as OMAP%04x\n" , - omap_ids[i].type >>16 ); +pr_err ("Unknown OMAP device type. Handling it as OMAP%04x\n" , + omap_ids[i].type >>16 ); j = i; }
arch/arm/mach-omap2/irq.c +2 -3
@@ -107,9 +107,8 @@ static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank)unsigned long tmp; tmp =intc_bank_read_reg (bank,INTC_REVISION ) &0xff ; -printk (KERN_INFO "IRQ: Found an INTC at 0x%p " -"(revision %ld.%ld) with %d interrupts\n" , - bank->base_reg, tmp >>4 , tmp &0xf , bank->nr_irqs); +pr_info ("IRQ: Found an INTC at 0x%p (revision %ld.%ld) with %d interrupts\n" , + bank->base_reg, tmp >>4 , tmp &0xf , bank->nr_irqs); tmp =intc_bank_read_reg (bank,INTC_SYSCONFIG ); tmp |=1 <<1 ;/* soft reset */
arch/arm/mach-omap2/omap_hwmod.c +2 -2
@@ -1641,8 +1641,8 @@ static int _ocp_softreset(struct omap_hwmod *oh)/* clocks must be on for this operation */ if (oh->_state != _HWMOD_STATE_ENABLED) { -pr_warning ("omap_hwmod: %s: reset can only be entered from " -"enabled state\n" , oh->name); +pr_warn ("omap_hwmod: %s: reset can only be entered from enabled state\n" , + oh->name);return -EINVAL ; }
arch/arm/mach-omap2/opp.c +6 -9
@@ -64,25 +64,22 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def, } oh =omap_hwmod_lookup (opp_def->hwmod_name);if (!oh || !oh->od) { -pr_debug ("%s: no hwmod or odev for %s, [%d] " -"cannot add OPPs.\n" , __func__, - opp_def->hwmod_name, i); +pr_debug ("%s: no hwmod or odev for %s, [%d] cannot add OPPs.\n" , + __func__, opp_def->hwmod_name, i);continue ; } dev = &oh->od->pdev->dev; r =opp_add (dev, opp_def->freq, opp_def->u_volt);if (r) { -dev_err (dev,"%s: add OPP %ld failed for %s [%d] " -"result=%d\n" , - __func__, opp_def->freq, - opp_def->hwmod_name, i, r); +dev_err (dev,"%s: add OPP %ld failed for %s [%d] result=%d\n" , + __func__, opp_def->freq, + opp_def->hwmod_name, i, r); }else {if (!opp_def->default_available) r =opp_disable (dev, opp_def->freq);if (r) -dev_err (dev,"%s: disable %ld failed for %s " -"[%d] result=%d\n" , +dev_err (dev,"%s: disable %ld failed for %s [%d] result=%d\n" , __func__, opp_def->freq, opp_def->hwmod_name, i, r); }
arch/arm/mach-omap2/pm.c +2 -2
@@ -203,8 +203,8 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, bootup_volt =opp_get_voltage (opp);rcu_read_unlock ();if (!bootup_volt) { -pr_err ("%s: unable to find voltage corresponding " -"to the bootup OPP for vdd_%s\n" , __func__, vdd_name); +pr_err ("%s: unable to find voltage corresponding to the bootup OPP for vdd_%s\n" , + __func__, vdd_name); goto exit; }
arch/arm/mach-omap2/pm34xx.c +3 -5
@@ -400,9 +400,8 @@ restore:list_for_each_entry (pwrst, &pwrst_list, node) { state =pwrdm_read_prev_pwrst (pwrst->pwrdm);if (state > pwrst->next_state) { -pr_info ("Powerdomain (%s) didn't enter " -"target state %d\n" , - pwrst->pwrdm->name, pwrst->next_state); +pr_info ("Powerdomain (%s) didn't enter target state %d\n" , + pwrst->pwrdm->name, pwrst->next_state); ret =-1 ; }omap_set_pwrdm_state (pwrst->pwrdm, pwrst->saved_state);
@@ -742,8 +741,7 @@ int __init omap3_pm_init(void) omap3_secure_ram_storage =kmalloc (0x803F ,GFP_KERNEL );if (!omap3_secure_ram_storage) -pr_err ("Memory allocation failed when " -"allocating for secure sram context\n" ); +pr_err ("Memory allocation failed when allocating for secure sram context\n" );local_irq_disable ();local_fiq_disable ();
arch/arm/mach-omap2/pm44xx.c +3 -5
@@ -69,9 +69,8 @@ static int omap4_pm_suspend(void)list_for_each_entry (pwrst, &pwrst_list, node) { state =pwrdm_read_prev_pwrst (pwrst->pwrdm);if (state > pwrst->next_state) { -pr_info ("Powerdomain (%s) didn't enter " -"target state %d\n" , - pwrst->pwrdm->name, pwrst->next_state); +pr_info ("Powerdomain (%s) didn't enter target state %d\n" , + pwrst->pwrdm->name, pwrst->next_state); ret =-1 ; }omap_set_pwrdm_state (pwrst->pwrdm, pwrst->saved_state);
@@ -189,8 +188,7 @@ int __init omap4_pm_init(void) ret |=clkdm_add_wkdep (ducati_clkdm, l3_1_clkdm); ret |=clkdm_add_wkdep (ducati_clkdm, l3_2_clkdm);if (ret) { -pr_err ("Failed to add MPUSS -> L3/EMIF/L4PER, DUCATI -> L3 " -"wakeup dependency\n" ); +pr_err ("Failed to add MPUSS -> L3/EMIF/L4PER, DUCATI -> L3 wakeup dependency\n" ); goto err2; }
arch/arm/mach-omap2/powerdomain.c +17 -19
@@ -339,8 +339,8 @@ int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm)if (!pwrdm || !clkdm)return -EINVAL ; -pr_debug ("powerdomain: associating clockdomain %s with powerdomain " -"%s\n" , clkdm->name, pwrdm->name); +pr_debug ("powerdomain: %s: associating clockdomain %s\n" , + pwrdm->name, clkdm->name);for (i =0 ; i <PWRDM_MAX_CLKDMS ; i++) {if (!pwrdm->pwrdm_clkdms[i])
@@ -354,8 +354,8 @@ int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm) }if (i ==PWRDM_MAX_CLKDMS ) { -pr_debug ("powerdomain: increase PWRDM_MAX_CLKDMS for " -"pwrdm %s clkdm %s\n" , pwrdm->name, clkdm->name); +pr_debug ("powerdomain: %s: increase PWRDM_MAX_CLKDMS for clkdm %s\n" , + pwrdm->name, clkdm->name);WARN_ON (1 ); ret = -ENOMEM ; goto pac_exit;
@@ -387,16 +387,16 @@ int pwrdm_del_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm)if (!pwrdm || !clkdm)return -EINVAL ; -pr_debug ("powerdomain: dissociating clockdomain %s from powerdomain " -"%s\n" , clkdm->name, pwrdm->name); +pr_debug ("powerdomain: %s: dissociating clockdomain %s\n" , + pwrdm->name, clkdm->name);for (i =0 ; i <PWRDM_MAX_CLKDMS ; i++)if (pwrdm->pwrdm_clkdms[i] == clkdm)break ;if (i ==PWRDM_MAX_CLKDMS ) { -pr_debug ("powerdomain: clkdm %s not associated with pwrdm " -"%s ?!\n" , clkdm->name, pwrdm->name); +pr_debug ("powerdomain: %s: clkdm %s not associated?!\n" , + pwrdm->name, clkdm->name); ret = -ENOENT ; goto pdc_exit; }
@@ -485,7 +485,7 @@ int pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst)if (!(pwrdm->pwrsts & (1 << pwrst)))return -EINVAL ; -pr_debug ("powerdomain: setting next powerstate for %s to %0x\n" , +pr_debug ("powerdomain: %s: setting next powerstate to %0x\n" , pwrdm->name, pwrst);if (arch_pwrdm && arch_pwrdm->pwrdm_set_next_pwrst) {
@@ -587,7 +587,7 @@ int pwrdm_set_logic_retst(struct powerdomain *pwrdm, u8 pwrst)if (!(pwrdm->pwrsts_logic_ret & (1 << pwrst)))return -EINVAL ; -pr_debug ("powerdomain: setting next logic powerstate for %s to %0x\n" , +pr_debug ("powerdomain: %s: setting next logic powerstate to %0x\n" , pwrdm->name, pwrst);if (arch_pwrdm && arch_pwrdm->pwrdm_set_logic_retst)
@@ -624,8 +624,8 @@ int pwrdm_set_mem_onst(struct powerdomain *pwrdm, u8 bank, u8 pwrst)if (!(pwrdm->pwrsts_mem_on[bank] & (1 << pwrst)))return -EINVAL ; -pr_debug ("powerdomain: setting next memory powerstate for domain %s " -"bank %0x while pwrdm-ON to %0x\n" , pwrdm->name, bank, pwrst); +pr_debug ("powerdomain: %s: setting next memory powerstate for bank %0x while pwrdm-ON to %0x\n" , + pwrdm->name, bank, pwrst);if (arch_pwrdm && arch_pwrdm->pwrdm_set_mem_onst) ret = arch_pwrdm->pwrdm_set_mem_onst (pwrdm, bank, pwrst);
@@ -662,8 +662,8 @@ int pwrdm_set_mem_retst(struct powerdomain *pwrdm, u8 bank, u8 pwrst)if (!(pwrdm->pwrsts_mem_ret[bank] & (1 << pwrst)))return -EINVAL ; -pr_debug ("powerdomain: setting next memory powerstate for domain %s " -"bank %0x while pwrdm-RET to %0x\n" , pwrdm->name, bank, pwrst); +pr_debug ("powerdomain: %s: setting next memory powerstate for bank %0x while pwrdm-RET to %0x\n" , + pwrdm->name, bank, pwrst);if (arch_pwrdm && arch_pwrdm->pwrdm_set_mem_retst) ret = arch_pwrdm->pwrdm_set_mem_retst (pwrdm, bank, pwrst);
@@ -841,7 +841,7 @@ int pwrdm_clear_all_prev_pwrst(struct powerdomain *pwrdm)* warn & fail if it is not ON. */ -pr_debug ("powerdomain: clearing previous power state reg for %s\n" , +pr_debug ("powerdomain: %s: clearing previous power state reg\n" , pwrdm->name);if (arch_pwrdm && arch_pwrdm->pwrdm_clear_all_prev_pwrst)
@@ -871,8 +871,7 @@ int pwrdm_enable_hdwr_sar(struct powerdomain *pwrdm)if (!(pwrdm->flags &PWRDM_HAS_HDWR_SAR ))return ret; -pr_debug ("powerdomain: %s: setting SAVEANDRESTORE bit\n" , - pwrdm->name); +pr_debug ("powerdomain: %s: setting SAVEANDRESTORE bit\n" , pwrdm->name);if (arch_pwrdm && arch_pwrdm->pwrdm_enable_hdwr_sar) ret = arch_pwrdm->pwrdm_enable_hdwr_sar (pwrdm);
@@ -901,8 +900,7 @@ int pwrdm_disable_hdwr_sar(struct powerdomain *pwrdm)if (!(pwrdm->flags &PWRDM_HAS_HDWR_SAR ))return ret; -pr_debug ("powerdomain: %s: clearing SAVEANDRESTORE bit\n" , - pwrdm->name); +pr_debug ("powerdomain: %s: clearing SAVEANDRESTORE bit\n" , pwrdm->name);if (arch_pwrdm && arch_pwrdm->pwrdm_disable_hdwr_sar) ret = arch_pwrdm->pwrdm_disable_hdwr_sar (pwrdm);
arch/arm/mach-omap2/powerdomain2xxx_3xxx.c +2 -2
@@ -122,8 +122,8 @@ static int omap2_pwrdm_wait_transition(struct powerdomain *pwrdm)udelay (1 );if (c >PWRDM_TRANSITION_BAILOUT ) { -printk (KERN_ERR "powerdomain: waited too long for " -"powerdomain %s to complete transition\n" , pwrdm->name); +pr_err ("powerdomain: %s: waited too long to complete transition\n" , + pwrdm->name);return -EAGAIN ; }
arch/arm/mach-omap2/powerdomain44xx.c +2 -2
@@ -198,8 +198,8 @@ static int omap4_pwrdm_wait_transition(struct powerdomain *pwrdm)udelay (1 );if (c >PWRDM_TRANSITION_BAILOUT ) { -printk (KERN_ERR "powerdomain: waited too long for " -"powerdomain %s to complete transition\n" , pwrdm->name); +pr_err ("powerdomain: %s: waited too long to complete transition\n" , + pwrdm->name);return -EAGAIN ; }
arch/arm/mach-omap2/prcm.c +4 -4
@@ -140,11 +140,11 @@ int omap2_cm_wait_idlest(void __iomem *reg, u32 mask, u8 idlest, MAX_MODULE_ENABLE_WAIT, i);if (i <MAX_MODULE_ENABLE_WAIT ) -pr_debug ("cm: Module associated with clock %s ready after %d " -"loops\n" , name, i); +pr_debug ("cm: Module associated with clock %s ready after %d loops\n" , + name, i);else -pr_err ("cm: Module associated with clock %s didn't enable in " -"%d tries\n" , name,MAX_MODULE_ENABLE_WAIT ); +pr_err ("cm: Module associated with clock %s didn't enable in %d tries\n" , + name,MAX_MODULE_ENABLE_WAIT );return (i <MAX_MODULE_ENABLE_WAIT ) ?1 :0 ; };
arch/arm/mach-omap2/serial.c +2 -3
@@ -229,9 +229,8 @@ static int __init omap_serial_early_init(void)if (console_loglevel >=10 ) { uart_debug = true; -pr_info ("%s used as console in debug mode" -" uart%d clocks will not be" -" gated" , uart_name, uart->num); +pr_info ("%s used as console in debug mode: uart%d clocks will not be gated" , + uart_name, uart->num); }if (cmdline_find_option ("no_console_suspend" ))
arch/arm/mach-omap2/sr_device.c +6 -7
@@ -104,16 +104,15 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user) sr_data =kzalloc (sizeof (struct omap_sr_data ),GFP_KERNEL );if (!sr_data) { -pr_err ("%s: Unable to allocate memory for %s sr_data.Error!\n" , - __func__, oh->name); +pr_err ("%s: Unable to allocate memory for %s sr_data\n" , + __func__, oh->name);return -ENOMEM ; } sr_dev_attr = (struct omap_smartreflex_dev_attr *)oh->dev_attr;if (!sr_dev_attr || !sr_dev_attr->sensor_voltdm_name) { -pr_err ("%s: No voltage domain specified for %s." -"Cannot initialize\n" , __func__, - oh->name); +pr_err ("%s: No voltage domain specified for %s. Cannot initialize\n" , + __func__, oh->name); goto exit; }
@@ -131,8 +130,8 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user)omap_voltage_get_volttable (sr_data->voltdm, &volt_data);if (!volt_data) { -pr_warning ("%s: No Voltage table registered fo VDD%d." -"Something really wrong\n\n" , __func__, i +1 ); +pr_err ("%s: No Voltage table registered for VDD%d\n" , + __func__, i +1 ); goto exit; }
arch/arm/mach-omap2/vc.c +2 -3
@@ -116,9 +116,8 @@ int omap_vc_pre_scale(struct voltagedomain *voltdm, }if (!voltdm->pmic->uv_to_vsel) { -pr_err ("%s: PMIC function to convert voltage in uV to" -"vsel not registered. Hence unable to scale voltage" -"for vdd_%s\n" , __func__, voltdm->name); +pr_err ("%s: PMIC function to convert voltage in uV to vsel not registered. Hence unable to scale voltage for vdd_%s\n" , + __func__, voltdm->name);return -ENODATA ; }
arch/arm/mach-omap2/voltage.c +6 -6
@@ -195,8 +195,8 @@ struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,return &voltdm->volt_data[i]; } -pr_notice ("%s: Unable to match the current voltage with the voltage" -"table for vdd_%s\n" , __func__, voltdm->name); +pr_notice ("%s: Unable to match the current voltage with the voltage table for vdd_%s\n" , + __func__, voltdm->name);return ERR_PTR (-ENODATA ); }
@@ -249,8 +249,8 @@ void omap_change_voltscale_method(struct voltagedomain *voltdm, voltdm->scale = omap_vc_bypass_scale;return ;default : -pr_warning ("%s: Trying to change the method of voltage scaling" -"to an unsupported one!\n" , __func__); +pr_warn ("%s: Trying to change the method of voltage scaling to an unsupported one!\n" , + __func__); } }
@@ -331,8 +331,8 @@ int voltdm_add_pwrdm(struct voltagedomain *voltdm, struct powerdomain *pwrdm)if (!voltdm || !pwrdm)return -EINVAL ; -pr_debug ("voltagedomain: associating powerdomain %s with voltagedomain " -"%s\n" , pwrdm->name, voltdm->name); +pr_debug ("voltagedomain: %s: associating powerdomain %s\n" , + voltdm->name, pwrdm->name);list_add (&pwrdm->voltdm_node, &voltdm->pwrdm_list);
arch/arm/mach-omap2/vp.c +7 -9
@@ -138,8 +138,8 @@ int omap_vp_forceupdate_scale(struct voltagedomain *voltdm,udelay (1 ); }if (timeout >=VP_TRANXDONE_TIMEOUT ) { -pr_warning ("%s: vdd_%s TRANXDONE timeout exceeded." -"Voltage change aborted" , __func__, voltdm->name); +pr_warn ("%s: vdd_%s TRANXDONE timeout exceeded. Voltage change aborted" , + __func__, voltdm->name);return -ETIMEDOUT ; }
@@ -157,9 +157,8 @@ int omap_vp_forceupdate_scale(struct voltagedomain *voltdm,omap_test_timeout (vp->common->ops->check_txdone (vp->id),VP_TRANXDONE_TIMEOUT , timeout);if (timeout >=VP_TRANXDONE_TIMEOUT ) -pr_err ("%s: vdd_%s TRANXDONE timeout exceeded." -"TRANXDONE never got set after the voltage update\n" , - __func__, voltdm->name); +pr_err ("%s: vdd_%s TRANXDONE timeout exceeded. TRANXDONE never got set after the voltage update\n" , + __func__, voltdm->name);omap_vc_post_scale (voltdm, target_volt, target_vsel, current_vsel);
@@ -176,8 +175,7 @@ int omap_vp_forceupdate_scale(struct voltagedomain *voltdm, }if (timeout >=VP_TRANXDONE_TIMEOUT ) -pr_warning ("%s: vdd_%s TRANXDONE timeout exceeded while trying" -"to clear the TRANXDONE status\n" , +pr_warn ("%s: vdd_%s TRANXDONE timeout exceeded while trying to clear the TRANXDONE status\n" , __func__, voltdm->name);/* Clear force bit */
@@ -257,8 +255,8 @@ void omap_vp_disable(struct voltagedomain *voltdm)/* If VP is already disabled, do nothing. Return */ if (!vp->enabled) { -pr_warning ("%s: Trying to disable VP for vdd_%s when" -"it is already disabled\n" , __func__, voltdm->name); +pr_warn ("%s: Trying to disable VP for vdd_%s when it is already disabled\n" , + __func__, voltdm->name);return ; }
arch/arm/plat-omap/dma.c +19 -23
96 lines not on this page · raw message
arch/arm/plat-omap/omap-pm-noop.c +19 -20
@@ -41,11 +41,11 @@ int omap_pm_set_max_mpu_wakeup_lat(struct device *dev, long t) };if (t ==-1 ) -pr_debug ("OMAP PM: remove max MPU wakeup latency constraint: " -"dev %s\n" ,dev_name (dev)); +pr_debug ("OMAP PM: remove max MPU wakeup latency constraint: dev %s\n" , +dev_name (dev));else -pr_debug ("OMAP PM: add max MPU wakeup latency constraint: " -"dev %s, t = %ld usec\n" ,dev_name (dev), t); +pr_debug ("OMAP PM: add max MPU wakeup latency constraint: dev %s, t = %ld usec\n" , +dev_name (dev), t);/* * For current Linux, this needs to map the MPU to a
@@ -70,11 +70,10 @@ int omap_pm_set_min_bus_tput(struct device *dev, u8 agent_id, unsigned long r) };if (r ==0 ) -pr_debug ("OMAP PM: remove min bus tput constraint: " -"dev %s for agent_id %d\n" ,dev_name (dev), agent_id); +pr_debug ("OMAP PM: remove min bus tput constraint: dev %s for agent_id %d\n" , +dev_name (dev), agent_id);else -pr_debug ("OMAP PM: add min bus tput constraint: " -"dev %s for agent_id %d: rate %ld KiB\n" , +pr_debug ("OMAP PM: add min bus tput constraint: dev %s for agent_id %d: rate %ld KiB\n" ,dev_name (dev), agent_id, r);/*
@@ -97,11 +96,11 @@ int omap_pm_set_max_dev_wakeup_lat(struct device *req_dev, struct device *dev, };if (t ==-1 ) -pr_debug ("OMAP PM: remove max device latency constraint: " -"dev %s\n" ,dev_name (dev)); +pr_debug ("OMAP PM: remove max device latency constraint: dev %s\n" , +dev_name (dev));else -pr_debug ("OMAP PM: add max device latency constraint: " -"dev %s, t = %ld usec\n" ,dev_name (dev), t); +pr_debug ("OMAP PM: add max device latency constraint: dev %s, t = %ld usec\n" , +dev_name (dev), t);/* * For current Linux, this needs to map the device to a
@@ -127,11 +126,11 @@ int omap_pm_set_max_sdma_lat(struct device *dev, long t) };if (t ==-1 ) -pr_debug ("OMAP PM: remove max DMA latency constraint: " -"dev %s\n" ,dev_name (dev)); +pr_debug ("OMAP PM: remove max DMA latency constraint: dev %s\n" , +dev_name (dev));else -pr_debug ("OMAP PM: add max DMA latency constraint: " -"dev %s, t = %ld usec\n" ,dev_name (dev), t); +pr_debug ("OMAP PM: add max DMA latency constraint: dev %s, t = %ld usec\n" , +dev_name (dev), t);/* * For current Linux PM QOS params, this code should scan the
@@ -156,11 +155,11 @@ int omap_pm_set_min_clk_rate(struct device *dev, struct clk *c, long r) }if (r ==0 ) -pr_debug ("OMAP PM: remove min clk rate constraint: " -"dev %s\n" ,dev_name (dev)); +pr_debug ("OMAP PM: remove min clk rate constraint: dev %s\n" , +dev_name (dev));else -pr_debug ("OMAP PM: add min clk rate constraint: " -"dev %s, rate = %ld Hz\n" ,dev_name (dev), r); +pr_debug ("OMAP PM: add min clk rate constraint: dev %s, rate = %ld Hz\n" , +dev_name (dev), r);/* * Code in a real implementation should keep track of these
arch/arm/plat-omap/omap_device.c +10 -15
@@ -1,4 +1,3 @@ -/* * omap_device implementation *
@@ -153,21 +152,19 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat) act_lat =timespec_to_ns (&c);dev_dbg (&od->pdev->dev, -"omap_device: pm_lat %d: activate: elapsed time " -"%llu nsec\n" , od->pm_lat_level, act_lat); +"omap_device: pm_lat %d: activate: elapsed time %llu nsec\n" , + od->pm_lat_level, act_lat);if (act_lat > odpl->activate_lat) { odpl->activate_lat_worst = act_lat;if (odpl->flags &OMAP_DEVICE_LATENCY_AUTO_ADJUST ) { odpl->activate_lat = act_lat;dev_dbg (&od->pdev->dev, -"new worst case activate latency " -"%d: %llu\n" , +"new worst case activate latency %d: %llu\n" , od->pm_lat_level, act_lat); }else dev_warn (&od->pdev->dev, -"activate latency %d " -"higher than exptected. (%llu > %d)\n" , +"activate latency %d higher than expected. (%llu > %d)\n" , od->pm_lat_level, act_lat, odpl->activate_lat); }
@@ -220,21 +217,19 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat) deact_lat =timespec_to_ns (&c);dev_dbg (&od->pdev->dev, -"omap_device: pm_lat %d: deactivate: elapsed time " -"%llu nsec\n" , od->pm_lat_level, deact_lat); +"omap_device: pm_lat %d: deactivate: elapsed time %llu nsec\n" , + od->pm_lat_level, deact_lat);if (deact_lat > odpl->deactivate_lat) { odpl->deactivate_lat_worst = deact_lat;if (odpl->flags &OMAP_DEVICE_LATENCY_AUTO_ADJUST ) { odpl->deactivate_lat = deact_lat;dev_dbg (&od->pdev->dev, -"new worst case deactivate latency " -"%d: %llu\n" , +"new worst case deactivate latency %d: %llu\n" , od->pm_lat_level, deact_lat); }else dev_warn (&od->pdev->dev, -"deactivate latency %d " -"higher than exptected. (%llu > %d)\n" , +"deactivate latency %d higher than expected. (%llu > %d)\n" , od->pm_lat_level, deact_lat, odpl->deactivate_lat); }
@@ -449,8 +444,8 @@ static int omap_device_count_resources(struct omap_device *od)for (i =0 ; i < od->hwmods_cnt; i++) c +=omap_hwmod_count_resources (od->hwmods[i]); -pr_debug ("omap_device: %s: counted %d total resources across %d " -"hwmods\n" , od->pdev->name, c, od->hwmods_cnt); +pr_debug ("omap_device: %s: counted %d total resources across %d hwmods\n" , + od->pdev->name, c, od->hwmods_cnt);return c; }