* arch/powerpc/kernel/iommu.c:76:2-16: WARNING: NULL check before some freeing functions is not needed.
@ 2021-03-18 23:44 kernel test robot
2021-03-18 23:44 ` [PATCH] powerpc/iommu/debug: fix ifnullfree.cocci warnings kernel test robot
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-03-18 23:44 UTC (permalink / raw)
To: Alexey Kardashevskiy; +Cc: kbuild-all, linux-kernel, Michael Ellerman
[-- Attachment #1: Type: text/plain, Size: 789 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 81aa0968b7ea6dbabcdcda37dc8434dca6e1565b
commit: 691602aab9c3cce31d3ff9529c09b7922a5f6224 powerpc/iommu/debug: Add debugfs entries for IOMMU tables
date: 7 weeks ago
config: powerpc-randconfig-c024-20210318 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cocci warnings: (new ones prefixed by >>)
>> arch/powerpc/kernel/iommu.c:76:2-16: WARNING: NULL check before some freeing functions is not needed.
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30507 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] powerpc/iommu/debug: fix ifnullfree.cocci warnings
2021-03-18 23:44 arch/powerpc/kernel/iommu.c:76:2-16: WARNING: NULL check before some freeing functions is not needed kernel test robot
@ 2021-03-18 23:44 ` kernel test robot
2021-03-31 1:09 ` Michael Ellerman
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-03-18 23:44 UTC (permalink / raw)
To: Alexey Kardashevskiy
Cc: kbuild-all, linux-kernel, Michael Ellerman,
Benjamin Herrenschmidt, Paul Mackerras, Niklas Schnelle,
Nicolin Chen, linuxppc-dev
From: kernel test robot <lkp@intel.com>
arch/powerpc/kernel/iommu.c:76:2-16: WARNING: NULL check before some freeing functions is not needed.
NULL check before some freeing functions is not needed.
Based on checkpatch warning
"kfree(NULL) is safe this check is probably not required"
and kfreeaddr.cocci by Julia Lawall.
Generated by: scripts/coccinelle/free/ifnullfree.cocci
Fixes: 691602aab9c3 ("powerpc/iommu/debug: Add debugfs entries for IOMMU tables")
CC: Alexey Kardashevskiy <aik@ozlabs.ru>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 81aa0968b7ea6dbabcdcda37dc8434dca6e1565b
commit: 691602aab9c3cce31d3ff9529c09b7922a5f6224 powerpc/iommu/debug: Add debugfs entries for IOMMU tables
iommu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -72,8 +72,7 @@ static void iommu_debugfs_del(struct iom
sprintf(name, "%08lx", tbl->it_index);
liobn_entry = debugfs_lookup(name, iommu_debugfs_dir);
- if (liobn_entry)
- debugfs_remove(liobn_entry);
+ debugfs_remove(liobn_entry);
}
#else
static void iommu_debugfs_add(struct iommu_table *tbl){}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/iommu/debug: fix ifnullfree.cocci warnings
2021-03-18 23:44 ` [PATCH] powerpc/iommu/debug: fix ifnullfree.cocci warnings kernel test robot
@ 2021-03-31 1:09 ` Michael Ellerman
0 siblings, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2021-03-31 1:09 UTC (permalink / raw)
To: kernel test robot, Alexey Kardashevskiy
Cc: linuxppc-dev, Paul Mackerras, Nicolin Chen, Niklas Schnelle,
kbuild-all, linux-kernel
On Fri, 19 Mar 2021 07:44:41 +0800, kernel test robot wrote:
> arch/powerpc/kernel/iommu.c:76:2-16: WARNING: NULL check before some freeing functions is not needed.
>
> NULL check before some freeing functions is not needed.
>
> Based on checkpatch warning
> "kfree(NULL) is safe this check is probably not required"
> and kfreeaddr.cocci by Julia Lawall.
>
> [...]
Applied to powerpc/next.
[1/1] powerpc/iommu/debug: fix ifnullfree.cocci warnings
https://git.kernel.org/powerpc/c/bbbe563f8490958861777d98871e16960163ea1b
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-31 1:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18 23:44 arch/powerpc/kernel/iommu.c:76:2-16: WARNING: NULL check before some freeing functions is not needed kernel test robot
2021-03-18 23:44 ` [PATCH] powerpc/iommu/debug: fix ifnullfree.cocci warnings kernel test robot
2021-03-31 1:09 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome