2022-11-15 06:10:49

by Jiapeng Chong

[permalink] [raw]
Subject: [PATCH] PCI: vmd: Clean up some inconsistent indenting

No functional modification involved.

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

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3074
Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Jiapeng Chong <[email protected]>
---
drivers/pci/controller/vmd.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index 98e0746e681c..b7914637048a 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -980,10 +980,10 @@ 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);
+ if (vmd->irq_domain)
+ vmd_set_msi_remapping(vmd, true);
+ else
+ vmd_set_msi_remapping(vmd, false);

for (i = 0; i < vmd->msix_count; i++) {
err = devm_request_irq(dev, vmd->irqs[i].virq,
--
2.20.1.7.g153144c



2022-11-15 11:29:13

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH] PCI: vmd: Clean up some inconsistent indenting

On Tue, Nov 15, 2022 at 01:48:47PM +0800, Jiapeng Chong wrote:
> + if (vmd->irq_domain)
> + vmd_set_msi_remapping(vmd, true);
> + else
> + vmd_set_msi_remapping(vmd, false);

Why not go one step further:

vmd_set_msi_remapping(vmd, !!vmd->irq_domain);

?

2022-11-16 01:12:18

by Nirmal Patel

[permalink] [raw]
Subject: Re: [PATCH] PCI: vmd: Clean up some inconsistent indenting

On 11/14/2022 9:48 PM, Jiapeng Chong wrote:
> No functional modification involved.
>
> drivers/pci/controller/vmd.c:983 vmd_resume() warn: inconsistent indenting.
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3074
> Reported-by: Abaci Robot <[email protected]>
> Signed-off-by: Jiapeng Chong <[email protected]>
> ---
> drivers/pci/controller/vmd.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
> index 98e0746e681c..b7914637048a 100644
> --- a/drivers/pci/controller/vmd.c
> +++ b/drivers/pci/controller/vmd.c
> @@ -980,10 +980,10 @@ 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);
> + if (vmd->irq_domain)
> + vmd_set_msi_remapping(vmd, true);
> + else
> + vmd_set_msi_remapping(vmd, false);
>
> for (i = 0; i < vmd->msix_count; i++) {
> err = devm_request_irq(dev, vmd->irqs[i].virq,

Reviewed-by: Nirmal Patel <[email protected]>

Thanks


2022-11-16 04:14:54

by Krzysztof Wilczyński

[permalink] [raw]
Subject: Re: [PATCH] PCI: vmd: Clean up some inconsistent indenting

Hello,

> > + if (vmd->irq_domain)
> > + vmd_set_msi_remapping(vmd, true);
> > + else
> > + vmd_set_msi_remapping(vmd, false);
>
> Why not go one step further:
>
> vmd_set_msi_remapping(vmd, !!vmd->irq_domain);

Jiapeng, if you want to get this patch merged, and it's a nice clean-up,
then apply suggestion from Christoph and send a v2, if possible.

Krzysztof