Re: [PATCH -next] net: ax25: Fix error path of ax25_init()

From: kernel test robot
Date: Sat Jul 31 2021 - 05:26:32 EST


Hi Zheng,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20210730]

url: https://github.com/0day-ci/linux/commits/Zheng-Yongjun/net-ax25-Fix-error-path-of-ax25_init/20210731-153149
base: 8d4b477da1a807199ca60e0829357ce7aa6758d5
config: riscv-randconfig-r022-20210730 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/add0b8cab6f698386d51feb5d99180059fad64e3
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Zheng-Yongjun/net-ax25-Fix-error-path-of-ax25_init/20210731-153149
git checkout add0b8cab6f698386d51feb5d99180059fad64e3
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash net/ax25/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

net/ax25/af_ax25.c: In function 'ax25_init':
>> net/ax25/af_ax25.c:1986:5: error: void value not ignored as it ought to be
1986 | rc = dev_add_pack(&ax25_packet_type);
| ^


vim +1986 net/ax25/af_ax25.c

1975
1976 static int __init ax25_init(void)
1977 {
1978 int rc = proto_register(&ax25_proto, 0);
1979
1980 if (rc)
1981 goto out;
1982
1983 rc = sock_register(&ax25_family_ops);
1984 if (rc)
1985 goto out_proto;
> 1986 rc = dev_add_pack(&ax25_packet_type);
1987 if (rc)
1988 goto out_sock;
1989 rc = register_netdevice_notifier(&ax25_dev_notifier);
1990 if (rc)
1991 goto out_dev;
1992
1993 proc_create_seq("ax25_route", 0444, init_net.proc_net, &ax25_rt_seqops);
1994 proc_create_seq("ax25", 0444, init_net.proc_net, &ax25_info_seqops);
1995 proc_create_seq("ax25_calls", 0444, init_net.proc_net,
1996 &ax25_uid_seqops);
1997
1998 return 0;
1999
2000 out_dev:
2001 dev_remove_pack(&ax25_packet_type);
2002 out_sock:
2003 sock_unregister(PF_AX25);
2004 out_proto:
2005 proto_unregister(&ax25_proto);
2006 out:
2007 return rc;
2008 }
2009 module_init(ax25_init);
2010
2011

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip