Skip to contentSkip to conversation

net: stmmac: adding multiple buffers for RX (fwd)

PATCH Julia Lawall 2 participants 2 messages Apr 6, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

It looks like an infinite loop, if queue is unsigned.

julia

---------- Forwarded message ----------
Date: Thu, 6 Apr 2017 11:49:01 +0800
From: kbuild test robot <[email protected]>
To: [email protected]
Cc: Julia Lawall <[email protected]>
Subject: Re: [PATCH 2/4 v2 net-next] net: stmmac: adding multiple buffers for RX

[auto build test WARNING on net-next/master]

url: https://github.com/0day-ci/linux/commits/Joao-Pinto/net-stmmac-break-some-functions-into-RX-and-TX-scopes/20170406-081523
:::::: branch date: 4 hours ago
:::::: commit date: 4 hours ago

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2852:15-20: WARNING: Unsigned expression compared with zero: entry < 0

Quoted 1 line
Quoted 1 line

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1190:8-13: WARNING: Unsigned expression compared with zero: queue >= 0

git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout b403b5806dca0f85904ddc6cf2241286da86ed9b vim +1190 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

b6ad2502 Joao Pinto         2017-04-05  1174  			if (priv->extend_desc)
b403b580 Joao Pinto         2017-04-05  1175  				priv->hw->mode->init(rx_q->dma_erx,
b403b580 Joao Pinto         2017-04-05  1176  						     rx_q->dma_rx_phy,
e3ad57c9 Giuseppe Cavallaro 2016-02-29  1177  						     DMA_RX_SIZE, 1);
b6ad2502 Joao Pinto         2017-04-05  1178  			else
b403b580 Joao Pinto         2017-04-05  1179  				priv->hw->mode->init(rx_q->dma_rx,
b403b580 Joao Pinto         2017-04-05  1180  						     rx_q->dma_rx_phy,
e3ad57c9 Giuseppe Cavallaro 2016-02-29  1181  						     DMA_RX_SIZE, 0);
b6ad2502 Joao Pinto         2017-04-05  1182  		}
b403b580 Joao Pinto         2017-04-05  1183  	}
b403b580 Joao Pinto         2017-04-05  1184
b403b580 Joao Pinto         2017-04-05  1185  	buf_sz = bfsize;
b6ad2502 Joao Pinto         2017-04-05  1186
b6ad2502 Joao Pinto         2017-04-05  1187  	return 0;
b403b580 Joao Pinto         2017-04-05  1188
b6ad2502 Joao Pinto         2017-04-05  1189  err_init_rx_buffers:
b403b580 Joao Pinto         2017-04-05 @1190  	while (queue >= 0) {
b6ad2502 Joao Pinto         2017-04-05  1191  		while (--i >= 0)
b403b580 Joao Pinto         2017-04-05  1192  			stmmac_free_rx_buffer(priv, queue, i);
b403b580 Joao Pinto         2017-04-05  1193
b403b580 Joao Pinto         2017-04-05  1194  		i = DMA_RX_SIZE;
b403b580 Joao Pinto         2017-04-05  1195  		queue--;
b403b580 Joao Pinto         2017-04-05  1196  	}
b403b580 Joao Pinto         2017-04-05  1197
b6ad2502 Joao Pinto         2017-04-05  1198  	return ret;

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

#1 lore raw

Às 6:29 AM de 4/6/2017, Julia Lawall escreveu:

Quoted 4 lines

It looks like an infinite loop, if queue is unsigned.

julia

Yes you are right, I will fix it, thanks.

Joao

Quoted 51 lines

---------- Forwarded message ----------
Date: Thu, 6 Apr 2017 11:49:01 +0800
From: kbuild test robot <[email protected]>
To: [email protected]
Cc: Julia Lawall <[email protected]>
Subject: Re: [PATCH 2/4 v2 net-next] net: stmmac: adding multiple buffers for RX

[auto build test WARNING on net-next/master]

