Skip to contentSkip to conversation

net/mlx5: remove unreachable return

PATCH Applied Pavel Machek 2 participants 4 messages Sep 21, 2020 – Sep 22, 2020

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

PATCH 1/1 net/mlx5: remove unreachable return

The last return statement is unreachable code. I'm not sure if it will provoke any warnings, but it looks ugly.

drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c +0 -2
index 2d55b7c22c03..a804f92ccf23 100644
@@ -431,8 +431,6 @@ static int mlx5_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin,
 	default:
 		return -EOPNOTSUPP;
 	}
-
-	return -EOPNOTSUPP;
 }
 
 static const struct ptp_clock_info mlx5_ptp_clock_info = {
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#2 lore raw
Quoted 5 lines · Saeed Mahameed
Quoted 4 lines · Pavel Machek

The last return statement is unreachable code. I'm not sure if it will
provoke any warnings, but it looks ugly.

Quoted 9 lines
Quoted 3 lines

Applied to net-next-mlx5.

Thanks,
Saeed.

Actually checkpatch reports this issue:
WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Pavel Machek <[email protected]>'

Do you want me to override the Signed-off-by tag with the above email ?

Thanks,
Saeed.

#3 lore raw
Quoted 16 lines · Saeed Mahameed
Quoted 5 lines · Saeed Mahameed
Quoted 4 lines · Pavel Machek

The last return statement is unreachable code. I'm not sure if it will
provoke any warnings, but it looks ugly.

Quoted 9 lines
Quoted 3 lines

Applied to net-next-mlx5.

Thanks,
Saeed.

Quoted 5 lines

Actually checkpatch reports this issue:
WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Pavel Machek <[email protected]>'

Do you want me to override the Signed-off-by tag with the above email ?

Sorry about that.

Actually, overriding patch author to match signoff would be better (I should have sent it from: denx), but either way is okay with me.

Best regards,
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html