From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [csky-linux:linux-5.15-rc1-d1-v4 7/7] drivers/net/ethernet/allwinnertmp/sunxi-gmac.c:1313:52: warning: cast to pointer from integer of different size
Date: Sat, 04 Sep 2021 20:52:25 +0800 [thread overview]
Message-ID: <202109042018.pZI3U3FW-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4896 bytes --]
tree: https://github.com/c-sky/csky-linux linux-5.15-rc1-d1-v4
head: 88c6ea42e010e46e58be159efa07cda22d95a512
commit: 88c6ea42e010e46e58be159efa07cda22d95a512 [7/7] riscv: soc: (not ready) Allwinner D1 GMAC driver
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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/c-sky/csky-linux/commit/88c6ea42e010e46e58be159efa07cda22d95a512
git remote add csky-linux https://github.com/c-sky/csky-linux
git fetch --no-tags csky-linux linux-5.15-rc1-d1-v4
git checkout 88c6ea42e010e46e58be159efa07cda22d95a512
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/allwinnertmp/sunxi-gmac.c:165:6: warning: no previous prototype for 'sunxi_udelay' [-Wmissing-prototypes]
165 | void sunxi_udelay(int n)
| ^~~~~~~~~~~~
drivers/net/ethernet/allwinnertmp/sunxi-gmac.c: In function 'geth_open':
>> drivers/net/ethernet/allwinnertmp/sunxi-gmac.c:1313:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1313 | sunxi_start_rx(priv->base, (unsigned long)((struct dma_desc *)
| ^
drivers/net/ethernet/allwinnertmp/sunxi-gmac.c:1315:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1315 | sunxi_start_tx(priv->base, (unsigned long)((struct dma_desc *)
| ^
drivers/net/ethernet/allwinnertmp/sunxi-gmac.c: At top level:
drivers/net/ethernet/allwinnertmp/sunxi-gmac.c:1752:5: warning: no previous prototype for 'geth_set_features' [-Wmissing-prototypes]
1752 | int geth_set_features(struct net_device *ndev, netdev_features_t features)
| ^~~~~~~~~~~~~~~~~
vim +1313 drivers/net/ethernet/allwinnertmp/sunxi-gmac.c
1254
1255 static int geth_open(struct net_device *ndev)
1256 {
1257 struct geth_priv *priv = netdev_priv(ndev);
1258 int ret = 0;
1259
1260 ret = geth_power_on(priv);
1261 if (ret) {
1262 netdev_err(ndev, "Power on is failed\n");
1263 ret = -EINVAL;
1264 }
1265
1266 ret = geth_clk_enable(priv);
1267 if (ret) {
1268 pr_err("%s: clk enable is failed\n", __func__);
1269 ret = -EINVAL;
1270 }
1271
1272 netif_carrier_off(ndev);
1273
1274 ret = geth_phy_init(ndev);
1275 if (ret)
1276 goto err;
1277
1278 ret = sunxi_mac_reset((void *)priv->base, &sunxi_udelay, 10000);
1279 if (ret) {
1280 netdev_err(ndev, "Initialize hardware error\n");
1281 goto desc_err;
1282 }
1283
1284 sunxi_mac_init(priv->base, txmode, rxmode);
1285 sunxi_set_umac(priv->base, ndev->dev_addr, 0);
1286
1287 if (!priv->is_suspend) {
1288 ret = geth_dma_desc_init(ndev);
1289 if (ret) {
1290 ret = -EINVAL;
1291 goto desc_err;
1292 }
1293 }
1294
1295 memset(priv->dma_tx, 0, dma_desc_tx * sizeof(struct dma_desc));
1296 memset(priv->dma_rx, 0, dma_desc_rx * sizeof(struct dma_desc));
1297
1298 desc_init_chain(priv->dma_rx, (unsigned long)priv->dma_rx_phy, dma_desc_rx);
1299 desc_init_chain(priv->dma_tx, (unsigned long)priv->dma_tx_phy, dma_desc_tx);
1300
1301 priv->rx_clean = 0;
1302 priv->rx_dirty = 0;
1303 priv->tx_clean = 0;
1304 priv->tx_dirty = 0;
1305 geth_rx_refill(ndev);
1306
1307 /* Extra statistics */
1308 memset(&priv->xstats, 0, sizeof(struct geth_extra_stats));
1309
1310 if (ndev->phydev)
1311 phy_start(ndev->phydev);
1312
> 1313 sunxi_start_rx(priv->base, (unsigned long)((struct dma_desc *)
1314 priv->dma_rx_phy + priv->rx_dirty));
1315 sunxi_start_tx(priv->base, (unsigned long)((struct dma_desc *)
1316 priv->dma_tx_phy + priv->tx_clean));
1317
1318 napi_enable(&priv->napi);
1319 netif_start_queue(ndev);
1320
1321 /* Enable the Rx/Tx */
1322 sunxi_mac_enable(priv->base);
1323
1324 return 0;
1325
1326 desc_err:
1327 geth_phy_release(ndev);
1328 err:
1329 geth_clk_disable(priv);
1330 if (priv->is_suspend)
1331 napi_enable(&priv->napi);
1332
1333 geth_power_off(priv);
1334
1335 return ret;
1336 }
1337
---
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: 68562 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Liu Shaohua <liush@allwinnertech.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Guo Ren <guoren@linux.alibaba.com>
Subject: [csky-linux:linux-5.15-rc1-d1-v4 7/7] drivers/net/ethernet/allwinnertmp/sunxi-gmac.c:1313:52: warning: cast to pointer from integer of different size
Date: Sat, 4 Sep 2021 20:52:25 +0800 [thread overview]
Message-ID: <202109042018.pZI3U3FW-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4768 bytes --]
tree: https://github.com/c-sky/csky-linux linux-5.15-rc1-d1-v4
head: 88c6ea42e010e46e58be159efa07cda22d95a512
commit: 88c6ea42e010e46e58be159efa07cda22d95a512 [7/7] riscv: soc: (not ready) Allwinner D1 GMAC driver
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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/c-sky/csky-linux/commit/88c6ea42e010e46e58be159efa07cda22d95a512
git remote add csky-linux https://github.com/c-sky/csky-linux
git fetch --no-tags csky-linux linux-5.15-rc1-d1-v4
git checkout 88c6ea42e010e46e58be159efa07cda22d95a512
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/allwinnertmp/sunxi-gmac.c:165:6: warning: no previous prototype for 'sunxi_udelay' [-Wmissing-prototypes]
165 | void sunxi_udelay(int n)
| ^~~~~~~~~~~~
drivers/net/ethernet/allwinnertmp/sunxi-gmac.c: In function 'geth_open':
>> drivers/net/ethernet/allwinnertmp/sunxi-gmac.c:1313:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1313 | sunxi_start_rx(priv->base, (unsigned long)((struct dma_desc *)
| ^
drivers/net/ethernet/allwinnertmp/sunxi-gmac.c:1315:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1315 | sunxi_start_tx(priv->base, (unsigned long)((struct dma_desc *)
| ^
drivers/net/ethernet/allwinnertmp/sunxi-gmac.c: At top level:
drivers/net/ethernet/allwinnertmp/sunxi-gmac.c:1752:5: warning: no previous prototype for 'geth_set_features' [-Wmissing-prototypes]
1752 | int geth_set_features(struct net_device *ndev, netdev_features_t features)
| ^~~~~~~~~~~~~~~~~
vim +1313 drivers/net/ethernet/allwinnertmp/sunxi-gmac.c
1254
1255 static int geth_open(struct net_device *ndev)
1256 {
1257 struct geth_priv *priv = netdev_priv(ndev);
1258 int ret = 0;
1259
1260 ret = geth_power_on(priv);
1261 if (ret) {
1262 netdev_err(ndev, "Power on is failed\n");
1263 ret = -EINVAL;
1264 }
1265
1266 ret = geth_clk_enable(priv);
1267 if (ret) {
1268 pr_err("%s: clk enable is failed\n", __func__);
1269 ret = -EINVAL;
1270 }
1271
1272 netif_carrier_off(ndev);
1273
1274 ret = geth_phy_init(ndev);
1275 if (ret)
1276 goto err;
1277
1278 ret = sunxi_mac_reset((void *)priv->base, &sunxi_udelay, 10000);
1279 if (ret) {
1280 netdev_err(ndev, "Initialize hardware error\n");
1281 goto desc_err;
1282 }
1283
1284 sunxi_mac_init(priv->base, txmode, rxmode);
1285 sunxi_set_umac(priv->base, ndev->dev_addr, 0);
1286
1287 if (!priv->is_suspend) {
1288 ret = geth_dma_desc_init(ndev);
1289 if (ret) {
1290 ret = -EINVAL;
1291 goto desc_err;
1292 }
1293 }
1294
1295 memset(priv->dma_tx, 0, dma_desc_tx * sizeof(struct dma_desc));
1296 memset(priv->dma_rx, 0, dma_desc_rx * sizeof(struct dma_desc));
1297
1298 desc_init_chain(priv->dma_rx, (unsigned long)priv->dma_rx_phy, dma_desc_rx);
1299 desc_init_chain(priv->dma_tx, (unsigned long)priv->dma_tx_phy, dma_desc_tx);
1300
1301 priv->rx_clean = 0;
1302 priv->rx_dirty = 0;
1303 priv->tx_clean = 0;
1304 priv->tx_dirty = 0;
1305 geth_rx_refill(ndev);
1306
1307 /* Extra statistics */
1308 memset(&priv->xstats, 0, sizeof(struct geth_extra_stats));
1309
1310 if (ndev->phydev)
1311 phy_start(ndev->phydev);
1312
> 1313 sunxi_start_rx(priv->base, (unsigned long)((struct dma_desc *)
1314 priv->dma_rx_phy + priv->rx_dirty));
1315 sunxi_start_tx(priv->base, (unsigned long)((struct dma_desc *)
1316 priv->dma_tx_phy + priv->tx_clean));
1317
1318 napi_enable(&priv->napi);
1319 netif_start_queue(ndev);
1320
1321 /* Enable the Rx/Tx */
1322 sunxi_mac_enable(priv->base);
1323
1324 return 0;
1325
1326 desc_err:
1327 geth_phy_release(ndev);
1328 err:
1329 geth_clk_disable(priv);
1330 if (priv->is_suspend)
1331 napi_enable(&priv->napi);
1332
1333 geth_power_off(priv);
1334
1335 return ret;
1336 }
1337
---
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: 68562 bytes --]
next reply other threads:[~2021-09-04 12:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-04 12:52 kernel test robot [this message]
2021-09-04 12:52 ` [csky-linux:linux-5.15-rc1-d1-v4 7/7] drivers/net/ethernet/allwinnertmp/sunxi-gmac.c:1313:52: warning: cast to pointer from integer of different size kernel test robot
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=202109042018.pZI3U3FW-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.