linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] pinctrl: Use int type to store negative error codes
@ 2025-08-31  8:49 Qianfeng Rong
  2025-08-31  8:49 ` [PATCH 1/3] pinctrl: armada-37xx: " Qianfeng Rong
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Qianfeng Rong @ 2025-08-31  8:49 UTC (permalink / raw)
  To: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Linus Walleij, Jacky Huang, Shan-Chun Hung, Geert Uytterhoeven,
	Bartosz Golaszewski,
	moderated list:ARM/Marvell Kirkwood and Armada 370, 375, 38x,...,
	open list:PIN CONTROL SUBSYSTEM, open list,
	open list:PIN CONTROLLER - RENESAS
  Cc: Qianfeng Rong

The 'ret' variable usually is used to store returns from some functions,
which return either zero on success or negative error codes on failure.

Storing the negative error codes in unsigned type, doesn't cause an issue
at runtime but can be confusing.  Additionally, assigning negative error
codes to unsigned type may trigger a GCC warning when the -Wsign-conversion
flag is enabled.

Change "ret" from u32/unsigned int to int type.  No effect on runtime.

Qianfeng Rong (3):
  pinctrl: armada-37xx: Use int type to store negative error codes
  pinctrl: ma35: Use int type to store negative error codes
  pinctrl: renesas: Use int type to store negative error codes

 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 6 ++++--
 drivers/pinctrl/nuvoton/pinctrl-ma35.c      | 3 ++-
 drivers/pinctrl/renesas/pinctrl.c           | 3 ++-
 3 files changed, 8 insertions(+), 4 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2025-09-01 13:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-31  8:49 [PATCH 0/3] pinctrl: Use int type to store negative error codes Qianfeng Rong
2025-08-31  8:49 ` [PATCH 1/3] pinctrl: armada-37xx: " Qianfeng Rong
2025-08-31 14:41   ` Andrew Lunn
2025-09-01 13:11   ` Linus Walleij
2025-08-31  8:49 ` [PATCH 2/3] pinctrl: ma35: " Qianfeng Rong
2025-09-01 13:11   ` Linus Walleij
2025-08-31  8:49 ` [PATCH 3/3] pinctrl: renesas: " Qianfeng Rong
2025-09-01  9:07   ` Geert Uytterhoeven
2025-09-01 10:13     ` Qianfeng Rong
2025-09-01 10:25       ` Geert Uytterhoeven

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).