* [jpirko-mlxsw:petrm_resilient 5/5] net/ipv4/nexthop.c:2669:16: sparse: sparse: Using plain integer as NULL pointer
@ 2020-11-20 0:21 kernel test robot
2020-11-20 0:21 ` [RFC PATCH jpirko-mlxsw] nexthop_debugfs_alloc() can be static kernel test robot
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2020-11-20 0:21 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2747 bytes --]
tree: https://github.com/jpirko/linux_mlxsw petrm_resilient
head: f89604f4fb4130335e42ccf65a969ad0a0f58166
commit: f89604f4fb4130335e42ccf65a969ad0a0f58166 [5/5] debugfs for nexthop [xxx]
config: x86_64-randconfig-s022-20201119 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-123-g626c4742-dirty
# https://github.com/jpirko/linux_mlxsw/commit/f89604f4fb4130335e42ccf65a969ad0a0f58166
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw petrm_resilient
git checkout f89604f4fb4130335e42ccf65a969ad0a0f58166
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> net/ipv4/nexthop.c:2669:16: sparse: sparse: Using plain integer as NULL pointer
>> net/ipv4/nexthop.c:2646:24: sparse: sparse: symbol 'nexthop_debugfs_alloc' was not declared. Should it be static?
net/ipv4/nexthop.c: note: in included file (through include/linux/mm_types.h, include/linux/mmzone.h, include/linux/gfp.h, ...):
include/linux/rbtree.h:84:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
include/linux/rbtree.h:84:9: sparse: struct rb_node [noderef] __rcu *
include/linux/rbtree.h:84:9: sparse: struct rb_node *
Please review and possibly fold the followup patch.
vim +2669 net/ipv4/nexthop.c
2645
> 2646 struct nexthop_debugfs *nexthop_debugfs_alloc(void)
2647 {
2648 struct nexthop_debugfs *dfs;
2649 int err;
2650
2651 dfs = kzalloc(sizeof(*dfs), GFP_KERNEL);
2652 if (!dfs)
2653 return NULL;
2654
2655 dfs->ddir = debugfs_create_dir("nexthop", NULL);
2656 if (IS_ERR(dfs->ddir)) {
2657 err = PTR_ERR(dfs->ddir);
2658 goto err_create_dir;
2659 }
2660
2661 dfs->bucket_activity = debugfs_create_file("bucket_activity", S_IWUSR,
2662 dfs->ddir, NULL,
2663 &nexthop_debugfs_bucket_activity_ops);
2664 if (IS_ERR(dfs->bucket_activity)) {
2665 err = PTR_ERR(dfs->bucket_activity);
2666 goto err_create_bucket_activity;
2667 }
2668
> 2669 return 0;
2670
2671 err_create_bucket_activity:
2672 debugfs_remove_recursive(dfs->ddir);
2673 err_create_dir:
2674 kfree(dfs);
2675 return ERR_PTR(err);
2676 }
2677
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32004 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [RFC PATCH jpirko-mlxsw] nexthop_debugfs_alloc() can be static
2020-11-20 0:21 [jpirko-mlxsw:petrm_resilient 5/5] net/ipv4/nexthop.c:2669:16: sparse: sparse: Using plain integer as NULL pointer kernel test robot
@ 2020-11-20 0:21 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-11-20 0:21 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 678 bytes --]
Fixes: f89604f4fb41 ("debugfs for nexthop [xxx]")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
nexthop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
index ded4017fd6eb18..5f631306c9db4c 100644
--- a/net/ipv4/nexthop.c
+++ b/net/ipv4/nexthop.c
@@ -2643,7 +2643,7 @@ static const struct file_operations nexthop_debugfs_bucket_activity_ops = {
.llseek = no_llseek,
};
-struct nexthop_debugfs *nexthop_debugfs_alloc(void)
+static struct nexthop_debugfs *nexthop_debugfs_alloc(void)
{
struct nexthop_debugfs *dfs;
int err;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-20 0:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20 0:21 [jpirko-mlxsw:petrm_resilient 5/5] net/ipv4/nexthop.c:2669:16: sparse: sparse: Using plain integer as NULL pointer kernel test robot
2020-11-20 0:21 ` [RFC PATCH jpirko-mlxsw] nexthop_debugfs_alloc() can be static kernel test robot
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.