Re: [PATCH] octeontx2-pf: mcs: Remove dead code and semi-colon from rsrc_name()

From: Andrew Lunn
Date: Fri Jan 03 2025 - 11:37:05 EST


On Fri, Jan 03, 2025 at 09:28:26PM +0530, Nihar Chaithanya wrote:
> The switch-block has a default branch. Thus, the return statement at the
> end of the function can never be reached.

Deja vue?

I already commented on a similar patch like this. It is not the
default: branch alone which makes the code unreachable. It is that
every case statement makes a return, not a break. This might seem
pedantic, but compiles and static analysers are pedantic, so we
software engineers also need to be pedantic.

Please update the commit message.

Please also take a read of:

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html

Andrew

---
pw-bot: cr