diff mbox

[v2,1/6] ARM: davinci: Changed pr_warning() to pr_warn()

Message ID 1351197357-23528-1-git-send-email-rtivy@ti.com (mailing list archive)
State Changes Requested
Headers show

Commit Message

Tivy, Robert Oct. 25, 2012, 8:35 p.m. UTC
Also, while modifying those pr_warning() calls I changed hardcoded
function names to use '"%s:", __func__' instead

Signed-off-by: Robert Tivy <rtivy@ti.com>
---
Clean up files that will be otherwise modified in subsequent patch.

Applies to v3.5 tag (commit 28a33cbc24e4256c143dce96c7d93bf423229f92) of
Linus' mainline kernel at git.kernel.org.

 arch/arm/mach-davinci/board-da850-evm.c |  102 +++++++++++++------------------
 1 file changed, 43 insertions(+), 59 deletions(-)

Comments

Sergei Shtylyov Oct. 26, 2012, 9:46 a.m. UTC | #1
Hello.

    It's not a good idea to send multiple patches with the same subject. 
Actually, in this case it's worth merging all 4 patches into one.

On 26-10-2012 0:35, Robert Tivy wrote:

> Also, while modifying those pr_warning() calls I changed hardcoded
> function names to use '"%s:", __func__' instead

> Signed-off-by: Robert Tivy <rtivy@ti.com>
> ---
> Clean up files that will be otherwise modified in subsequent patch.

> Applies to v3.5 tag (commit 28a33cbc24e4256c143dce96c7d93bf423229f92) of
> Linus' mainline kernel at git.kernel.org.

    3.5 is too old. Why not to 3.6 or even 3.7-rc2?

> diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
> index 0149fb4..bbb3c73 100644
> --- a/arch/arm/mach-davinci/board-da850-evm.c
> +++ b/arch/arm/mach-davinci/board-da850-evm.c
[...]
> @@ -1046,21 +1046,19 @@ static int __init da850_evm_config_emac(void)
>  	}
>
>  	if (ret)
> -		pr_warning("da850_evm_init: cpgmac/rmii mux setup failed: %d\n",
> -				ret);
> +		pr_warn("%s: cpgmac/rmii mux setup failed: %d\n",
> +			__func__, ret);
>
>  	/* configure the CFGCHIP3 register for RMII or MII */
>  	__raw_writel(val, cfg_chip3_base);
>
>  	ret = davinci_cfg_reg(DA850_GPIO2_6);
>  	if (ret)
> -		pr_warning("da850_evm_init:GPIO(2,6) mux setup "
> -							"failed\n");
> +		pr_warn("%s:GPIO(2,6) mux setup failed\n", __func__);

    Worth inserting space after colon here.

WBR, Sergei
Tivy, Robert Oct. 27, 2012, 12:59 a.m. UTC | #2
Thanks for your comments, Sergei.  Please see below...

> -----Original Message-----
> From: Sergei Shtylyov [mailto:sshtylyov@mvista.com]
> Sent: Friday, October 26, 2012 2:46 AM
> To: Tivy, Robert
> Cc: davinci-linux-open-source@linux.davincidsp.com; linux-arm-
> kernel@lists.infradead.org; Ring, Chris; Grosen, Mark; Nori, Sekhar
> Subject: Re: [PATCH v2 1/6] ARM: davinci: Changed pr_warning() to
> pr_warn()
> 
> Hello.
> 
>     It's not a good idea to send multiple patches with the same
> subject.
> Actually, in this case it's worth merging all 4 patches into one.

My first patch submission had them all as one patch, but Sekhar asked that they be split into 4 separate patches to make the merge easier.

I can make each one have a different subject, though.

> 
> On 26-10-2012 0:35, Robert Tivy wrote:
> 
> > Also, while modifying those pr_warning() calls I changed hardcoded
> > function names to use '"%s:", __func__' instead
> 
> > Signed-off-by: Robert Tivy <rtivy@ti.com>
> > ---
> > Clean up files that will be otherwise modified in subsequent patch.
> 
> > Applies to v3.5 tag (commit 28a33cbc24e4256c143dce96c7d93bf423229f92)
> of
> > Linus' mainline kernel at git.kernel.org.
> 
>     3.5 is too old. Why not to 3.6 or even 3.7-rc2?

I will attempt to recreate this patch series on 3.7-rc2, although I will need to change it to use the newer "rproc" APIs and data structures.

