Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1349905
| From | Andrzej Hajda <a.hajda@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] stmmac: Fix type of local variable in stmmac_xmit |
| Date | 2016-03-04 08:20 +0100 |
| Message-ID | <r8SbL-33v-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Variable entry holds result of jumbo_frm callback. It can be negative, so the variable should be signed. The patch changes also type of related first_entry variable to make code compact and coherent. The problem has been detected using patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 4c5ce98..cd31a3c 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1955,7 +1955,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev) unsigned int nopaged_len = skb_headlen(skb); int i, csum_insertion = 0, is_jumbo = 0; int nfrags = skb_shinfo(skb)->nr_frags; - unsigned int entry, first_entry; + int entry, first_entry; struct dma_desc *desc, *first; unsigned int enh_desc; -- 1.9.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] stmmac: Fix type of local variable in stmmac_xmit Andrzej Hajda <a.hajda@samsung.com> - 2016-03-04 08:20 +0100 Re: [PATCH] stmmac: Fix type of local variable in stmmac_xmit David Miller <davem@davemloft.net> - 2016-03-04 20:40 +0100
csiph-web