linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Regulator API ignored return values
@ 2013-03-11 20:43 Arnd Bergmann
  2013-03-11 20:48 ` Stephen Warren
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Arnd Bergmann @ 2013-03-11 20:43 UTC (permalink / raw)
  To: linux-kernel, Stephen Warren
  Cc: linux-arm-kernel, Mark Brown, Linus Walleij, Chris Ball, Axel Lin,
	Jingoo Han, Felipe Balbi, Dmitry Torokhov

Hi all,

Mark Brown has added a patch to Linux-next that warns about certain regulator
API functions being called without checking the results, which seems to have
uncovered a number of bugs.

I've added a few people to Cc that might be interested in the reports and
in fixing these bugs. Below you can find a list of all instances I found
building the ARM defconfigs.

	Arnd

==> build/dove_defconfig/faillog <==
/git/arm-soc/drivers/mmc/host/sdhci.c: In function 'sdhci_add_host':
/git/arm-soc/drivers/mmc/host/sdhci.c:2910:19: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

==> build/imx_v4_v5_defconfig/faillog <==
/git/arm-soc/drivers/input/touchscreen/ads7846.c: In function '__ads7846_enable':
/git/arm-soc/drivers/input/touchscreen/ads7846.c:239:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
/git/arm-soc/drivers/mmc/host/sdhci.c: In function 'sdhci_add_host':
/git/arm-soc/drivers/mmc/host/sdhci.c:2910:19: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
/git/arm-soc/drivers/video/backlight/l4f00242t03.c: In function 'l4f00242t03_lcd_init':
/git/arm-soc/drivers/video/backlight/l4f00242t03.c:58:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
/git/arm-soc/drivers/video/backlight/l4f00242t03.c:61:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

==> build/imx_v6_v7_defconfig/faillog <==
/git/arm-soc/drivers/mmc/host/sdhci.c: In function 'sdhci_add_host':
/git/arm-soc/drivers/mmc/host/sdhci.c:2910:19: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
/git/arm-soc/drivers/video/backlight/l4f00242t03.c: In function 'l4f00242t03_lcd_init':
/git/arm-soc/drivers/video/backlight/l4f00242t03.c:58:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
/git/arm-soc/drivers/video/backlight/l4f00242t03.c:61:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

==> build/magician_defconfig/faillog <==
/git/arm-soc/drivers/usb/otg/gpio_vbus.c: In function 'set_vbus_draw':
/git/arm-soc/drivers/usb/otg/gpio_vbus.c:72:20: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

==> build/mmp2_defconfig/faillog <==
/git/arm-soc/drivers/mmc/host/sdhci.c: In function 'sdhci_add_host':
/git/arm-soc/drivers/mmc/host/sdhci.c:2910:19: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

==> build/omap2plus_defconfig/faillog <==
/git/arm-soc/drivers/input/touchscreen/ads7846.c: In function '__ads7846_enable':
/git/arm-soc/drivers/input/touchscreen/ads7846.c:239:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

==> build/tegra_defconfig/faillog <==
/git/arm-soc/arch/arm/mach-tegra/board-harmony-pcie.c: In function 'harmony_pcie_init':
/git/arm-soc/arch/arm/mach-tegra/board-harmony-pcie.c:65:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
/git/arm-soc/drivers/mmc/host/sdhci.c: In function 'sdhci_add_host':
/git/arm-soc/drivers/mmc/host/sdhci.c:2910:19: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

==> build/u8500_defconfig/faillog <==
/git/arm-soc/arch/arm/mach-ux500/board-mop500.c: In function 'mop500_prox_activate':
/git/arm-soc/arch/arm/mach-ux500/board-mop500.c:432:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
/git/arm-soc/drivers/mfd/ab8500-gpadc.c: In function 'ab8500_gpadc_runtime_resume':
/git/arm-soc/drivers/mfd/ab8500-gpadc.c:598:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
/git/arm-soc/drivers/mfd/ab8500-gpadc.c: In function 'ab8500_gpadc_probe':
/git/arm-soc/drivers/mfd/ab8500-gpadc.c:655:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
/git/arm-soc/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c: In function 'synaptics_rmi4_resume':
/git/arm-soc/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:1085:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Regulator API ignored return values
@ 2013-03-12  5:11 Jingoo Han
  0 siblings, 0 replies; 5+ messages in thread
From: Jingoo Han @ 2013-03-12  5:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-kernel@vger.kernel.org, Stephen Warren,
	linux-arm-kernel@lists.infradead.org, Mark Brown, Linus Walleij,
	Chris Ball, Axel Lin, Jingoo Han, Felipe Balbi, Dmitry Torokhov

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 1259 bytes --]

On Tuesday, March 12, 2013 5:44 AM, Arnd Bergmann wrote:
> 
> Hi all,
> 
> Mark Brown has added a patch to Linux-next that warns about certain regulator
> API functions being called without checking the results, which seems to have
> uncovered a number of bugs.
> 
> I've added a few people to Cc that might be interested in the reports and
> in fixing these bugs. Below you can find a list of all instances I found
> building the ARM defconfigs.
> 
> 	Arnd
> 
[...]
> /git/arm-soc/drivers/video/backlight/l4f00242t03.c: In function 'l4f00242t03_lcd_init':
> /git/arm-soc/drivers/video/backlight/l4f00242t03.c:58:18: warning: ignoring return value of
> 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
> /git/arm-soc/drivers/video/backlight/l4f00242t03.c:61:18: warning: ignoring return value of
> 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

Hi Arnd Bergmann,

I fixed these warnings and the patch was added to mm-tree.
(http://www.spinics.net/lists/mm-commits/msg95324.html)
Thank you for reporting :)

Best regards,
Jingoo Han
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-12 18:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11 20:43 Regulator API ignored return values Arnd Bergmann
2013-03-11 20:48 ` Stephen Warren
2013-03-11 21:55 ` Chris Ball
2013-03-12 18:22 ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2013-03-12  5:11 Jingoo Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).