Skip to contentSkip to conversation

drm/radeon/kms/atom: Remove redundant code

PATCH In review Jiapeng Chong 2 participants 2 messages Sep 28, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon/kms/atom: Remove redundant code

drivers/gpu/drm/radeon/atom.c:396 atom_skip_src_int() warn: ignoring unreachable code.

---
 drivers/gpu/drm/radeon/atom.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/radeon/atom.c +0 -1
index ceb6d772ef94..3082d08a06c2 100644
@@ -393,7 +393,6 @@ static void atom_skip_src_int(atom_exec_context *ctx, uint8_t attr, int *ptr)
 			(*ptr)++;
 			return;
 		}
-		return;
 	}
 }
 
Signature · 1 line
2.20.1.7.g153144c
#1 lore raw
Quoted 15 lines · Jiapeng Chong

drivers/gpu/drm/radeon/atom.c:396 atom_skip_src_int() warn: ignoring unreachable code.

---
 drivers/gpu/drm/radeon/atom.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/radeon/atom.c +0 -0
index ceb6d772ef94..3082d08a06c2 100644

drivers/gpu/drm/radeon/atom.c static void atom_skip_src_int(atom_exec_context *ctx, uint8_t attr, int *ptr) · line 396

Quoted 4 lines
drivers/gpu/drm/radeon/atom.c +0 -1
@@ -393,7 +393,6 @@ static void atom_skip_src_int(atom_exec_context *ctx, uint8_t attr, int *ptr)
                        (*ptr)++;
                        return;
                }
-               return;

I think this should be a break.

Alex

Quoted 6 lines
drivers/gpu/drm/radeon/atom.c +0 -1
        }
 }
 
--

2.20.1.7.g153144c