Re: [PATCH] KVM: s390: pci: fix plain integer as NULL pointer warnings

From: Christian Borntraeger
Date: Thu Sep 15 2022 - 12:28:47 EST




Am 15.09.22 um 18:16 schrieb Christian Borntraeger:
Am 23.08.22 um 21:18 schrieb Matthew Rosato:
On 8/23/22 3:15 PM, Matthew Rosato wrote:
Fix some sparse warnings that a plain integer 0 is being used instead of
NULL.

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Matthew Rosato <mjrosato@xxxxxxxxxxxxx>

@Janosch, since you are taking the other PCI fix can you also take this small cleanup through KVM?

Queued now for the kvm tree. Will have to look if we have other things for 6.0. Otherwise it will go with 6.1.

Hmmm, checkpatch --strict has this:

CHECK: Comparison to NULL could be written "!aift->kzdev"
#52: FILE: arch/s390/kvm/pci.h:49:
+ if (!IS_ENABLED(CONFIG_VFIO_PCI_ZDEV_KVM) || aift->kzdev == NULL ||

CHECK: Comparison to NULL could be written "!aift->kzdev[si]"
#53: FILE: arch/s390/kvm/pci.h:50:
+ aift->kzdev[si] == NULL)

total: 0 errors, 0 warnings, 2 checks, 28 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.


Can you maybe redo this so that we avoid followup patches?