* [PATCH] vfio/pci: drop redundant conversion to bool
@ 2025-08-18 8:52 Xichao Zhao
2025-08-27 18:55 ` Alex Williamson
0 siblings, 1 reply; 2+ messages in thread
From: Xichao Zhao @ 2025-08-18 8:52 UTC (permalink / raw)
To: alex.williamson; +Cc: kvm, linux-kernel, Xichao Zhao
The result of integer comparison already evaluates to bool. No need for
explicit conversion.
No functional impact.
Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
drivers/vfio/pci/vfio_pci_intrs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c
index 123298a4dc8f..00583909b380 100644
--- a/drivers/vfio/pci/vfio_pci_intrs.c
+++ b/drivers/vfio/pci/vfio_pci_intrs.c
@@ -677,7 +677,7 @@ static int vfio_pci_set_msi_trigger(struct vfio_pci_core_device *vdev,
{
struct vfio_pci_irq_ctx *ctx;
unsigned int i;
- bool msix = (index == VFIO_PCI_MSIX_IRQ_INDEX) ? true : false;
+ bool msix = (index == VFIO_PCI_MSIX_IRQ_INDEX);
if (irq_is(vdev, index) && !count && (flags & VFIO_IRQ_SET_DATA_NONE)) {
vfio_msi_disable(vdev, msix);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] vfio/pci: drop redundant conversion to bool
2025-08-18 8:52 [PATCH] vfio/pci: drop redundant conversion to bool Xichao Zhao
@ 2025-08-27 18:55 ` Alex Williamson
0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2025-08-27 18:55 UTC (permalink / raw)
To: Xichao Zhao; +Cc: kvm, linux-kernel
On Mon, 18 Aug 2025 16:52:01 +0800
Xichao Zhao <zhao.xichao@vivo.com> wrote:
> The result of integer comparison already evaluates to bool. No need for
> explicit conversion.
>
> No functional impact.
>
> Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
> ---
> drivers/vfio/pci/vfio_pci_intrs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to vfio next branch for v6.18. Thanks,
Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-27 18:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-18 8:52 [PATCH] vfio/pci: drop redundant conversion to bool Xichao Zhao
2025-08-27 18:55 ` Alex Williamson
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).