Message ID | 20210407185918.371983-8-drjones@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm/arm64: Prepare for target-efi | expand |
On 07/04/2021 19:59, Andrew Jones wrote: > If there's no virtio-console / chr-testdev configured, then the user > probably didn't want them. Just silently fail rather than stating > the obvious. > > Signed-off-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> > --- > lib/chr-testdev.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/lib/chr-testdev.c b/lib/chr-testdev.c > index 6890f63c8b29..b3c641a833fe 100644 > --- a/lib/chr-testdev.c > +++ b/lib/chr-testdev.c > @@ -54,11 +54,8 @@ void chr_testdev_init(void) > int ret; > > vcon = virtio_bind(VIRTIO_ID_CONSOLE); > - if (vcon == NULL) { > - printf("%s: %s: can't find a virtio-console\n", > - __func__, TESTDEV_NAME); > + if (vcon == NULL) > return; > - } > > ret = vcon->config->find_vqs(vcon, 2, vqs, NULL, io_names); > if (ret < 0) { >
Hi Drew, On 4/7/21 7:59 PM, Andrew Jones wrote: > If there's no virtio-console / chr-testdev configured, then the user > probably didn't want them. Just silently fail rather than stating > the obvious. > > Signed-off-by: Andrew Jones <drjones@redhat.com> > --- > lib/chr-testdev.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/lib/chr-testdev.c b/lib/chr-testdev.c > index 6890f63c8b29..b3c641a833fe 100644 > --- a/lib/chr-testdev.c > +++ b/lib/chr-testdev.c > @@ -54,11 +54,8 @@ void chr_testdev_init(void) > int ret; > > vcon = virtio_bind(VIRTIO_ID_CONSOLE); > - if (vcon == NULL) { > - printf("%s: %s: can't find a virtio-console\n", > - __func__, TESTDEV_NAME); > + if (vcon == NULL) Yes, please. This finally removes the warning when using kvmtool: Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com> Thanks, Alex > return; > - } > > ret = vcon->config->find_vqs(vcon, 2, vqs, NULL, io_names); > if (ret < 0) {
diff --git a/lib/chr-testdev.c b/lib/chr-testdev.c index 6890f63c8b29..b3c641a833fe 100644 --- a/lib/chr-testdev.c +++ b/lib/chr-testdev.c @@ -54,11 +54,8 @@ void chr_testdev_init(void) int ret; vcon = virtio_bind(VIRTIO_ID_CONSOLE); - if (vcon == NULL) { - printf("%s: %s: can't find a virtio-console\n", - __func__, TESTDEV_NAME); + if (vcon == NULL) return; - } ret = vcon->config->find_vqs(vcon, 2, vqs, NULL, io_names); if (ret < 0) {
If there's no virtio-console / chr-testdev configured, then the user probably didn't want them. Just silently fail rather than stating the obvious. Signed-off-by: Andrew Jones <drjones@redhat.com> --- lib/chr-testdev.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)