From: kernel test robot <lkp@intel.com>
To: Joel Granados <j.granados@samsung.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [joelgranados:jag/sysctl-testing-for-0day 32/35] net/mpls/af_mpls.c:1438:15: error: implicit declaration of function 'mpls_dev_sysctl_register'; did you mean 'mpls_dev_sysctl_unregister'?
Date: Mon, 19 Jun 2023 23:38:41 +0800 [thread overview]
Message-ID: <202306192307.U2G2a3nu-lkp@intel.com> (raw)
tree: https://github.com/Joelgranados/linux.git jag/sysctl-testing-for-0day
head: 2b49f8dc213b7691cb69000b5a3986f82eb064e8
commit: 39c637a25cfe21584d6de41a2d8db3ef0261131d [32/35] sysctl: move mpls_dev_sysctl_register down so the mpls_table is 'visible'
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20230619/202306192307.U2G2a3nu-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230619/202306192307.U2G2a3nu-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306192307.U2G2a3nu-lkp@intel.com/
All errors (new ones prefixed by >>):
net/mpls/af_mpls.c: In function 'mpls_add_dev':
>> net/mpls/af_mpls.c:1438:15: error: implicit declaration of function 'mpls_dev_sysctl_register'; did you mean 'mpls_dev_sysctl_unregister'? [-Werror=implicit-function-declaration]
1438 | err = mpls_dev_sysctl_register(dev, mdev);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| mpls_dev_sysctl_unregister
net/mpls/af_mpls.c: At top level:
>> net/mpls/af_mpls.c:2632:12: error: static declaration of 'mpls_dev_sysctl_register' follows non-static declaration
2632 | static int mpls_dev_sysctl_register(struct net_device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~
net/mpls/af_mpls.c:1438:15: note: previous implicit declaration of 'mpls_dev_sysctl_register' with type 'int()'
1438 | err = mpls_dev_sysctl_register(dev, mdev);
| ^~~~~~~~~~~~~~~~~~~~~~~~
net/mpls/af_mpls.c:2632:12: warning: 'mpls_dev_sysctl_register' defined but not used [-Wunused-function]
2632 | static int mpls_dev_sysctl_register(struct net_device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +1438 net/mpls/af_mpls.c
37bde79979c386 Robert Shearman 2015-04-22 1412
03c57747a7020a Robert Shearman 2015-04-22 1413 static struct mpls_dev *mpls_add_dev(struct net_device *dev)
03c57747a7020a Robert Shearman 2015-04-22 1414 {
03c57747a7020a Robert Shearman 2015-04-22 1415 struct mpls_dev *mdev;
03c57747a7020a Robert Shearman 2015-04-22 1416 int err = -ENOMEM;
27d691056bde4a Robert Shearman 2017-01-16 1417 int i;
03c57747a7020a Robert Shearman 2015-04-22 1418
03c57747a7020a Robert Shearman 2015-04-22 1419 ASSERT_RTNL();
03c57747a7020a Robert Shearman 2015-04-22 1420
03c57747a7020a Robert Shearman 2015-04-22 1421 mdev = kzalloc(sizeof(*mdev), GFP_KERNEL);
03c57747a7020a Robert Shearman 2015-04-22 1422 if (!mdev)
03c57747a7020a Robert Shearman 2015-04-22 1423 return ERR_PTR(err);
03c57747a7020a Robert Shearman 2015-04-22 1424
27d691056bde4a Robert Shearman 2017-01-16 1425 mdev->stats = alloc_percpu(struct mpls_pcpu_stats);
27d691056bde4a Robert Shearman 2017-01-16 1426 if (!mdev->stats)
27d691056bde4a Robert Shearman 2017-01-16 1427 goto free;
27d691056bde4a Robert Shearman 2017-01-16 1428
27d691056bde4a Robert Shearman 2017-01-16 1429 for_each_possible_cpu(i) {
27d691056bde4a Robert Shearman 2017-01-16 1430 struct mpls_pcpu_stats *mpls_stats;
27d691056bde4a Robert Shearman 2017-01-16 1431
27d691056bde4a Robert Shearman 2017-01-16 1432 mpls_stats = per_cpu_ptr(mdev->stats, i);
27d691056bde4a Robert Shearman 2017-01-16 1433 u64_stats_init(&mpls_stats->syncp);
27d691056bde4a Robert Shearman 2017-01-16 1434 }
27d691056bde4a Robert Shearman 2017-01-16 1435
1182e4d0b4f873 David Ahern 2017-03-28 1436 mdev->dev = dev;
1182e4d0b4f873 David Ahern 2017-03-28 1437
37bde79979c386 Robert Shearman 2015-04-22 @1438 err = mpls_dev_sysctl_register(dev, mdev);
37bde79979c386 Robert Shearman 2015-04-22 1439 if (err)
37bde79979c386 Robert Shearman 2015-04-22 1440 goto free;
37bde79979c386 Robert Shearman 2015-04-22 1441
03c57747a7020a Robert Shearman 2015-04-22 1442 rcu_assign_pointer(dev->mpls_ptr, mdev);
03c57747a7020a Robert Shearman 2015-04-22 1443
03c57747a7020a Robert Shearman 2015-04-22 1444 return mdev;
37bde79979c386 Robert Shearman 2015-04-22 1445
37bde79979c386 Robert Shearman 2015-04-22 1446 free:
27d691056bde4a Robert Shearman 2017-01-16 1447 free_percpu(mdev->stats);
37bde79979c386 Robert Shearman 2015-04-22 1448 kfree(mdev);
37bde79979c386 Robert Shearman 2015-04-22 1449 return ERR_PTR(err);
03c57747a7020a Robert Shearman 2015-04-22 1450 }
03c57747a7020a Robert Shearman 2015-04-22 1451
:::::: The code at line 1438 was first introduced by commit
:::::: 37bde79979c3862c79294c62ddcef7efc477e4bf mpls: Per-device enabling of packet input
:::::: TO: Robert Shearman <rshearma@brocade.com>
:::::: CC: David S. Miller <davem@davemloft.net>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-06-19 15:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202306192307.U2G2a3nu-lkp@intel.com \
--to=lkp@intel.com \
--cc=j.granados@samsung.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.