Skip to content

Commit

Permalink
ARM: OMAP: unwrap strings
Browse files Browse the repository at this point in the history
Find 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_*.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
  • Loading branch information
Paul Walmsley committed Sep 12, 2012
1 parent a032d33 commit 7852ec0
Show file tree
Hide file tree
Showing 34 changed files with 206 additions and 258 deletions.
3 changes: 1 addition & 2 deletions arch/arm/mach-omap1/board-htcherald.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-omap1/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
13 changes: 6 additions & 7 deletions arch/arm/mach-omap1/clock_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 */
Expand Down
5 changes: 3 additions & 2 deletions arch/arm/mach-omap1/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
6 changes: 2 additions & 4 deletions arch/arm/mach-omap1/lcd_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,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;
Expand Down Expand Up @@ -437,8 +436,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;
}
Expand Down
7 changes: 3 additions & 4 deletions arch/arm/mach-omap2/board-n8x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
6 changes: 2 additions & 4 deletions arch/arm/mach-omap2/board-overo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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")
Expand Down
7 changes: 3 additions & 4 deletions arch/arm/mach-omap2/board-zoom-debugboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down
10 changes: 4 additions & 6 deletions arch/arm/mach-omap2/clkt34xx_dpll3m2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
28 changes: 13 additions & 15 deletions arch/arm/mach-omap2/clkt_clksel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;

Expand All @@ -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;
}

Expand Down Expand Up @@ -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"));
Expand Down
8 changes: 4 additions & 4 deletions arch/arm/mach-omap2/clkt_dpll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
20 changes: 8 additions & 12 deletions arch/arm/mach-omap2/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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));
}
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-omap2/clock3xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Loading

0 comments on commit 7852ec0

Please sign in to comment.