David Hildenbrand
2021-Jan-20 09:40 UTC
[PATCH] virtio-mem: Assign boolean values to a bool variable
On 20.01.21 08:50, Jiapeng Zhong wrote:> Fix the following coccicheck warnings: > > ./drivers/virtio/virtio_mem.c:2580:2-25: WARNING: Assignment > of 0/1 to bool variable. > > Reported-by: Abaci Robot <abaci at linux.alibaba.com> > Signed-off-by: Jiapeng Zhong <abaci-bugfix at linux.alibaba.com> > --- > drivers/virtio/virtio_mem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c > index 9fc9ec4..85a272c 100644 > --- a/drivers/virtio/virtio_mem.c > +++ b/drivers/virtio/virtio_mem.c > @@ -2577,7 +2577,7 @@ static int virtio_mem_probe(struct virtio_device *vdev) > * actually in use (e.g., trying to reload the driver). > */ > if (vm->plugged_size) { > - vm->unplug_all_required = 1; > + vm->unplug_all_required = true; > dev_info(&vm->vdev->dev, "unplugging all memory is required\n"); > } > >Hi, we already had a fix on the list for quite a while: https://lkml.kernel.org/r/1609233239-60313-1-git-send-email-tiantao6 at hisilicon.com However, looks like Michael queued your patch on the vhost tree instead. -- Thanks, David / dhildenb
Michael S. Tsirkin
2021-Jan-20 09:57 UTC
[PATCH] virtio-mem: Assign boolean values to a bool variable
On Wed, Jan 20, 2021 at 10:40:37AM +0100, David Hildenbrand wrote:> On 20.01.21 08:50, Jiapeng Zhong wrote: > > Fix the following coccicheck warnings: > > > > ./drivers/virtio/virtio_mem.c:2580:2-25: WARNING: Assignment > > of 0/1 to bool variable. > > > > Reported-by: Abaci Robot <abaci at linux.alibaba.com> > > Signed-off-by: Jiapeng Zhong <abaci-bugfix at linux.alibaba.com> > > --- > > drivers/virtio/virtio_mem.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c > > index 9fc9ec4..85a272c 100644 > > --- a/drivers/virtio/virtio_mem.c > > +++ b/drivers/virtio/virtio_mem.c > > @@ -2577,7 +2577,7 @@ static int virtio_mem_probe(struct virtio_device *vdev) > > * actually in use (e.g., trying to reload the driver). > > */ > > if (vm->plugged_size) { > > - vm->unplug_all_required = 1; > > + vm->unplug_all_required = true; > > dev_info(&vm->vdev->dev, "unplugging all memory is required\n"); > > } > > > > > > Hi, > > we already had a fix on the list for quite a while: > > https://lkml.kernel.org/r/1609233239-60313-1-git-send-email-tiantao6 at hisilicon.comCan't find that one.> However, looks like Michael queued your patch on the vhost tree instead. > > -- > Thanks, > > David / dhildenb