qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-8.2] hw/s390x/s390-virtio-ccw: Remove superfluous code to set the NIC model
@ 2023-08-04  7:35 Thomas Huth
  2023-08-04  8:07 ` Cornelia Huck
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thomas Huth @ 2023-08-04  7:35 UTC (permalink / raw)
  To: qemu-s390x; +Cc: qemu-devel, qemu-trivial, Christian Borntraeger, Cornelia Huck

The check for nd->model being NULL was originally required, but in
commit e11f463295d95aba ("s390x/virtio: use qemu_check_nic_model()")
the corresponding code had been replaced by a call to the function
qemu_check_nic_model() - and this in turn calls qemu_find_nic_model()
which contains the same check for nd->model being NULL again. So we
can remove this from the calling site now.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/s390x/s390-virtio-ccw.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 4516d73ff5..b83187effb 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -222,10 +222,6 @@ static void s390_create_virtio_net(BusState *bus, const char *name)
         NICInfo *nd = &nd_table[i];
         DeviceState *dev;
 
-        if (!nd->model) {
-            nd->model = g_strdup("virtio");
-        }
-
         qemu_check_nic_model(nd, "virtio");
 
         dev = qdev_new(name);
-- 
2.39.3



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH for-8.2] hw/s390x/s390-virtio-ccw: Remove superfluous code to set the NIC model
  2023-08-04  7:35 [PATCH for-8.2] hw/s390x/s390-virtio-ccw: Remove superfluous code to set the NIC model Thomas Huth
@ 2023-08-04  8:07 ` Cornelia Huck
  2023-08-05  6:57 ` Michael Tokarev
  2023-08-14 22:52 ` Halil Pasic
  2 siblings, 0 replies; 4+ messages in thread
From: Cornelia Huck @ 2023-08-04  8:07 UTC (permalink / raw)
  To: Thomas Huth, qemu-s390x; +Cc: qemu-devel, qemu-trivial, Christian Borntraeger

On Fri, Aug 04 2023, Thomas Huth <thuth@redhat.com> wrote:

> The check for nd->model being NULL was originally required, but in
> commit e11f463295d95aba ("s390x/virtio: use qemu_check_nic_model()")
> the corresponding code had been replaced by a call to the function
> qemu_check_nic_model() - and this in turn calls qemu_find_nic_model()
> which contains the same check for nd->model being NULL again. So we
> can remove this from the calling site now.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  hw/s390x/s390-virtio-ccw.c | 4 ----
>  1 file changed, 4 deletions(-)

Reviewed-by: Cornelia Huck <cohuck@redhat.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH for-8.2] hw/s390x/s390-virtio-ccw: Remove superfluous code to set the NIC model
  2023-08-04  7:35 [PATCH for-8.2] hw/s390x/s390-virtio-ccw: Remove superfluous code to set the NIC model Thomas Huth
  2023-08-04  8:07 ` Cornelia Huck
@ 2023-08-05  6:57 ` Michael Tokarev
  2023-08-14 22:52 ` Halil Pasic
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Tokarev @ 2023-08-05  6:57 UTC (permalink / raw)
  To: Thomas Huth, qemu-s390x
  Cc: qemu-devel, qemu-trivial, Christian Borntraeger, Cornelia Huck

04.08.2023 10:35, Thomas Huth пишет:
> The check for nd->model being NULL was originally required, but in
> commit e11f463295d95aba ("s390x/virtio: use qemu_check_nic_model()")
> the corresponding code had been replaced by a call to the function
> qemu_check_nic_model() - and this in turn calls qemu_find_nic_model()
> which contains the same check for nd->model being NULL again. So we
> can remove this from the calling site now.

Applied to my trivial-patches tree, thanks!

/mjt



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH for-8.2] hw/s390x/s390-virtio-ccw: Remove superfluous code to set the NIC model
  2023-08-04  7:35 [PATCH for-8.2] hw/s390x/s390-virtio-ccw: Remove superfluous code to set the NIC model Thomas Huth
  2023-08-04  8:07 ` Cornelia Huck
  2023-08-05  6:57 ` Michael Tokarev
@ 2023-08-14 22:52 ` Halil Pasic
  2 siblings, 0 replies; 4+ messages in thread
From: Halil Pasic @ 2023-08-14 22:52 UTC (permalink / raw)
  To: Thomas Huth
  Cc: qemu-s390x, qemu-devel, qemu-trivial, Christian Borntraeger,
	Cornelia Huck, Halil Pasic

On Fri,  4 Aug 2023 09:35:25 +0200
Thomas Huth <thuth@redhat.com> wrote:

> The check for nd->model being NULL was originally required, but in
> commit e11f463295d95aba ("s390x/virtio: use qemu_check_nic_model()")
> the corresponding code had been replaced by a call to the function
> qemu_check_nic_model() - and this in turn calls qemu_find_nic_model()
> which contains the same check for nd->model being NULL again. So we
> can remove this from the calling site now.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Reviewed-by: Halil Pasic <pasic@linux.ibm.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-14 22:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-04  7:35 [PATCH for-8.2] hw/s390x/s390-virtio-ccw: Remove superfluous code to set the NIC model Thomas Huth
2023-08-04  8:07 ` Cornelia Huck
2023-08-05  6:57 ` Michael Tokarev
2023-08-14 22:52 ` Halil Pasic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).