All of lore.kernel.org
 help / color / mirror / Atom feed
* Coccinelle report for drivers/pci/
@ 2018-07-03  1:45 Sinan Kaya
  2018-07-03  8:09 ` Lukas Wunner
  0 siblings, 1 reply; 3+ messages in thread
From: Sinan Kaya @ 2018-07-03  1:45 UTC (permalink / raw)
  To: Bjorn Helgaas, Lorenzo Pieralisi, Linux PCI


I ran coccinelle on drivers/pci directory of 4.18-rc3. I think this report needs some
attention from individual contributors to figure out which one is real which one is false
positive. devm stuff looked real to me.

make coccicheck MODE=report M=drivers/pci/

Please check for false positives in the output before submitting a patch.
When using "patch" mode, carefully review the patch before submitting it.

drivers/pci//endpoint/functions/pci-epf-test.c:166:7-14: WARNING opportunity for kmemdup
drivers/pci//hotplug/pnv_php.c:278:7-14: WARNING opportunity for kmemdup
drivers/pci//controller/dwc/pcie-qcom.c:703:1-3: WARNING: PTR_ERR_OR_ZERO can be used
drivers/pci//controller/pci-tegra.c:1132:1-3: WARNING: PTR_ERR_OR_ZERO can be used
drivers/pci//controller/dwc/pcie-kirin.c:141:1-3: WARNING: PTR_ERR_OR_ZERO can be used
drivers/pci//controller/dwc/pcie-kirin.c:177:1-3: WARNING: PTR_ERR_OR_ZERO can be used
drivers/pci//controller/dwc/pci-exynos.c:95:1-3: WARNING: PTR_ERR_OR_ZERO can be used
drivers/pci//controller/pcie-mediatek.c:441:13-16: WARNING: Suspicious code. resource_size is maybe missing with mem
drivers/pci//probe.c:2828:1-6: WARNING: invalid free of devm_ allocated data
drivers/pci//probe.c:586:1-6: WARNING: invalid free of devm_ allocated data
drivers/pci//controller/pci-hyperv.c:1687:31-33: ERROR: reference preceded by free on line 1668
drivers/pci//hotplug/pnv_php.c:159:2-13: ERROR: probable double put.
drivers/pci/pci.c:5316:6-12: WARNING: Comparison to bool
drivers/pci/pci.c:5332:7-13: WARNING: Comparison to bool
drivers/pci/hotplug/cpqphp_core.c:734:1-11: WARNING: Assignment of bool to 0/1
drivers/pci/controller/pcie-altera.c:142:2-15: code aligned with following code on line 144
drivers/pci/hotplug/pciehp_pci.c:67:5-7: Unneeded variable: "rc". Return "0" on line 110
drivers/pci/hotplug/pcihp_skeleton.c:98:5-11: Unneeded variable: "retval". Return "0" on line 106
drivers/pci/hotplug/pcihp_skeleton.c:84:5-11: Unneeded variable: "retval". Return "0" on line 92
drivers/pci/hotplug/pcihp_skeleton.c:201:5-11: Unneeded variable: "retval". Return "0" on line 210
drivers/pci/hotplug/pcihp_skeleton.c:171:5-11: Unneeded variable: "retval". Return "0" on line 180
drivers/pci/hotplug/pcihp_skeleton.c:186:5-11: Unneeded variable: "retval". Return "0" on line 195
drivers/pci/hotplug/pcihp_skeleton.c:156:5-11: Unneeded variable: "retval". Return "0" on line 165
drivers/pci/hotplug/pcihp_skeleton.c:137:5-11: Unneeded variable: "retval". Return "0" on line 150
drivers/pci/hotplug/pcihp_skeleton.c:112:5-11: Unneeded variable: "retval". Return "0" on line 131
drivers/pci/hotplug/shpchp_pci.c:66:5-7: Unneeded variable: "rc". Return "0" on line 86


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Coccinelle report for drivers/pci/
  2018-07-03  1:45 Coccinelle report for drivers/pci/ Sinan Kaya
@ 2018-07-03  8:09 ` Lukas Wunner
  2018-07-03 11:42   ` okaya
  0 siblings, 1 reply; 3+ messages in thread
From: Lukas Wunner @ 2018-07-03  8:09 UTC (permalink / raw)
  To: Sinan Kaya; +Cc: Bjorn Helgaas, Lorenzo Pieralisi, Linux PCI

On Mon, Jul 02, 2018 at 09:45:55PM -0400, Sinan Kaya wrote:
> drivers/pci/hotplug/pciehp_pci.c:67:5-7: Unneeded variable: "rc". Return "0" on line 110

Fixed by
https://patchwork.ozlabs.org/patch/930379/


> drivers/pci/hotplug/pcihp_skeleton.c:98:5-11: Unneeded variable: "retval". Return "0" on line 106
> drivers/pci/hotplug/pcihp_skeleton.c:84:5-11: Unneeded variable: "retval". Return "0" on line 92
> drivers/pci/hotplug/pcihp_skeleton.c:201:5-11: Unneeded variable: "retval". Return "0" on line 210
> drivers/pci/hotplug/pcihp_skeleton.c:171:5-11: Unneeded variable: "retval". Return "0" on line 180
> drivers/pci/hotplug/pcihp_skeleton.c:186:5-11: Unneeded variable: "retval". Return "0" on line 195
> drivers/pci/hotplug/pcihp_skeleton.c:156:5-11: Unneeded variable: "retval". Return "0" on line 165
> drivers/pci/hotplug/pcihp_skeleton.c:137:5-11: Unneeded variable: "retval". Return "0" on line 150
> drivers/pci/hotplug/pcihp_skeleton.c:112:5-11: Unneeded variable: "retval". Return "0" on line 131

Fixed by 6c9c6bd4e2c8 ("PCI: hotplug: Delete skeleton driver"),
queued on Bjorn's pci/hotplug branch for 4.19.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Coccinelle report for drivers/pci/
  2018-07-03  8:09 ` Lukas Wunner
