[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/1] virtio: fix the condition for iommu_platform not supp
From: |
Halil Pasic |
Subject: |
Re: [PATCH v3 1/1] virtio: fix the condition for iommu_platform not supported |
Date: |
Tue, 1 Feb 2022 18:50:01 +0100 |
On Tue, 1 Feb 2022 11:52:06 -0500
"Michael S. Tsirkin" <mst@redhat.com> wrote:
> > > + bool vdev_has_iommu = false;
> >
> > Isn't vdev_has_iommu set unconditionally before you try to use it?
>
> I'd like to know too.
Yes it is. Was meant as a conservative thing. AFAIR in C stuff on stack
is not initialized to anything in particular so the idea was better
use false than garbage if someone made a mistake. But on the other
hand compilers can warn about that, and this defeats the compiler
warning. So uninitialized is indeed better.
Re: [PATCH v3 1/1] virtio: fix the condition for iommu_platform not supported, Halil Pasic, 2022/02/01
Re: [PATCH v3 1/1] virtio: fix the condition for iommu_platform not supported, Cornelia Huck, 2022/02/01