url: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_0day-2Dci_linux_commits_Joao-2DPinto_net-2Dstmmac-2Dbreak-2Dsome-2Dfunctions-2Dinto-2DRX-2Dand-2DTX-2Dscopes_20170406-2D081523&d=DwIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=s2fO0hii0OGNOv9qQy_HRXy-xAJUD1NNoEcc3io_kx0&m=SF-IM8g8b7VBN_AjT6JxdRBYkTu-2huMLcFlVh_4YKw&s=h9uKHPp4P6ZsYsIGUk0YBvl3ToWDvBWaDUPv5JaNfF4&e=
:::::: branch date: 4 hours ago
:::::: commit date: 4 hours ago

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2852:15-20: WARNING: Unsigned expression compared with zero: entry < 0

Quoted 1 line
Quoted 1 line

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1190:8-13: WARNING: Unsigned expression compared with zero: queue >= 0

git remote add linux-review https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_0day-2Dci_linux&d=DwIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=s2fO0hii0OGNOv9qQy_HRXy-xAJUD1NNoEcc3io_kx0&m=SF-IM8g8b7VBN_AjT6JxdRBYkTu-2huMLcFlVh_4YKw&s=q4A5_6A5zp5DRgmx5IJbDiIpc2W3GK3tSNhqpyIaHX8&e=
git remote update linux-review
git checkout b403b5806dca0f85904ddc6cf2241286da86ed9b
vim +1190 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

b6ad2502 Joao Pinto         2017-04-05  1174  			if (priv->extend_desc)
b403b580 Joao Pinto         2017-04-05  1175  				priv->hw->mode->init(rx_q->dma_erx,
b403b580 Joao Pinto         2017-04-05  1176  						     rx_q->dma_rx_phy,
e3ad57c9 Giuseppe Cavallaro 2016-02-29  1177  						     DMA_RX_SIZE, 1);
b6ad2502 Joao Pinto         2017-04-05  1178  			else
b403b580 Joao Pinto         2017-04-05  1179  				priv->hw->mode->init(rx_q->dma_rx,
b403b580 Joao Pinto         2017-04-05  1180  						     rx_q->dma_rx_phy,
e3ad57c9 Giuseppe Cavallaro 2016-02-29  1181  						     DMA_RX_SIZE, 0);
b6ad2502 Joao Pinto         2017-04-05  1182  		}
b403b580 Joao Pinto         2017-04-05  1183  	}
b403b580 Joao Pinto         2017-04-05  1184
b403b580 Joao Pinto         2017-04-05  1185  	buf_sz = bfsize;
b6ad2502 Joao Pinto         2017-04-05  1186
b6ad2502 Joao Pinto         2017-04-05  1187  	return 0;
b403b580 Joao Pinto         2017-04-05  1188
b6ad2502 Joao Pinto         2017-04-05  1189  err_init_rx_buffers:
b403b580 Joao Pinto         2017-04-05 @1190  	while (queue >= 0) {
b6ad2502 Joao Pinto         2017-04-05  1191  		while (--i >= 0)
b403b580 Joao Pinto         2017-04-05  1192  			stmmac_free_rx_buffer(priv, queue, i);
b403b580 Joao Pinto         2017-04-05  1193
b403b580 Joao Pinto         2017-04-05  1194  		i = DMA_RX_SIZE;
b403b580 Joao Pinto         2017-04-05  1195  		queue--;
b403b580 Joao Pinto         2017-04-05  1196  	}
b403b580 Joao Pinto         2017-04-05  1197
b6ad2502 Joao Pinto         2017-04-05  1198  	return ret;

---
0-DAY kernel test infrastructure Open Source Technology Center
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.01.org_pipermail_kbuild-2Dall&d=DwIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=s2fO0hii0OGNOv9qQy_HRXy-xAJUD1NNoEcc3io_kx0&m=SF-IM8g8b7VBN_AjT6JxdRBYkTu-2huMLcFlVh_4YKw&s=g4EUS_5pRcIV-m5yRBYE0N_JUxlnC68-_z4v2N9zdaU&e= Intel Corporation