U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cmd: pmic: add fall through comment
@ 2025-03-24 17:12 Heinrich Schuchardt
  2025-03-24 17:18 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2025-03-24 17:12 UTC (permalink / raw)
  To: Tom Rini; +Cc: u-boot, Heinrich Schuchardt

Make fall through explicit via comment to allow building with
-Wimplicit-fallthrough.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 cmd/pmic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cmd/pmic.c b/cmd/pmic.c
index 3ad1b8aa375..c5eea766a31 100644
--- a/cmd/pmic.c
+++ b/cmd/pmic.c
@@ -34,6 +34,7 @@ static int do_dev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 			printf("Can't get PMIC: %s!\n", name);
 			return failure(ret);
 		}
+	fallthrough;
 	case 1:
 		if (!currdev) {
 			printf("PMIC device is not set!\n\n");
-- 
2.48.1


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

* Re: [PATCH] cmd: pmic: add fall through comment
  2025-03-24 17:12 [PATCH] cmd: pmic: add fall through comment Heinrich Schuchardt
@ 2025-03-24 17:18 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2025-03-24 17:18 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: u-boot

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

On Mon, Mar 24, 2025 at 06:12:43PM +0100, Heinrich Schuchardt wrote:

> Make fall through explicit via comment to allow building with
> -Wimplicit-fallthrough.
> 
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

We should say "statement" not "comment" because it's not 
'/* fallthrough */' and looking at the linux kernel now, using
'fallthrough;' is the way to go as it will use the attribute when
possible.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

end of thread, other threads:[~2025-03-24 17:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-24 17:12 [PATCH] cmd: pmic: add fall through comment Heinrich Schuchardt
2025-03-24 17:18 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox