diff mbox series

PCI: vmd: Clean up some inconsistent indenting

Message ID 20221115054847.77829-1-jiapeng.chong@linux.alibaba.com (mailing list archive)
State Changes Requested
Delegated to: Krzysztof Wilczyński
Headers show
Series PCI: vmd: Clean up some inconsistent indenting | expand

Commit Message

Jiapeng Chong Nov. 15, 2022, 5:48 a.m. UTC
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 <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/pci/controller/vmd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Christoph Hellwig Nov. 15, 2022, 10:27 a.m. UTC | #1
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);

?
Nirmal Patel Nov. 16, 2022, 12:44 a.m. UTC | #2
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 <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  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 <nirmal.patel@linux.intel.com>

Thanks
Krzysztof Wilczyński Nov. 16, 2022, 3:47 a.m. UTC | #3
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
diff mbox series

Patch

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,