rswitch: Use unsigned int for port related array index
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tue, 17 Oct 2023 11:34:01 +0000 (20:34 +0900)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 19 Oct 2023 08:59:33 +0000 (10:59 +0200)
commit1bf55630694e0a87be529801ad064daed36f25f3
tree4c8b688310687176b2398327b7d3170e11377ccf
parent0916c65aba534421a5aca8cdf3b2fdc2da257da4
rswitch: Use unsigned int for port related array index

Array index should not be negative, so modify the condition of
rswitch_for_each_enabled_port_continue_reverse() macro, and then
use unsigned int instead.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/renesas/rswitch.c
drivers/net/ethernet/renesas/rswitch.h