Skip to contentSkip to conversation

drm/drm_bufs.c: In switch, add break in default case

PATCH RESEND Superseded Fabio M. De Francesco 2 participants 4 messages Apr 17, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 drm/drm_bufs.c: In switch, add break in default case

Added a 'break' in the default case of a switch selection statement.

---
 drivers/gpu/drm/drm_bufs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_bufs.c +1 -1
index e3d77dfefb0a..fc40aa0adf73 100644
@@ -79,7 +79,7 @@ static struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
 				return entry;
 			break;
 		default: /* Make gcc happy */
-			;
+			break;
 		}
 		if (entry->map->offset == map->offset)
 			return entry;
Signature · 1 line
2.31.1
#1 lore raw
Quoted 1 line · Fabio M. De Francesco

Added a 'break' in the default case of a switch selection statement.

Why?

julia

Quoted 27 lines
---
 drivers/gpu/drm/drm_bufs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_bufs.c +1 -2
index e3d77dfefb0a..fc40aa0adf73 100644
@@ -79,7 +79,7 @@ static struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
 				return entry;
 			break;
 		default: /* Make gcc happy */
-			;
+			break;
 		}
 		if (entry->map->offset == map->offset)
 			return entry;
--

2.31.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20210417153540.22017-1-fmdefrancesco%40gmail.com.

#2 lore raw
Quoted 5 lines · CEST Julia Lawall
Quoted 1 line · Fabio M. De Francesco

Added a 'break' in the default case of a switch selection statement.

Why?

GCC issues a warning, even if it is not strictly necessary for the code to work properly. Do you think that I have to explain in the patch log the reason why I made that change?

Thanks,

Fabio

Quoted 27 lines

julia

Quoted 24 lines

---

 drivers/gpu/drm/drm_bufs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_bufs.c +0 -0
index e3d77dfefb0a..fc40aa0adf73 100644
@@ -79,7 +79,7 @@ static struct drm_map_list *drm_find_matching_map(struct

drm_device *dev,>

drivers/gpu/drm/drm_bufs.c +1 -1
 				return entry;
 
 			break;
 
 		default: /* Make gcc happy */
 
-			;
+			break;
 
 		}
 		if (entry->map->offset == map->offset)
Quoted 8 lines
Quoted 8 lines

return entry;

--
2.31.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop

receiving

Quoted 5 lines
Quoted 5 lines

emails from it, send an email to [email protected]. To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/20210417153540.22017-1-f
mdefrancesco%40gmail.com.

#3 lore raw
Quoted 9 lines · Fabio M. De Francesco
Quoted 5 lines · CEST Julia Lawall
Quoted 1 line · Fabio M. De Francesco

Added a 'break' in the default case of a switch selection statement.

Why?

GCC issues a warning, even if it is not strictly necessary for the code to work properly. Do you think that I have to explain in the patch log the reason why I made that change?

It would be helpful.

julia

Quoted 50 lines

Thanks,

Fabio

Quoted 27 lines

julia

Quoted 24 lines

---

 drivers/gpu/drm/drm_bufs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_bufs.c +0 -0
index e3d77dfefb0a..fc40aa0adf73 100644
@@ -79,7 +79,7 @@ static struct drm_map_list *drm_find_matching_map(struct

drm_device *dev,>

drivers/gpu/drm/drm_bufs.c +1 -1
 				return entry;
 
 			break;
 
 		default: /* Make gcc happy */
 
-			;
+			break;
 
 		}
 		if (entry->map->offset == map->offset)
Quoted 8 lines
Quoted 8 lines

return entry;

--
2.31.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop

receiving

Quoted 5 lines
Quoted 5 lines

emails from it, send an email to [email protected]. To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/20210417153540.22017-1-f
mdefrancesco%40gmail.com.