hw/mips/jazz: Simplify the NIC setup code
commitc9daa685cb69dddfe8082f09fd26728e98a66102
authorThomas Huth <thuth@redhat.com>
Wed, 13 Sep 2023 16:09:22 +0000 (13 18:09 +0200)
committerThomas Huth <thuth@redhat.com>
Mon, 25 Sep 2023 05:58:14 +0000 (25 07:58 +0200)
tree5d0e5189fa4e6e97d604eeb7f319dfe83408d8ba
parent4032f04c638ff852fa6f2d274f8dc2402b965ca9
hw/mips/jazz: Simplify the NIC setup code

The for-loop does not make much sense here - it is always left after
the first iteration, so we can also check for nb_nics == 1 instead
which is way easier to understand.

Also, the checks for nd->model are superfluous since the code in
mips_jazz_init_net() calls qemu_check_nic_model() that already
takes care of this (i.e. initializing nd->model if it has not been
set yet, and checking whether it is the "help" option or the
supported NIC model).

Message-ID: <20230913160922.355640-3-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
hw/mips/jazz.c