[PATCH] KVM-async_pf: Delete an unnecessary check before the function call "kmem_cache_destroy"

2015-11-15 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 15 Nov 2015 10:40:36 +0100 The kmem_cache_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software.

Re: [PATCH 00/39] drop null test before destroy functions

2015-09-14 Thread SF Markus Elfring
> Recent commits to kernel/git/torvalds/linux.git have made the following > functions able to tolerate NULL arguments: > > kmem_cache_destroy (commit 3942d29918522) > mempool_destroy (commit 4e3ca3e033d1) > dma_pool_destroy (commit 44d7175da6ea) How do you think about to extend an other SmPL

Re: vfio: powerpc/spapr: One function call less in tce_iommu_attach_group() after kzalloc() failure

2015-06-30 Thread SF Markus Elfring
than the existing one should have been renamed to free_exit or free_unlock_exit and new one would be unlock_exit. I chose a smaller change at this place. I'd just drop this patch. How do you think about to improve the affected jump labels a bit more there? Regards, Markus -- To

Re: vfio: powerpc/spapr: One function call less in tce_iommu_attach_group() after kzalloc() failure

2015-06-29 Thread SF Markus Elfring
tcegrp will be NULL and kfree() can handle this just fine The affected function did not show this API knowledge, did it? (is not it the whole point of this patchset - remove the check and just call kfree() even if the pointer is NULL?). Partly, yes. And if you wanted another label, I

[PATCH 0/2] vfio: powerpc/spapr: Deletion of an unnecessary check

2015-06-28 Thread SF Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net Another update suggestion was taken into account after a patch was applied from static source code analysis. Markus Elfring (2): Delete an unnecessary check before the function call kfree One function call less in tce_iommu_attach_group()

[PATCH 1/2] vfio: powerpc/spapr: Delete an unnecessary check before the function call kfree

2015-06-28 Thread SF Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net Date: Sun, 28 Jun 2015 17:43:48 +0200 The kfree() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by:

[PATCH 2/2] vfio: powerpc/spapr: One function call less in tce_iommu_attach_group() after kzalloc() failure

2015-06-28 Thread SF Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net Date: Sun, 28 Jun 2015 17:58:42 +0200 The kfree() function was called even if a previous memory allocation try failed. This implementation detail could be improved by the introduction of another jump label. Signed-off-by: Markus Elfring

Re: [PATCH] KVM: x86: drop unneeded null test

2015-04-28 Thread SF Markus Elfring
If the null test is needed, the call to cancel_delayed_work_sync would have already crashed. Normally, the destroy function should only be called if the init functoin has succeeded, in which case ioapic is not null. Does your commit message need a small fix? Regards, Markus -- To unsubscribe