[v2,0/2] PCI: vmd: Fix two issues in VMD reported by Smatch

Message ID 20230420094332.1507900-1-korantwork@gmail.com
Headers
Series PCI: vmd: Fix two issues in VMD reported by Smatch |

Message

Xinghui Li April 20, 2023, 9:43 a.m. UTC
  From: Xinghui Li <korantli@tencent.com>

Fix two issues when building kernel with Smatch check.

v1->v2:
According to Damien's suggestion, I split it from 1 patch to 2 different
patches. Change 'inconsistent indenting' patch's title from 'fix' to
'clean up'.

Xinghui Li (2):
  PCI: vmd: Fix one uninitialized symbol error reported by Smatch
  PCI: vmd: Clean up one inconsistent indenting warn reported by Smatch

 drivers/pci/controller/vmd.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
  

Comments

Krzysztof Wilczyński June 24, 2023, 4:33 p.m. UTC | #1
[+CC Christoph]

Hello,

> Fix two issues when building kernel with Smatch check.
> 
> v1->v2:
> According to Damien's suggestion, I split it from 1 patch to 2 different
> patches. Change 'inconsistent indenting' patch's title from 'fix' to
> 'clean up'.
> 
> Xinghui Li (2):
>   PCI: vmd: Fix one uninitialized symbol error reported by Smatch

Applied to controller/vmd, thank you!

[1/1] PCI: vmd: Fix uninitialized variable usage in vmd_enable_domain()
      https://git.kernel.org/pci/pci/c/0c0206dc4f5b

>   PCI: vmd: Clean up one inconsistent indenting warn reported by Smatch

Even though this is a very nice clean-up, I did not take this patch at this
time, as there has been a similar patch posted in the past, and Christoph
Hellwig suggested, as part of his review, an alternative approach worth
considering.

Have a look at the following and let me know what you think:

  https://patchwork.kernel.org/project/linux-pci/patch/20221115054847.77829-1-jiapeng.chong@linux.alibaba.com/

	Krzysztof
  
Xinghui Li June 25, 2023, 3:14 a.m. UTC | #2
On Sun, Jun 25, 2023 at 12:33 AM Krzysztof Wilczyński <kw@linux.com> wrote:
>
> [1/1] PCI: vmd: Fix uninitialized variable usage in vmd_enable_domain()
>       https://git.kernel.org/pci/pci/c/0c0206dc4f5b
>
> >   PCI: vmd: Clean up one inconsistent indenting warn reported by Smatch
>
> Even though this is a very nice clean-up, I did not take this patch at this
> time, as there has been a similar patch posted in the past, and Christoph
> Hellwig suggested, as part of his review, an alternative approach worth
> considering.
>
> Have a look at the following and let me know what you think:
>
>   https://patchwork.kernel.org/project/linux-pci/patch/20221115054847.77829-1-jiapeng.chong@linux.alibaba.com/

I think Christoph Hellwig's suggestion is indeed better.
So, should I submit a new patch to address this issue?

Thanks~
  
Krzysztof Wilczyński June 25, 2023, 5:03 p.m. UTC | #3
Hello,

> > >   PCI: vmd: Clean up one inconsistent indenting warn reported by Smatch
> >
> > Even though this is a very nice clean-up, I did not take this patch at this
> > time, as there has been a similar patch posted in the past, and Christoph
> > Hellwig suggested, as part of his review, an alternative approach worth
> > considering.
> >
> > Have a look at the following and let me know what you think:
> >
> >   https://patchwork.kernel.org/project/linux-pci/patch/20221115054847.77829-1-jiapeng.chong@linux.alibaba.com/
> 
> I think Christoph Hellwig's suggestion is indeed better.
> So, should I submit a new patch to address this issue?

Please.  A single new patch would suffice.

Make sure to explain as part of the commit log why this specific change
that started as a Smatch complaint about an incorrect indentation.

Thank you!

	Krzysztof