Skip to contentSkip to conversation

drivers: usb: musb: add code comment for clarification

PATCH Superseded Bin Liu 3 participants 7 messages Feb 10, 2017 – Feb 14, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Bin Liu

author maintainer
#1 lore raw
In reply to a message not in the archive
Quoted 3 lines · Gustavo A. R. Silva

Add code comment to make it clear that the fall-through is intentional. Read the link for more details: https://lkml.org/lkml/2017/2/9/292

Don't need 'drivers:' in the subject.

Quoted 10 lines
---
 drivers/usb/musb/musb_core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/musb/musb_core.c +0 -0
index 892088f..1aec986 100644

drivers/usb/musb/musb_core.c static void musb_pm_runtime_check_session(struct musb *musb) · line 1872

Quoted 4 lines
drivers/usb/musb/musb_core.c +1 -0
@@ -1869,6 +1869,7 @@ static void musb_pm_runtime_check_session(struct musb *musb)
 
 			return;
 		}
+		/* FALLTHROUGH */
		/* fall through */

as in CodingStyle.

drivers/usb/musb/musb_core.c static void musb_pm_runtime_check_session(struct musb *musb) · line 1875

Quoted 4 lines
drivers/usb/musb/musb_core.c +0 -0
 	case MUSB_QUIRK_A_DISCONNECT_19:
 		if (musb->quirk_retries--) {
 			musb_dbg(musb,

Regards,
-Bin.

#2 lore raw

PATCH 1/1 usb: musb: add code comment for clarification

Add code comment to make it clear that the fall-through is intentional. Read the link for more details: https://lkml.org/lkml/2017/2/9/292

---
 drivers/usb/musb/musb_core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/musb/musb_core.c +1 -0
index 892088f..1aec986 100644
@@ -1869,6 +1869,7 @@ static void musb_pm_runtime_check_session(struct musb *musb)
 
                        return;
                }
+               /* fall through */
        case MUSB_QUIRK_A_DISCONNECT_19:
                if (musb->quirk_retries--) {
                        musb_dbg(musb,
Signature · 1 line
2.5.0
maintainer
#3 lore raw

Re: [PATCH] usb: musb: add code comment for clarification

Quoted 20 lines · Gustavo A. R. Silva

Add code comment to make it clear that the fall-through is intentional. Read the link for more details: https://lkml.org/lkml/2017/2/9/292

---
 drivers/usb/musb/musb_core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/musb/musb_core.c +1 -0
index 892088f..1aec986 100644
@@ -1869,6 +1869,7 @@ static void musb_pm_runtime_check_session(struct musb
 *musb)
 
                        return;
                }
+               /* fall through */
        case MUSB_QUIRK_A_DISCONNECT_19:
                if (musb->quirk_retries--) {
Quoted 1 line

musb_dbg(musb,

The tabs are all gone from this patch, and it's line-wrapped, making it impossible to be applied :(

Can you please fix this and resend?

thanks,

greg k-h

#4 lore raw

Re: [PATCH] usb: musb: add code comment for clarification

Quoting Greg KH <[email protected]>:

Quoted 26 lines · Gustavo A. R. Silva
Quoted 20 lines

Add code comment to make it clear that the fall-through is intentional. Read the link for more details: https://lkml.org/lkml/2017/2/9/292

---
 drivers/usb/musb/musb_core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/musb/musb_core.c +1 -0
index 892088f..1aec986 100644
@@ -1869,6 +1869,7 @@ static void musb_pm_runtime_check_session(struct musb
 *musb)
 
                        return;
                }
+               /* fall through */
        case MUSB_QUIRK_A_DISCONNECT_19:
                if (musb->quirk_retries--) {
Quoted 1 line

musb_dbg(musb,

The tabs are all gone from this patch, and it's line-wrapped, making it impossible to be applied :(

Quoted 2 lines

Can you please fix this and resend?

OK. I'll send it shortly.

Thanks
--
Gustavo A. R. Silva

#5 lore raw

PATCH v2 1/1 usb: musb: add code comment for clarification

Add code comment to make it clear that the fall-through is intentional. Read the link for more details: https://lkml.org/lkml/2017/2/9/292

Addresses-Coverity-ID: 1397608

---
Changes in v2:
Fix tabs and line-wrapping in previous patch.

 drivers/usb/musb/musb_core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/musb/musb_core.c +1 -0
index 892088f..d8bae6c 100644
@@ -1869,6 +1869,7 @@ static void musb_pm_runtime_check_session(struct musb *musb)
 
 			return;
 		}
+		/* fall through */
 	case MUSB_QUIRK_A_DISCONNECT_19:
 		if (musb->quirk_retries--) {
 			musb_dbg(musb,
Signature · 1 line
2.5.0
maintainer
#6 lore raw

Re: [PATCH v2] usb: musb: add code comment for clarification

Quoted 8 lines · Gustavo A. R. Silva

Add code comment to make it clear that the fall-through is intentional. Read the link for more details: https://lkml.org/lkml/2017/2/9/292

Addresses-Coverity-ID: 1397608

---
Changes in v2:
Fix tabs and line-wrapping in previous patch.

Thanks for this. Bin, I've applied this to my tree so it makes it into 4.11-rc1.

greg k-h

author maintainer
#7 lore raw

Re: [PATCH v2] usb: musb: add code comment for clarification

Quoted 4 lines · Greg KH
Quoted 3 lines · Gustavo A. R. Silva

Add code comment to make it clear that the fall-through is intentional. Read the link for more details: https://lkml.org/lkml/2017/2/9/292

Quoted 8 lines
Quoted 5 lines

Addresses-Coverity-ID: 1397608

---
Changes in v2:
Fix tabs and line-wrapping in previous patch.

Thanks for this. Bin, I've applied this to my tree so it makes it into 4.11-rc1.

Thanks Greg for take it to v4.11.

Regards,
-Bin.