[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210130006.aKq8r63O-lkp@intel.com>
Date: Thu, 13 Oct 2022 00:19:28 +0800
From: kernel test robot <lkp@...el.com>
To: Paul Cercueil <paul@...pouillou.net>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Subject: drivers/net/ethernet/ti/cpmac.c:1168:5: warning: no previous
prototype for function 'cpmac_init'
Hi Paul,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 49da070062390094112b423ba443ea193527b2e4
commit: c434b9f80b0923e6460031b0fd964f8b0bf3c6a6 MIPS: Kconfig: add MIPS_GENERIC_KERNEL symbol
date: 2 years, 1 month ago
config: mips-randconfig-r015-20221012
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mipsel-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c434b9f80b0923e6460031b0fd964f8b0bf3c6a6
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout c434b9f80b0923e6460031b0fd964f8b0bf3c6a6
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/net/ethernet/ti/ scripts/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/ti/cpmac.c:1168:5: warning: no previous prototype for function 'cpmac_init' [-Wmissing-prototypes]
int cpmac_init(void)
^
drivers/net/ethernet/ti/cpmac.c:1168:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int cpmac_init(void)
^
static
>> drivers/net/ethernet/ti/cpmac.c:1238:6: warning: no previous prototype for function 'cpmac_exit' [-Wmissing-prototypes]
void cpmac_exit(void)
^
drivers/net/ethernet/ti/cpmac.c:1238:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void cpmac_exit(void)
^
static
2 warnings generated.
vim +/cpmac_init +1168 drivers/net/ethernet/ti/cpmac.c
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1167
f57ae66ee548642 drivers/net/ethernet/ti/cpmac.c Bill Pemberton 2012-12-03 @1168 int cpmac_init(void)
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1169 {
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1170 u32 mask;
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1171 int i, res;
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1172
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1173 cpmac_mii = mdiobus_alloc();
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1174 if (cpmac_mii == NULL)
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1175 return -ENOMEM;
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1176
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1177 cpmac_mii->name = "cpmac-mii";
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1178 cpmac_mii->read = cpmac_mdio_read;
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1179 cpmac_mii->write = cpmac_mdio_write;
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1180 cpmac_mii->reset = cpmac_mdio_reset;
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1181
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1182 cpmac_mii->priv = ioremap(AR7_REGS_MDIO, 256);
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1183
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1184 if (!cpmac_mii->priv) {
f160a2d0b524eee drivers/net/ethernet/ti/cpmac.c Varka Bhadram 2014-07-10 1185 pr_err("Can't ioremap mdio registers\n");
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1186 res = -ENXIO;
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1187 goto fail_alloc;
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1188 }
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1189
d43e6fb4ac4abfe drivers/net/ethernet/ti/cpmac.c Arnd Bergmann 2017-01-16 1190 /* FIXME: unhardcode gpio&reset bits */
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1191 ar7_gpio_disable(26);
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1192 ar7_gpio_disable(27);
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1193 ar7_device_reset(AR7_RESET_BIT_CPMAC_LO);
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1194 ar7_device_reset(AR7_RESET_BIT_CPMAC_HI);
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1195 ar7_device_reset(AR7_RESET_BIT_EPHY);
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1196
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1197 cpmac_mii->reset(cpmac_mii);
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1198
559764d1996e6ae drivers/net/cpmac.c Florian Fainelli 2010-08-08 1199 for (i = 0; i < 300; i++) {
559764d1996e6ae drivers/net/cpmac.c Florian Fainelli 2010-08-08 1200 mask = cpmac_read(cpmac_mii->priv, CPMAC_MDIO_ALIVE);
559764d1996e6ae drivers/net/cpmac.c Florian Fainelli 2010-08-08 1201 if (mask)
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1202 break;
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1203 else
e4540aa94f9b3e7 drivers/net/cpmac.c Florian Fainelli 2009-08-04 1204 msleep(10);
559764d1996e6ae drivers/net/cpmac.c Florian Fainelli 2010-08-08 1205 }
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1206
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1207 mask &= 0x7fffffff;
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1208 if (mask & (mask - 1)) {
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1209 external_switch = 1;
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1210 mask = 0;
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1211 }
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1212
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1213 cpmac_mii->phy_mask = ~(mask | 0x80000000);
d1733f078b1b377 drivers/net/ethernet/ti/cpmac.c Florian Fainelli 2012-01-09 1214 snprintf(cpmac_mii->id, MII_BUS_ID_SIZE, "cpmac-1");
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1215
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1216 res = mdiobus_register(cpmac_mii);
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1217 if (res)
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1218 goto fail_mii;
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1219
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1220 res = platform_driver_register(&cpmac_driver);
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1221 if (res)
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1222 goto fail_cpmac;
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1223
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1224 return 0;
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1225
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1226 fail_cpmac:
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1227 mdiobus_unregister(cpmac_mii);
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1228
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1229 fail_mii:
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1230 iounmap(cpmac_mii->priv);
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1231
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1232 fail_alloc:
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1233 mdiobus_free(cpmac_mii);
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1234
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1235 return res;
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1236 }
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1237
f57ae66ee548642 drivers/net/ethernet/ti/cpmac.c Bill Pemberton 2012-12-03 @1238 void cpmac_exit(void)
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1239 {
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1240 platform_driver_unregister(&cpmac_driver);
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1241 mdiobus_unregister(cpmac_mii);
298cf9beb967952 drivers/net/cpmac.c Lennert Buytenhek 2008-10-08 1242 iounmap(cpmac_mii->priv);
48a29516e8b0b8c drivers/net/cpmac.c Dan Carpenter 2010-03-02 1243 mdiobus_free(cpmac_mii);
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1244 }
d95b39c3909237a drivers/net/cpmac.c Matteo Croce 2007-10-14 1245
:::::: The code at line 1168 was first introduced by commit
:::::: f57ae66ee5486426fc86ed46f97c5e15792c8535 cpmac: remove __dev* attributes
:::::: TO: Bill Pemberton <wfp5p@...ginia.edu>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (123837 bytes)
Powered by blists - more mailing lists