All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: build warnings in Linus' tree
@ 2011-01-14  0:09 Stephen Rothwell
  2011-01-14  0:17 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2011-01-14  0:09 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Wolfram Sang, Linus

[-- Attachment #1: Type: text/plain, Size: 9253 bytes --]

Hi all,

[This is deliberately long ...]

While building Linus' tree, today's linux-next build (x86_64
allmodconfig) produced these warnings:

drivers/i2c/muxes/gpio-i2cmux.c: In function 'gpiomux_probe':
drivers/i2c/muxes/gpio-i2cmux.c:101: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/leds/leds-bd2802.c: In function 'bd2802_probe':
drivers/leds/leds-bd2802.c:700: warning: ignoring return value of 'gpio_request', declared with attribute warn_unused_result
drivers/leds/leds-bd2802.c:701: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/input/mouse/gpio_mouse.c: In function 'gpio_mouse_probe':
drivers/input/mouse/gpio_mouse.c:93: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
sound/soc/codecs/tlv320aic3x.c: In function 'aic3x_probe':
sound/soc/codecs/tlv320aic3x.c:1385: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/i2c/busses/i2c-gpio.c: In function 'i2c_gpio_setsda_dir':
drivers/i2c/busses/i2c-gpio.c:26: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
drivers/i2c/busses/i2c-gpio.c:28: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/i2c/busses/i2c-gpio.c: In function 'i2c_gpio_setscl_dir':
drivers/i2c/busses/i2c-gpio.c:49: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
drivers/i2c/busses/i2c-gpio.c:51: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/i2c/busses/i2c-gpio.c: In function 'i2c_gpio_probe':
drivers/i2c/busses/i2c-gpio.c:108: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/i2c/busses/i2c-gpio.c:111: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
drivers/i2c/busses/i2c-gpio.c:116: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/i2c/busses/i2c-gpio.c:119: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
drivers/input/keyboard/matrix_keypad.c: In function '__activate_col':
drivers/input/keyboard/matrix_keypad.c:54: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/input/keyboard/matrix_keypad.c:57: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
drivers/input/keyboard/matrix_keypad.c: In function 'init_matrix_gpio':
drivers/input/keyboard/matrix_keypad.c:317: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/input/keyboard/matrix_keypad.c:329: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
sound/soc/codecs/tlv320dac33.c: In function 'dac33_i2c_probe':
sound/soc/codecs/tlv320dac33.c:1563: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/input/touchscreen/cy8ctmg110_ts.c: In function 'cy8ctmg110_power':
drivers/input/touchscreen/cy8ctmg110_ts.c:71: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
sound/soc/codecs/tpa6130a2.c: In function 'tpa6130a2_probe':
sound/soc/codecs/tpa6130a2.c:402: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/i2c/busses/i2c-pca-platform.c: In function 'i2c_pca_pf_probe':
drivers/i2c/busses/i2c-pca-platform.c:216: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/media/radio/si4713-i2c.c: In function 'si4713_probe':
drivers/media/radio/si4713-i2c.c:2018: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/hwmon/sht15.c: In function 'sht15_connection_reset':
drivers/hwmon/sht15.c:128: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/hwmon/sht15.c: In function 'sht15_transmission_start':
drivers/hwmon/sht15.c:166: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/hwmon/sht15.c: In function 'sht15_wait_for_response':
drivers/hwmon/sht15.c:202: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
drivers/hwmon/sht15.c: In function 'sht15_update_single_val':
drivers/hwmon/sht15.c:248: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
drivers/hwmon/sht15.c: In function 'sht15_ack':
drivers/hwmon/sht15.c:414: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/hwmon/sht15.c:422: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
drivers/hwmon/sht15.c: In function 'sht15_end_transmission':
drivers/hwmon/sht15.c:432: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/hwmon/sht15.c: In function 'sht15_probe':
drivers/hwmon/sht15.c:563: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/regulator/max8952.c: In function 'max8952_pmic_probe':
drivers/regulator/max8952.c:228: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/regulator/max8952.c:246: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/regulator/max8952.c:252: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/rtc/rtc-v3020.c: In function 'v3020_gpio_map':
drivers/rtc/rtc-v3020.c:132: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/rtc/rtc-v3020.c: In function 'v3020_gpio_write_bit':
drivers/rtc/rtc-v3020.c:156: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/rtc/rtc-v3020.c: In function 'v3020_gpio_read_bit':
drivers/rtc/rtc-v3020.c:168: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
drivers/usb/otg/gpio_vbus.c: In function 'gpio_vbus_probe':
drivers/usb/otg/gpio_vbus.c:249: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
drivers/usb/otg/gpio_vbus.c:270: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/w1/masters/w1-gpio.c: In function 'w1_gpio_write_bit_dir':
drivers/w1/masters/w1-gpio.c:27: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
drivers/w1/masters/w1-gpio.c:29: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/w1/masters/w1-gpio.c: In function 'w1_gpio_probe':
drivers/w1/masters/w1-gpio.c:67: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/w1/masters/w1-gpio.c:70: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
drivers/net/phy/mdio-gpio.c: In function 'mdio_dir':
drivers/net/phy/mdio-gpio.c:48: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/net/phy/mdio-gpio.c:50: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
drivers/net/phy/mdio-gpio.c: In function 'mdio_gpio_bus_init':
drivers/net/phy/mdio-gpio.c:126: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/media/video/via-camera.c: In function 'via_sensor_power_setup':
drivers/media/video/via-camera.c:208: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/media/video/via-camera.c:209: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/net/wireless/p54/p54spi.c: In function 'p54spi_probe':
drivers/net/wireless/p54/p54spi.c:641: warning: ignoring return value of 'gpio_direction_output', declared with attribute warn_unused_result
drivers/net/wireless/p54/p54spi.c:642: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result

Introduced by commit 0fdae42d361bbb431ca0ab0efed5126a94821177 ("gpiolib:
annotate gpio-intialization with __must_check").

We used to try to fix most of the bad code *before* introducing these
warnings ... this is just making it much harder to see "real" warnings.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build warnings in Linus' tree
  2011-01-14  0:09 linux-next: build warnings in Linus' tree Stephen Rothwell
@ 2011-01-14  0:17 ` Andrew Morton
  2011-01-14  1:06   ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2011-01-14  0:17 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Wolfram Sang, Linus

On Fri, 14 Jan 2011 11:09:52 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> drivers/net/wireless/p54/p54spi.c:642: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
> 
> Introduced by commit 0fdae42d361bbb431ca0ab0efed5126a94821177 ("gpiolib:
> annotate gpio-intialization with __must_check").

Complete brainfart - I meant to drop that patch ages ago.

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

* Re: linux-next: build warnings in Linus' tree
  2011-01-14  0:17 ` Andrew Morton
@ 2011-01-14  1:06   ` Greg KH
  2011-01-14  8:34     ` [PATCH] include/gpio.h: remove remaining __must_check-annotiations Wolfram Sang
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2011-01-14  1:06 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Stephen Rothwell, linux-next, linux-kernel, Wolfram Sang, Linus

On Thu, Jan 13, 2011 at 04:17:00PM -0800, Andrew Morton wrote:
> On Fri, 14 Jan 2011 11:09:52 +1100
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > drivers/net/wireless/p54/p54spi.c:642: warning: ignoring return value of 'gpio_direction_input', declared with attribute warn_unused_result
> > 
> > Introduced by commit 0fdae42d361bbb431ca0ab0efed5126a94821177 ("gpiolib:
> > annotate gpio-intialization with __must_check").
> 
> Complete brainfart - I meant to drop that patch ages ago.

Ick, yeah, that patch isn't ok to go in as-is, all of the callers need
to be fixed up first, which is what I thought we had agreed on...

thanks,

greg k-h

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

* [PATCH] include/gpio.h: remove remaining __must_check-annotiations
  2011-01-14  1:06   ` Greg KH
@ 2011-01-14  8:34     ` Wolfram Sang
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2011-01-14  8:34 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Greg KH, Andrew Morton, Linus Torvalds

Commit 5f829e405ec4e96f711165a4a7b55c271d4363e2 (gpiolib: add missing functions
to generic fallback) also introduced two.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Greg KH <gregkh@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
---

Yes, that was an accident. We agreed to not include these patches. This fixup
makes the __must_check revert complete, but keeps the missing functions.

 include/linux/gpio.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 4b47ed9..32720ba 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -35,13 +35,13 @@ static inline int gpio_request(unsigned gpio, const char *label)
 	return -ENOSYS;
 }
 
-static inline int __must_check gpio_request_one(unsigned gpio,
+static inline int gpio_request_one(unsigned gpio,
 					unsigned long flags, const char *label)
 {
 	return -ENOSYS;
 }
 
-static inline int __must_check gpio_request_array(struct gpio *array, size_t num)
+static inline int gpio_request_array(struct gpio *array, size_t num)
 {
 	return -ENOSYS;
 }
-- 
1.7.2.3


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

end of thread, other threads:[~2011-01-14  8:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-14  0:09 linux-next: build warnings in Linus' tree Stephen Rothwell
2011-01-14  0:17 ` Andrew Morton
2011-01-14  1:06   ` Greg KH
2011-01-14  8:34     ` [PATCH] include/gpio.h: remove remaining __must_check-annotiations Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.