Fixing boot warnings in -next
Subsystems (7)
cover Fixing boot warnings in -next
When booting -next on the u8500 based Snowball development board these new warnings appeared. If applicable these should probably be filtered though your -fixes branches.
PATCH 1/4 ARM: ux500: Rid ignored return value of regulator_enable() compiler warning
arch/arm/mach-ux500/board-mop500.c: In function ?mop500_prox_activate?:arch/arm/mach-ux500/board-mop500.c:406:18: warning: ignoring return value of
?regulator_enable?, declared with attribute warn_unused_result [-Wunused-result]
--- arch/arm/mach-ux500/board-mop500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-ux500/board-mop500.c +2 -2
@@ -403,8 +403,8 @@ static int mop500_prox_activate(struct device *dev) "no regulator\n");return PTR_ERR (prox_regulator); } -regulator_enable (prox_regulator); -return 0 ; + +return regulator_enable (prox_regulator); }static void mop500_prox_deactivate (struct device *dev)
Signature · 1 line
1.7.10.4
Linus Walleij
AppliedRe: [PATCH 1/4] ARM: ux500: Rid ignored return value of regulator_enable() compiler warning
Quoted 6 lines · Lee Jones
arch/arm/mach-ux500/board-mop500.c: In function ?mop500_prox_activate?:arch/arm/mach-ux500/board-mop500.c:406:18: warning: ignoring return value of
?regulator_enable?, declared with attributewarn_unused_result[-Wunused-result]Signed-off-by Lee Jones <[email protected]>
Applied!
Thanks,
Linus Walleij
PATCH 2/4 mfd: ab8500-gpadc: Suppress 'ignoring regulator_enable() return value' warning
In reply to Lee Jonesdrivers/mfd/ab8500-gpadc.c: In function ?ab8500_gpadc_resume?:drivers/mfd/ab8500-gpadc.c:911:18: warning: ignoring return value of
?regulator_enable?, declared with attribute warn_unused_result [-Wunused-result]
--- drivers/mfd/ab8500-gpadc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/mfd/ab8500-gpadc.c +4 -1
@@ -907,8 +907,11 @@ static int ab8500_gpadc_suspend(struct device *dev)static int ab8500_gpadc_resume (struct device *dev) {struct ab8500_gpadc *gpadc =dev_get_drvdata (dev); +int ret; -regulator_enable (gpadc->regu); + ret =regulator_enable (gpadc->regu); +if (ret <0 ) +return ret;pm_runtime_mark_last_busy (gpadc->dev);pm_runtime_put_autosuspend (gpadc->dev);
Signature · 1 line
1.7.10.4
Re: [PATCH 2/4] mfd: ab8500-gpadc: Suppress 'ignoring regulator_enable() return value' warning
Quoted 29 lines · Lee Jones
drivers/mfd/ab8500-gpadc.c: In function ?ab8500_gpadc_resume?:drivers/mfd/ab8500-gpadc.c:911:18: warning: ignoring return value of
?regulator_enable?, declared with attributewarn_unused_result[-Wunused-result]Cc Samuel Ortiz <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/mfd/ab8500-gpadc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/mfd/ab8500-gpadc.c +4
-2@@ -907,8 +907,11 @@ static int ab8500_gpadc_suspend(struct device *dev)static int ab8500_gpadc_resume (struct device *dev) {struct ab8500_gpadc *gpadc =dev_get_drvdata (dev); +int ret; -regulator_enable (gpadc->regu); + ret =regulator_enable (gpadc->regu); +if (ret <0 ) +return ret;pm_runtime_mark_last_busy (gpadc->dev);pm_runtime_put_autosuspend (gpadc->dev); --
Quoted 1 line
1.7.10.4
Yours,
Linus Walleij
Re: [PATCH 2/4] mfd: ab8500-gpadc: Suppress 'ignoring regulator_enable() return value' warning
Quoted 27 lines · Linus Walleij
Quoted 26 lines · Lee Jones
drivers/mfd/ab8500-gpadc.c: In function ?ab8500_gpadc_resume?:drivers/mfd/ab8500-gpadc.c:911:18: warning: ignoring return value of
?regulator_enable?, declared with attributewarn_unused_result[-Wunused-result]Cc Samuel Ortiz <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/mfd/ab8500-gpadc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/mfd/ab8500-gpadc.c +4
-1@@ -907,8 +907,11 @@ static int ab8500_gpadc_suspend(struct device *dev)static int ab8500_gpadc_resume (struct device *dev) {struct ab8500_gpadc *gpadc =dev_get_drvdata (dev); +int ret; -regulator_enable (gpadc->regu); + ret =regulator_enable (gpadc->regu); +if (ret <0 ) +return ret;
Quoted 4 lines
drivers/mfd/ab8500-gpadc.c static int ab8500_gpadc_suspend(struct device *dev) · line 917
Quoted 2 lines
drivers/mfd/ab8500-gpadc.c +0
-0pm_runtime_mark_last_busy (gpadc->dev);pm_runtime_put_autosuspend (gpadc->dev);Acked-by Linus Walleij <[email protected]>
As it has your Ack, I'm going to add an error print as per Srinidhi's suggestion, test it again and apply this to my MFD tree.
Signature · 4 lines
Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH 2/4] mfd: ab8500-gpadc: Suppress 'ignoring regulator_enable() return value' warning
Quoted 29 lines · Lee Jones
Quoted 27 lines · Linus Walleij
Quoted 26 lines · Lee Jones
drivers/mfd/ab8500-gpadc.c: In function ?ab8500_gpadc_resume?:drivers/mfd/ab8500-gpadc.c:911:18: warning: ignoring return value of
?regulator_enable?, declared with attributewarn_unused_result[-Wunused-result]Cc Samuel Ortiz <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/mfd/ab8500-gpadc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/mfd/ab8500-gpadc.c +4
-1@@ -907,8 +907,11 @@ static int ab8500_gpadc_suspend(struct device *dev)static int ab8500_gpadc_resume (struct device *dev) {struct ab8500_gpadc *gpadc =dev_get_drvdata (dev); +int ret; -regulator_enable (gpadc->regu); + ret =regulator_enable (gpadc->regu); +if (ret <0 ) +return ret;
Quoted 7 lines
Quoted 4 lines
drivers/mfd/ab8500-gpadc.c static int ab8500_gpadc_suspend(struct device *dev) · line 917
Quoted 2 lines
drivers/mfd/ab8500-gpadc.c +0
-0pm_runtime_mark_last_busy (gpadc->dev);pm_runtime_put_autosuspend (gpadc->dev);Acked-by Linus Walleij <[email protected]>As it has your Ack, I'm going to add an error print as per Srinidhi's suggestion, test it again and apply this to my MFD tree.
Slight change of plan, as I've changed the semantics.
Would you be kind enough to see v2?
Signature · 4 lines
Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v2 2/4 mfd: ab8500-gpadc: Suppress 'ignoring regulator_enable() return value' warning
In reply to Lee Jonesdrivers/mfd/ab8500-gpadc.c: In function ?ab8500_gpadc_resume?:drivers/mfd/ab8500-gpadc.c:911:18: warning: ignoring return value of
?regulator_enable?, declared with attribute warn_unused_result [-Wunused-result]
drivers/mfd/ab8500-gpadc.c +5 -2
@@ -907,14 +907,17 @@ static int ab8500_gpadc_suspend(struct device *dev)static int ab8500_gpadc_resume (struct device *dev) {struct ab8500_gpadc *gpadc =dev_get_drvdata (dev); +int ret; -regulator_enable (gpadc->regu); + ret =regulator_enable (gpadc->regu); +if (ret) +dev_err (dev,"Failed to enable vtvout LDO: %d\n" , ret);pm_runtime_mark_last_busy (gpadc->dev);pm_runtime_put_autosuspend (gpadc->dev);mutex_unlock (&gpadc->ab8500_gpadc_lock); -return 0 ; +return ret; }static int ab8500_gpadc_probe (struct platform_device *pdev)
Re: [PATCH 2/4 v2] mfd: ab8500-gpadc: Suppress 'ignoring regulator_enable() return value' warning
Quoted 7 lines · Lee Jones
drivers/mfd/ab8500-gpadc.c: In function ?ab8500_gpadc_resume?:drivers/mfd/ab8500-gpadc.c:911:18: warning: ignoring return value of
?regulator_enable?, declared with attributewarn_unused_result[-Wunused-result]Cc Samuel Ortiz <[email protected]>Signed-off-by Lee Jones <[email protected]>
Yours,
Linus Walleij
Re: [PATCH 2/4 v2] mfd: ab8500-gpadc: Suppress 'ignoring regulator_enable() return value' warning
Quoted 7 lines · Linus Walleij
Quoted 5 lines · Lee Jones
drivers/mfd/ab8500-gpadc.c: In function ?ab8500_gpadc_resume?:drivers/mfd/ab8500-gpadc.c:911:18: warning: ignoring return value of
?regulator_enable?, declared with attributewarn_unused_result[-Wunused-result]
Quoted 7 lines
Quoted 2 lines
Cc Samuel Ortiz <[email protected]>Signed-off-by Lee Jones <[email protected]>Acked-by Linus Walleij <[email protected]>Yours,
Linus Walleij
Nice, thanks. I'm applying this now.
Signature · 4 lines
Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 3/4 mmc: mmci: Ensure return value of regulator_enable() is checked
In reply to Lee JonesThis patch suppresses the warning below:
drivers/mmc/host/mmci.c: In function ?mmci_set_ios?:drivers/mmc/host/mmci.c:1165:20: warning: ignoring return value of
?regulator_enable?, declared with attribute warn_unused_result [-Wunused-result]
--- drivers/mmc/host/mmci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/mmc/host/mmci.c +7 -2
@@ -1130,6 +1130,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)struct variant_data *variant = host->variant;u32 pwr =0 ;unsigned long flags; +int ret;pm_runtime_get_sync (mmc_dev (mmc));
@@ -1161,8 +1162,12 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)break ;case MMC_POWER_ON :if (!IS_ERR (mmc->supply.vqmmc) && - !regulator_is_enabled (mmc->supply.vqmmc)) -regulator_enable (mmc->supply.vqmmc); + !regulator_is_enabled (mmc->supply.vqmmc)) { + ret =regulator_enable (mmc->supply.vqmmc); +if (ret <0 ) +dev_err (mmc_dev (mmc), +"failed to enable vqmmc regulator\n" ); + } pwr |=MCI_PWR_ON ;break ;
Signature · 1 line
1.7.10.4
Re: [PATCH 3/4] mmc: mmci: Ensure return value of regulator_enable() is checked
Quoted 27 lines · Lee Jones
This patch suppresses the warning below:
drivers/mmc/host/mmci.c: In function ?mmci_set_ios?:drivers/mmc/host/mmci.c:1165:20: warning: ignoring return value of
?regulator_enable?, declared with attributewarn_unused_result[-Wunused-result]Cc Russell King <[email protected]>Cc Chris Ball <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/mmc/host/mmci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)drivers/mmc/host/mmci.c +1
-0@@ -1130,6 +1130,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)struct variant_data *variant = host->variant;u32 pwr =0 ;unsigned long flags; +int ret;pm_runtime_get_sync (mmc_dev (mmc));
drivers/mmc/host/mmci.c static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) · line 1164
Quoted 4 lines
drivers/mmc/host/mmci.c +0
-1@@ -1161,8 +1162,12 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)break ;case MMC_POWER_ON : if (!IS_ERR(mmc->supply.vqmmc) && - !regulator_is_enabled (mmc->supply.vqmmc))
I realize that we actually have a bug here (and in the MMC_POWER_OFF mode as well).
We shall not use regulator_is_enabled API as a trigger to enable/fetch a reference to the regulator, since it will only tell us if the regulator is enabled - hw wise.
Instead we need a local variable in the mmci host struct keeping track if we have enabled the regulator. Do you mind fix this up in this patch as well since it is tightly coupled to the regulator handling!?
Otherwise it looks good to me.
Kind regards
Ulf Hansson
Quoted 18 lines
drivers/mmc/host/mmci.c +6
-2-regulator_enable (mmc->supply.vqmmc); + !regulator_is_enabled(mmc->supply.vqmmc)) { + ret =regulator_enable (mmc->supply.vqmmc); +if (ret <0 ) +dev_err (mmc_dev (mmc), +"failed to enable vqmmc regulator\n" ); + } pwr |=MCI_PWR_ON ;break ; --1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/4] mmc: mmci: Ensure return value of regulator_enable() is checked
Quoted 36 lines · Ulf Hansson
Quoted 27 lines · Lee Jones
This patch suppresses the warning below:
drivers/mmc/host/mmci.c: In function ?mmci_set_ios?:drivers/mmc/host/mmci.c:1165:20: warning: ignoring return value of
?regulator_enable?, declared with attributewarn_unused_result[-Wunused-result]Cc Russell King <[email protected]>Cc Chris Ball <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/mmc/host/mmci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)drivers/mmc/host/mmci.c +1
-0@@ -1130,6 +1130,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)struct variant_data *variant = host->variant;u32 pwr =0 ;unsigned long flags; +int ret;pm_runtime_get_sync (mmc_dev (mmc));drivers/mmc/host/mmci.c static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) · line 1164
Quoted 4 lines
drivers/mmc/host/mmci.c +0
-1@@ -1161,8 +1162,12 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)break ;case MMC_POWER_ON : if (!IS_ERR(mmc->supply.vqmmc) && - !regulator_is_enabled (mmc->supply.vqmmc))I realize that we actually have a bug here (and in the
MMC_POWER_OFFmode as well).
Quoted 6 lines
We shall not use
regulator_is_enabledAPI as a trigger to enable/fetch a reference to the regulator, since it will only tell us if the regulator is enabled - hw wise.
Instead we need a local variable in the mmci host struct keeping track if we have enabled the regulator. Do you mind fix this up in this patch as well since it is tightly coupled to the regulator handling!?
IMHO I think that should be taken care of in a separate patch. This patch only touches the line containing regulator_is_enabled() to encompass a multi-line comparison result.
Care to write that patch? I have so much on my TODO already. :|
Quoted 16 lines
Otherwise it looks good to me.
Kind regards
Ulf HanssonQuoted 11 lines
drivers/mmc/host/mmci.c +6
-1-regulator_enable (mmc->supply.vqmmc); + !regulator_is_enabled(mmc->supply.vqmmc)) { + ret =regulator_enable (mmc->supply.vqmmc); +if (ret <0 ) +dev_err (mmc_dev (mmc), +"failed to enable vqmmc regulator\n" ); + } pwr |=MCI_PWR_ON ;break ;
Signature · 4 lines
Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH 3/4] mmc: mmci: Ensure return value of regulator_enable() is checked
Quoted 45 lines · Lee Jones
Quoted 36 lines · Ulf Hansson
Quoted 27 lines · Lee Jones
This patch suppresses the warning below:
drivers/mmc/host/mmci.c: In function ?mmci_set_ios?:drivers/mmc/host/mmci.c:1165:20: warning: ignoring return value of
?regulator_enable?, declared with attributewarn_unused_result[-Wunused-result]Cc Russell King <[email protected]>Cc Chris Ball <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/mmc/host/mmci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)drivers/mmc/host/mmci.c +1
-0@@ -1130,6 +1130,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)struct variant_data *variant = host->variant;u32 pwr =0 ;unsigned long flags; +int ret;pm_runtime_get_sync (mmc_dev (mmc));drivers/mmc/host/mmci.c static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) · line 1164
Quoted 4 lines
drivers/mmc/host/mmci.c +0
-1@@ -1161,8 +1162,12 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)break ;case MMC_POWER_ON : if (!IS_ERR(mmc->supply.vqmmc) && - !regulator_is_enabled (mmc->supply.vqmmc))I realize that we actually have a bug here (and in the
MMC_POWER_OFFmode as well).Quoted 6 lines
We shall not use
regulator_is_enabledAPI as a trigger to enable/fetch a reference to the regulator, since it will only tell us if the regulator is enabled - hw wise.
Instead we need a local variable in the mmci host struct keeping track if we have enabled the regulator. Do you mind fix this up in this patch as well since it is tightly coupled to the regulator handling!?
Quoted 5 lines
IMHO I think that should be taken care of in a separate patch. This patch only touches the line containing
regulator_is_enabled()to encompass a multi-line comparison result.Care to write that patch? I have so much on my TODO already. :|
Sure, I can fix it.
I guess this patch will be going through Russell's patch tracker?
Quoted 23 lines
Quoted 17 lines
Otherwise it looks good to me.
Kind regards
Ulf HanssonQuoted 11 lines
drivers/mmc/host/mmci.c +6
-1-regulator_enable (mmc->supply.vqmmc); + !regulator_is_enabled(mmc->supply.vqmmc)) { + ret =regulator_enable (mmc->supply.vqmmc); +if (ret <0 ) +dev_err (mmc_dev (mmc), +"failed to enable vqmmc regulator\n" ); + } pwr |=MCI_PWR_ON ;break ;--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH 3/4] mmc: mmci: Ensure return value of regulator_enable() is checked
Quoted 50 lines · Ulf Hansson
Quoted 49 lines · Lee Jones
Quoted 36 lines · Ulf Hansson
Quoted 27 lines · Lee Jones
This patch suppresses the warning below:
drivers/mmc/host/mmci.c: In function ?mmci_set_ios?:drivers/mmc/host/mmci.c:1165:20: warning: ignoring return value of
?regulator_enable?, declared with attributewarn_unused_result[-Wunused-result]Cc Russell King <[email protected]>Cc Chris Ball <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/mmc/host/mmci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)drivers/mmc/host/mmci.c +1
-0@@ -1130,6 +1130,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)struct variant_data *variant = host->variant;u32 pwr =0 ;unsigned long flags; +int ret;pm_runtime_get_sync (mmc_dev (mmc));drivers/mmc/host/mmci.c static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) · line 1164
Quoted 4 lines
drivers/mmc/host/mmci.c +0
-1@@ -1161,8 +1162,12 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)break ;case MMC_POWER_ON : if (!IS_ERR(mmc->supply.vqmmc) && - !regulator_is_enabled (mmc->supply.vqmmc))I realize that we actually have a bug here (and in the
MMC_POWER_OFFmode as well).Quoted 6 lines
We shall not use
regulator_is_enabledAPI as a trigger to enable/fetch a reference to the regulator, since it will only tell us if the regulator is enabled - hw wise.
Instead we need a local variable in the mmci host struct keeping track if we have enabled the regulator. Do you mind fix this up in this patch as well since it is tightly coupled to the regulator handling!?IMHO I think that should be taken care of in a separate patch. This patch only touches the line containing
regulator_is_enabled()to encompass a multi-line comparison result.
Quoted 5 lines
Quoted 1 line
Care to write that patch? I have so much on my TODO already. :|
Sure, I can fix it.
I guess this patch will be going through Russell's patch tracker?
Yeah, I'll queue this and another one I have in a bit.
Quoted 17 lines
Quoted 17 lines
Quoted 16 lines
Otherwise it looks good to me.
Kind regards
Ulf HanssonQuoted 11 lines
drivers/mmc/host/mmci.c +6
-1-regulator_enable (mmc->supply.vqmmc); + !regulator_is_enabled(mmc->supply.vqmmc)) { + ret =regulator_enable (mmc->supply.vqmmc); +if (ret <0 ) +dev_err (mmc_dev (mmc), +"failed to enable vqmmc regulator\n" ); + } pwr |=MCI_PWR_ON ;break ;
Signature · 4 lines
Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 4/4 staging: ste_rmi4: Suppress 'ignoring return value of ‘regulator_enable()' warning
In reply to Lee Jonesdrivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:
In function ?synaptics_rmi4_resume?:drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:1090:18:
warning: ignoring return value of ?regulator_enable?, declared with attribute warn_unused_result [-Wunused-result
--- drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +3 -1
@@ -1087,7 +1087,9 @@ static int synaptics_rmi4_resume(struct device *dev)unsigned char intr_status;struct synaptics_rmi4_data *rmi4_data =dev_get_drvdata (dev); -regulator_enable (rmi4_data->regulator); + retval =regulator_enable (rmi4_data->regulator); +if (retval <0 ) +return retval;enable_irq (rmi4_data->i2c_client->irq); rmi4_data->touch_stopped = false;
Signature · 1 line
1.7.10.4
Re: [PATCH 4/4] staging: ste_rmi4: Suppress 'ignoring return value of ‘regulator_enable()' warning
Quoted 18 lines · Lee Jones
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:
In function ?synaptics_rmi4_resume?:drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:1090:18:
warning: ignoring return value of ?regulator_enable?, declared with attributewarn_unused_result[-Wunused-resultCc Greg Kroah-Hartman <[email protected]>Cc devel at driverdev.osuosl.orgSigned-off-by Lee Jones <[email protected]>--- drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +0
-0
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c static int synaptics_rmi4_resume(struct device *dev) · line 1092
Quoted 7 lines
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +3
-1@@ -1087,7 +1087,9 @@ static int synaptics_rmi4_resume(struct device *dev)unsigned char intr_status;struct synaptics_rmi4_data *rmi4_data =dev_get_drvdata (dev); -regulator_enable (rmi4_data->regulator); + retval =regulator_enable (rmi4_data->regulator); +if (retval <0 ) +return retval;
Does it make sense to add a dev_err?
Otherwise, you can add my
Quoted 6 lines
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +0
-0enable_irq (rmi4_data->i2c_client->irq); rmi4_data->touch_stopped = false;Signature · 1 line
1.7.10.4
Re: [PATCH 4/4] staging: ste_rmi4: Suppress 'ignoring return value of ‘regulator_enable()' warning
Quoted 22 lines · Srinidhi Kasagar
Quoted 21 lines · Lee Jones
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:
In function ?synaptics_rmi4_resume?:drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:1090:18:
warning: ignoring return value of ?regulator_enable?, declared with attributewarn_unused_result[-Wunused-resultCc Greg Kroah-Hartman <[email protected]>Cc devel at driverdev.osuosl.orgSigned-off-by Lee Jones <[email protected]>--- drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +0
-0@@ -1087,7 +1087,9 @@ static int synaptics_rmi4_resume(struct device *dev)unsigned char intr_status;struct synaptics_rmi4_data *rmi4_data =dev_get_drvdata (dev);
Quoted 5 lines
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c static int synaptics_rmi4_resume(struct device *dev) · line 1092
Quoted 4 lines
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +3
-1-regulator_enable (rmi4_data->regulator); + retval =regulator_enable (rmi4_data->regulator); +if (retval <0 ) +return retval;Does it make sense to add a
dev_err?
Yes, I can do that.
Quoted 2 lines
Otherwise, you can add my
Thanks.
Quoted 3 lines
Quoted 3 lines
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +0
-0enable_irq (rmi4_data->i2c_client->irq); rmi4_data->touch_stopped = false;
Signature · 4 lines
Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH 4/4] staging: ste_rmi4: Suppress 'ignoring return value of ‘regulator_enable()' warning
In reply to Srinidhi KasagarQuoted 22 lines · Srinidhi Kasagar
Quoted 21 lines · Lee Jones
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:
In function ?synaptics_rmi4_resume?:drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:1090:18:
warning: ignoring return value of ?regulator_enable?, declared with attributewarn_unused_result[-Wunused-resultCc Greg Kroah-Hartman <[email protected]>Cc devel at driverdev.osuosl.orgSigned-off-by Lee Jones <[email protected]>--- drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +0
-0@@ -1087,7 +1087,9 @@ static int synaptics_rmi4_resume(struct device *dev)unsigned char intr_status;struct synaptics_rmi4_data *rmi4_data =dev_get_drvdata (dev);
Quoted 6 lines
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c static int synaptics_rmi4_resume(struct device *dev) · line 1092
Quoted 4 lines
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +3
-1-regulator_enable (rmi4_data->regulator); + retval =regulator_enable (rmi4_data->regulator); +if (retval <0 ) +return retval;Does it make sense to add a
dev_err?
Is that a question?
regulator_enable() already prints some warnings. Probably it's not going to fail and adding code that is duplicative or will never be run is pointless.
regards,
dan carpenter
Re: [PATCH 4/4] staging: ste_rmi4: Suppress 'ignoring return value of ‘regulator_enable()' warning
Quoted 30 lines · Dan Carpenter
Quoted 22 lines · Srinidhi Kasagar
Quoted 21 lines · Lee Jones
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:
In function ?synaptics_rmi4_resume?:drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:1090:18:
warning: ignoring return value of ?regulator_enable?, declared with attributewarn_unused_result[-Wunused-resultCc Greg Kroah-Hartman <[email protected]>Cc devel at driverdev.osuosl.orgSigned-off-by Lee Jones <[email protected]>--- drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +0
-0@@ -1087,7 +1087,9 @@ static int synaptics_rmi4_resume(struct device *dev)unsigned char intr_status;struct synaptics_rmi4_data *rmi4_data =dev_get_drvdata (dev);Quoted 6 lines
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c static int synaptics_rmi4_resume(struct device *dev) · line 1092
Quoted 4 lines
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +3
-1-regulator_enable (rmi4_data->regulator); + retval =regulator_enable (rmi4_data->regulator); +if (retval <0 ) +return retval;Does it make sense to add a
dev_err?
Quoted 5 lines
Is that a question?
regulator_enable()already prints some warnings. Probably it's not going to fail and adding code that is duplicative or will never be run is pointless.
It has become a habit checking the return value and spit some errors. And BTW, there are many drivers which does this way..Anyway if your intention is to avoid them for the new drivers..I dont mind skipping this..
regards/srinidhi
Quoted 4 lines
regards,
dan carpenter
Re: [PATCH 4/4] staging: ste_rmi4: Suppress 'ignoring return value of ‘regulator_enable()' warning
Quoted 9 lines · Srinidhi Kasagar
Quoted 9 lines
Quoted 6 lines
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c static int synaptics_rmi4_resume(struct device *dev) · line 1092
Quoted 4 lines
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +3
-1-regulator_enable (rmi4_data->regulator); + retval =regulator_enable (rmi4_data->regulator); +if (retval <0 ) +return retval;Does it make sense to add a
dev_err?Is that a question?
Quoted 8 lines
Quoted 3 lines
regulator_enable()already prints some warnings. Probably it's not going to fail and adding code that is duplicative or will never be run is pointless.It has become a habit checking the return value and spit some errors. And BTW, there are many drivers which does this way..Anyway if your intention is to avoid them for the new drivers..I dont mind skipping this..
It's not like I'm trying to ban error messages. There isn't any official policy on error messages.
regards,
dan carpenter
PATCH v2 4/4 staging: ste_rmi4: Suppress 'ignoring return value of ‘regulator_enable()' warning
In reply to Lee Jonesdrivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:
In function ?synaptics_rmi4_resume?:drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:1090:18:
warning: ignoring return value of ?regulator_enable?, declared with attribute warn_unused_result [-Wunused-result
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +5 -1
@@ -1087,7 +1087,11 @@ static int synaptics_rmi4_resume(struct device *dev)unsigned char intr_status;struct synaptics_rmi4_data *rmi4_data =dev_get_drvdata (dev); -regulator_enable (rmi4_data->regulator); + retval =regulator_enable (rmi4_data->regulator); +if (retval) { +dev_err (dev,"Regulator enable failed (%d)\n" , retval); +return retval; + }enable_irq (rmi4_data->i2c_client->irq); rmi4_data->touch_stopped = false;
Re: [PATCH 4/4] staging: ste_rmi4: Suppress 'ignoring return value of ‘regulator_enable()' warning
In reply to Lee JonesHi Greg,
Quoted 18 lines
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:
In function ?synaptics_rmi4_resume?:drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:1090:18:
warning: ignoring return value of ?regulator_enable?, declared with attributewarn_unused_result[-Wunused-resultCc Greg Kroah-Hartman <[email protected]>Cc devel at driverdev.osuosl.orgSigned-off-by Lee Jones <[email protected]>--- drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +0
-0
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c static int synaptics_rmi4_resume(struct device *dev) · line 1095
Quoted 10 lines
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +3
-1@@ -1087,7 +1087,9 @@ static int synaptics_rmi4_resume(struct device *dev)unsigned char intr_status;struct synaptics_rmi4_data *rmi4_data =dev_get_drvdata (dev); -regulator_enable (rmi4_data->regulator); + retval =regulator_enable (rmi4_data->regulator); +if (retval <0 ) +return retval;enable_irq (rmi4_data->i2c_client->irq); rmi4_data->touch_stopped = false;
Are you planning to take this into the v3.10 -rcs?
Signature · 4 lines
Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Greg Kroah-Hartman
maintainerRe: [PATCH 4/4] staging: ste_rmi4: Suppress 'ignoring return value of ‘regulator_enable()' warning
Quoted 28 lines · Lee Jones
Hi Greg,
Quoted 26 lines
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:
In function ‘synaptics_rmi4_resume’:drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:1090:18:
warning: ignoring return value of ‘regulator_enable’, declared with attributewarn_unused_result[-Wunused-resultCc Greg Kroah-Hartman <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +3
-1@@ -1087,7 +1087,9 @@ static int synaptics_rmi4_resume(struct device *dev)unsigned char intr_status;struct synaptics_rmi4_data *rmi4_data =dev_get_drvdata (dev); -regulator_enable (rmi4_data->regulator); + retval =regulator_enable (rmi4_data->regulator); +if (retval <0 ) +return retval;
Quoted 4 lines
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c static int synaptics_rmi4_resume(struct device *dev) · line 1095
Quoted 2 lines
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +0
-0enable_irq (rmi4_data->i2c_client->irq); rmi4_data->touch_stopped = false;Are you planning to take this into the v3.10 -rcs?
Yes, I was, give me some time to catch up on my pending patch queue (644 patches and counting). Don't worry, it's not lost.
thanks,
greg k-h