@ 2018-07-03 11:42   ` okaya
  0 siblings, 0 replies; 3+ messages in thread
From: okaya @ 2018-07-03 11:42 UTC (permalink / raw)
  To: Lukas Wunner; +Cc: Bjorn Helgaas, Lorenzo Pieralisi, Linux PCI

On 2018-07-03 04:09, Lukas Wunner wrote:
> On Mon, Jul 02, 2018 at 09:45:55PM -0400, Sinan Kaya wrote:
>> drivers/pci/hotplug/pciehp_pci.c:67:5-7: Unneeded variable: "rc". 
>> Return "0" on line 110
> 
> Fixed by
> https://patchwork.ozlabs.org/patch/930379/
> 
> 
>> drivers/pci/hotplug/pcihp_skeleton.c:98:5-11: Unneeded variable: 
>> "retval". Return "0" on line 106
>> drivers/pci/hotplug/pcihp_skeleton.c:84:5-11: Unneeded variable: 
>> "retval". Return "0" on line 92
>> drivers/pci/hotplug/pcihp_skeleton.c:201:5-11: Unneeded variable: 
>> "retval". Return "0" on line 210
>> drivers/pci/hotplug/pcihp_skeleton.c:171:5-11: Unneeded variable: 
>> "retval". Return "0" on line 180
>> drivers/pci/hotplug/pcihp_skeleton.c:186:5-11: Unneeded variable: 
>> "retval". Return "0" on line 195
>> drivers/pci/hotplug/pcihp_skeleton.c:156:5-11: Unneeded variable: 
>> "retval". Return "0" on line 165
>> drivers/pci/hotplug/pcihp_skeleton.c:137:5-11: Unneeded variable: 
>> "retval". Return "0" on line 150
>> drivers/pci/hotplug/pcihp_skeleton.c:112:5-11: Unneeded variable: 
>> "retval". Return "0" on line 131
> 
> Fixed by 6c9c6bd4e2c8 ("PCI: hotplug: Delete skeleton driver"),
> queued on Bjorn's pci/hotplug branch for 4.19.

Thanks, glad to hear we are doing some house cleaning.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-03 11:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-03  1:45 Coccinelle report for drivers/pci/ Sinan Kaya
2018-07-03  8:09 ` Lukas Wunner
2018-07-03 11:42   ` okaya

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.