PCI: vmd: Fix inconsistent indentation in vmd_resume()
authorXinghui Li <korantli@tencent.com>
Tue, 27 Jun 2023 11:38:08 +0000 (19:38 +0800)
committerKrzysztof Wilczyński <kwilczynski@kernel.org>
Mon, 18 Sep 2023 14:08:30 +0000 (14:08 +0000)
The if-statement within the vmd_resume() function has an inconsistent
indentation that leads to a compile time warning.

Thus, correct the inconsistent indentation.  While at it, remove the
if-statement completely, which will make the code simpler.

This was detected by Smatch:

  drivers/pci/controller/vmd.c:1066 vmd_resume() warn: inconsistent indenting

No functional changes are intended.

[kwilczynski: use correct tags, commit log]
Suggested-by: Christoph Hellwig <hch@infradead.org>
Link: https://lore.kernel.org/linux-pci/20230627113808.269716-1-korantwork@gmail.com
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Xinghui Li <korantli@tencent.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
drivers/pci/controller/vmd.c

index ad56df98b8e63d790a719a494104a80c669731b8..6cb55d7422ef124339a9a0bf5487dd5f04d68498 100644 (file)
@@ -1078,10 +1078,7 @@ static int vmd_resume(struct device *dev)
        struct vmd_dev *vmd = pci_get_drvdata(pdev);
        int err, i;
 
-       if (vmd->irq_domain)
-               vmd_set_msi_remapping(vmd, true);
-       else
-               vmd_set_msi_remapping(vmd, false);
+       vmd_set_msi_remapping(vmd, !!vmd->irq_domain);
 
        for (i = 0; i < vmd->msix_count; i++) {
                err = devm_request_irq(dev, vmd->irqs[i].virq,