> 
> > diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-
> davinci/board-da850-evm.c
> > index 0149fb4..bbb3c73 100644
> > --- a/arch/arm/mach-davinci/board-da850-evm.c
> > +++ b/arch/arm/mach-davinci/board-da850-evm.c
> [...]
> > @@ -1046,21 +1046,19 @@ static int __init da850_evm_config_emac(void)
> >  	}
> >
> >  	if (ret)
> > -		pr_warning("da850_evm_init: cpgmac/rmii mux setup failed:
> %d\n",
> > -				ret);
> > +		pr_warn("%s: cpgmac/rmii mux setup failed: %d\n",
> > +			__func__, ret);
> >
> >  	/* configure the CFGCHIP3 register for RMII or MII */
> >  	__raw_writel(val, cfg_chip3_base);
> >
> >  	ret = davinci_cfg_reg(DA850_GPIO2_6);
> >  	if (ret)
> > -		pr_warning("da850_evm_init:GPIO(2,6) mux setup "
> > -							"failed\n");
> > +		pr_warn("%s:GPIO(2,6) mux setup failed\n", __func__);
> 
>     Worth inserting space after colon here.

Will do.

> 
> WBR, Sergei

Thanks & Regards,

- Rob
Sekhar Nori Oct. 27, 2012, 8:52 a.m. UTC | #3
On 10/27/2012 6:29 AM, Tivy, Robert wrote:
> Thanks for your comments, Sergei.  Please see below...
> 
>> -----Original Message-----
>> From: Sergei Shtylyov [mailto:sshtylyov@mvista.com]
>> Sent: Friday, October 26, 2012 2:46 AM
>> To: Tivy, Robert
>> Cc: davinci-linux-open-source@linux.davincidsp.com; linux-arm-
>> kernel@lists.infradead.org; Ring, Chris; Grosen, Mark; Nori, Sekhar
>> Subject: Re: [PATCH v2 1/6] ARM: davinci: Changed pr_warning() to
>> pr_warn()
>>
>> Hello.
>>
>>     It's not a good idea to send multiple patches with the same
>> subject.
>> Actually, in this case it's worth merging all 4 patches into one.
> 
> My first patch submission had them all as one patch, but Sekhar asked that they be split into 4 separate patches to make the merge easier.
> 
> I can make each one have a different subject, though.

Yes, it was I who asked for the patch to be separated out. My main
motivation was to keep board and soc file changes from mixing together.
The subject line for each patch should be different though.

> 
>>
>> On 26-10-2012 0:35, Robert Tivy wrote:
>>
>>> Also, while modifying those pr_warning() calls I changed hardcoded
>>> function names to use '"%s:", __func__' instead
>>
>>> Signed-off-by: Robert Tivy <rtivy@ti.com>
>>> ---
>>> Clean up files that will be otherwise modified in subsequent patch.
>>
>>> Applies to v3.5 tag (commit 28a33cbc24e4256c143dce96c7d93bf423229f92)
>> of
>>> Linus' mainline kernel at git.kernel.org.
>>
>>     3.5 is too old. Why not to 3.6 or even 3.7-rc2?
> 
> I will attempt to recreate this patch series on 3.7-rc2, although I will need to change it to use the newer "rproc" APIs and data structures.

All the more reason to rebase to v3.7-rc2!

Thanks,
Sekhar
diff mbox

Patch

diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 0149fb4..bbb3c73 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -344,13 +344,13 @@  static inline void da850_evm_setup_nor_nand(void)
 	if (!HAS_MMC) {
 		ret = davinci_cfg_reg_list(da850_evm_nand_pins);
 		if (ret)
-			pr_warning("da850_evm_init: nand mux setup failed: "
-					"%d\n", ret);
+			pr_warn("%s: nand mux setup failed: %d\n",
+				__func__, ret);
 
 		ret = davinci_cfg_reg_list(da850_evm_nor_pins);
 		if (ret)
-			pr_warning("da850_evm_init: nor mux setup failed: %d\n",
-				ret);
+			pr_warn("%s: nor mux setup failed: %d\n",
+				__func__, ret);
 
 		da850_evm_init_nor();
 
@@ -463,19 +463,19 @@  static int da850_evm_ui_expander_setup(struct i2c_client *client, unsigned gpio,
 
 	ret = gpio_request(sel_a, da850_evm_ui_exp[DA850_EVM_UI_EXP_SEL_A]);
 	if (ret) {
-		pr_warning("Cannot open UI expander pin %d\n", sel_a);
+		pr_warn("Cannot open UI expander pin %d\n", sel_a);
 		goto exp_setup_sela_fail;
 	}
 
 	ret = gpio_request(sel_b, da850_evm_ui_exp[DA850_EVM_UI_EXP_SEL_B]);
 	if (ret) {
-		pr_warning("Cannot open UI expander pin %d\n", sel_b);
+		pr_warn("Cannot open UI expander pin %d\n", sel_b);
 		goto exp_setup_selb_fail;
 	}
 
 	ret = gpio_request(sel_c, da850_evm_ui_exp[DA850_EVM_UI_EXP_SEL_C]);
 	if (ret) {
-		pr_warning("Cannot open UI expander pin %d\n", sel_c);
+		pr_warn("Cannot open UI expander pin %d\n", sel_c);
 		goto exp_setup_selc_fail;
 	}
 
@@ -487,7 +487,7 @@  static int da850_evm_ui_expander_setup(struct i2c_client *client, unsigned gpio,
 	da850_evm_ui_keys_init(gpio);
 	ret = platform_device_register(&da850_evm_ui_keys_device);
 	if (ret) {
-		pr_warning("Could not register UI GPIO expander push-buttons");
+		pr_warn("Could not register UI GPIO expander push-buttons");
 		goto exp_setup_keys_fail;
 	}
 
@@ -674,14 +674,14 @@  static int da850_evm_bb_expander_setup(struct i2c_client *client,
 	da850_evm_bb_keys_init(gpio);
 	ret = platform_device_register(&da850_evm_bb_keys_device);
 	if (ret) {
-		pr_warning("Could not register baseboard GPIO expander keys");
+		pr_warn("Could not register baseboard GPIO expander keys");
 		goto io_exp_setup_sw_fail;
 	}
 
 	da850_evm_bb_leds_init(gpio);
 	ret = platform_device_register(&da850_evm_bb_leds_device);
 	if (ret) {
-		pr_warning("Could not register baseboard GPIO expander LEDS");
+		pr_warn("Could not register baseboard GPIO expander LEDS");
 		goto io_exp_setup_leds_fail;
 	}
 
@@ -1046,21 +1046,19 @@  static int __init da850_evm_config_emac(void)
 	}
 
 	if (ret)
-		pr_warning("da850_evm_init: cpgmac/rmii mux setup failed: %d\n",
-				ret);
+		pr_warn("%s: cpgmac/rmii mux setup failed: %d\n",
+			__func__, ret);
 
 	/* configure the CFGCHIP3 register for RMII or MII */
 	__raw_writel(val, cfg_chip3_base);
 
 	ret = davinci_cfg_reg(DA850_GPIO2_6);
 	if (ret)
-		pr_warning("da850_evm_init:GPIO(2,6) mux setup "
-							"failed\n");
+		pr_warn("%s:GPIO(2,6) mux setup failed\n", __func__);
 
 	ret = gpio_request(DA850_MII_MDIO_CLKEN_PIN, "mdio_clk_en");
 	if (ret) {
-		pr_warning("Cannot open GPIO %d\n",
-					DA850_MII_MDIO_CLKEN_PIN);
+		pr_warn("Cannot open GPIO %d\n", DA850_MII_MDIO_CLKEN_PIN);
 		return ret;
 	}
 
@@ -1071,8 +1069,7 @@  static int __init da850_evm_config_emac(void)
 
 	ret = da8xx_register_emac();
 	if (ret)
-		pr_warning("da850_evm_init: emac registration failed: %d\n",
-				ret);
+		pr_warn("%s: emac registration failed: %d\n", __func__, ret);
 
 	return 0;
 }
@@ -1261,57 +1258,53 @@  static __init void da850_evm_init(void)
 
 	ret = pmic_tps65070_init();
 	if (ret)
-		pr_warning("da850_evm_init: TPS65070 PMIC init failed: %d\n",
-				ret);
+		pr_warn("%s: TPS65070 PMIC init failed: %d\n", __func__, ret);
 
 	ret = da850_register_edma(da850_edma_rsv);
 	if (ret)
-		pr_warning("da850_evm_init: edma registration failed: %d\n",
-				ret);
+		pr_warn("%s: edma registration failed: %d\n", __func__, ret);
 
 	ret = davinci_cfg_reg_list(da850_i2c0_pins);
 	if (ret)
-		pr_warning("da850_evm_init: i2c0 mux setup failed: %d\n",
-				ret);
+		pr_warn("%s: i2c0 mux setup failed: %d\n", __func__, ret);
 
 	ret = da8xx_register_i2c(0, &da850_evm_i2c_0_pdata);
 	if (ret)
-		pr_warning("da850_evm_init: i2c0 registration failed: %d\n",
-				ret);
+		pr_warn("%s: i2c0 registration failed: %d\n", __func__, ret);
 
 
 	ret = da8xx_register_watchdog();
 	if (ret)
-		pr_warning("da830_evm_init: watchdog registration failed: %d\n",
-				ret);
+		pr_warn("%s: watchdog registration failed: %d\n",
+			__func__, ret);
 
 	if (HAS_MMC) {
 		ret = davinci_cfg_reg_list(da850_evm_mmcsd0_pins);
 		if (ret)
-			pr_warning("da850_evm_init: mmcsd0 mux setup failed:"
-					" %d\n", ret);
+			pr_warn("%s: mmcsd0 mux setup failed: %d\n",
+				__func__, ret);
 
 		ret = gpio_request(DA850_MMCSD_CD_PIN, "MMC CD\n");
 		if (ret)
-			pr_warning("da850_evm_init: can not open GPIO %d\n",
-					DA850_MMCSD_CD_PIN);
+			pr_warn("%s: can not open GPIO %d\n",
+				__func__, DA850_MMCSD_CD_PIN);
 		gpio_direction_input(DA850_MMCSD_CD_PIN);
 
 		ret = gpio_request(DA850_MMCSD_WP_PIN, "MMC WP\n");
 		if (ret)
-			pr_warning("da850_evm_init: can not open GPIO %d\n",
-					DA850_MMCSD_WP_PIN);
+			pr_warn("%s: can not open GPIO %d\n",
+				__func__, DA850_MMCSD_WP_PIN);
 		gpio_direction_input(DA850_MMCSD_WP_PIN);
 
 		ret = da8xx_register_mmcsd0(&da850_mmc_config);
 		if (ret)
-			pr_warning("da850_evm_init: mmcsd0 registration failed:"
-					" %d\n", ret);
+			pr_warn("%s: mmcsd0 registration failed: %d\n",
+				__func__, ret);
 
 		ret = da850_wl12xx_init();
 		if (ret)
-			pr_warning("da850_evm_init: wl12xx initialization"
-				   " failed: %d\n", ret);
+			pr_warn("%s: wl12xx initialization failed: %d\n",
+				__func__, ret);
 	}
 
 	davinci_serial_init(&da850_evm_uart_config);
@@ -1329,62 +1322,53 @@  static __init void da850_evm_init(void)
 
 	ret = davinci_cfg_reg_list(da850_evm_mcasp_pins);
 	if (ret)
-		pr_warning("da850_evm_init: mcasp mux setup failed: %d\n",
-				ret);
+		pr_warn("%s: mcasp mux setup failed: %d\n", __func__, ret);
 
 	da8xx_register_mcasp(0, &da850_evm_snd_data);
 
 	ret = davinci_cfg_reg_list(da850_lcdcntl_pins);
 	if (ret)
-		pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n",
-				ret);
+		pr_warn("%s: lcdcntl mux setup failed: %d\n", __func__, ret);
 
 	/* Handle board specific muxing for LCD here */
 	ret = davinci_cfg_reg_list(da850_evm_lcdc_pins);
 	if (ret)
-		pr_warning("da850_evm_init: evm specific lcd mux setup "
-				"failed: %d\n",	ret);
+		pr_warn("%s: evm specific lcd mux setup failed: %d\n",
+			__func__, ret);
 
 	ret = da850_lcd_hw_init();
 	if (ret)
-		pr_warning("da850_evm_init: lcd initialization failed: %d\n",
-				ret);
+		pr_warn("%s: lcd initialization failed: %d\n", __func__, ret);
 
 	sharp_lk043t1dg01_pdata.panel_power_ctrl = da850_panel_power_ctrl,
 	ret = da8xx_register_lcdc(&sharp_lk043t1dg01_pdata);
 	if (ret)
-		pr_warning("da850_evm_init: lcdc registration failed: %d\n",
-				ret);
+		pr_warn("%s: lcdc registration failed: %d\n", __func__, ret);
 
 	ret = da8xx_register_rtc();
 	if (ret)
-		pr_warning("da850_evm_init: rtc setup failed: %d\n", ret);
+		pr_warn("%s: rtc setup failed: %d\n", __func__, ret);
 
 	ret = da850_evm_init_cpufreq();
 	if (ret)
-		pr_warning("da850_evm_init: cpufreq registration failed: %d\n",
-				ret);
+		pr_warn("%s: cpufreq registration failed: %d\n", __func__, ret);
 
 	ret = da8xx_register_cpuidle();
 	if (ret)
-		pr_warning("da850_evm_init: cpuidle registration failed: %d\n",
-				ret);
+		pr_warn("%s: cpuidle registration failed: %d\n", __func__, ret);
 
 	ret = da850_register_pm(&da850_pm_device);
 	if (ret)
-		pr_warning("da850_evm_init: suspend registration failed: %d\n",
-				ret);
+		pr_warn("%s: suspend registration failed: %d\n", __func__, ret);
 
 	ret = da8xx_register_spi(1, da850evm_spi_info,
 				 ARRAY_SIZE(da850evm_spi_info));
 	if (ret)
-		pr_warning("da850_evm_init: spi 1 registration failed: %d\n",
-				ret);
+		pr_warn("%s: spi 1 registration failed: %d\n", __func__, ret);
 
 	ret = da850_register_sata(DA850EVM_SATA_REFCLKPN_RATE);
 	if (ret)
-		pr_warning("da850_evm_init: sata registration failed: %d\n",
-				ret);
+		pr_warn("%s: sata registration failed: %d\n", __func__, ret);
 
 	da850_evm_setup_mac_addr();
 }