All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] net: stmmac: adding multiple buffers for rx
@ 2017-04-12 19:49 Dan Carpenter
  2017-04-19 15:24 ` Joao Pinto
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-04-12 19:49 UTC (permalink / raw)
  To: kernel-janitors

Hello Joao Pinto,

The patch 54139cf3bb33: "net: stmmac: adding multiple buffers for rx"
from Apr 6, 2017, leads to the following static checker warning:

	drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1274 init_dma_rx_desc_rings()
	warn: always true condition '(queue >= 0) => (0-u32max >= 0)'

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
  1270  
  1271          return 0;
  1272  
  1273  err_init_rx_buffers:
  1274          while (queue >= 0) {
                       ^^^^^^^^^^
This is harmless because of the break statement later, but slightly
annoying because of the static checker warning.

  1275                  while (--i >= 0)
  1276                          stmmac_free_rx_buffer(priv, queue, i);
  1277  
  1278                  if (queue = 0)
  1279                          break;
  1280  
  1281                  i = DMA_RX_SIZE;
  1282                  queue--;
  1283          }
  1284  
  1285          return ret;
  1286  }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [bug report] net: stmmac: adding multiple buffers for rx
  2017-04-12 19:49 [bug report] net: stmmac: adding multiple buffers for rx Dan Carpenter
@ 2017-04-19 15:24 ` Joao Pinto
  0 siblings, 0 replies; 2+ messages in thread
From: Joao Pinto @ 2017-04-19 15:24 UTC (permalink / raw)
  To: kernel-janitors

Hi Dan,

Às 8:49 PM de 4/12/2017, Dan Carpenter escreveu:
> Hello Joao Pinto,
> 
> The patch 54139cf3bb33: "net: stmmac: adding multiple buffers for rx"
> from Apr 6, 2017, leads to the following static checker warning:
> 
> 	drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1274 init_dma_rx_desc_rings()
> 	warn: always true condition '(queue >= 0) => (0-u32max >= 0)'
> 
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>   1270  
>   1271          return 0;
>   1272  
>   1273  err_init_rx_buffers:
>   1274          while (queue >= 0) {
>                        ^^^^^^^^^^
> This is harmless because of the break statement later, but slightly
> annoying because of the static checker warning.
> 
>   1275                  while (--i >= 0)
>   1276                          stmmac_free_rx_buffer(priv, queue, i);
>   1277  
>   1278                  if (queue = 0)
>   1279                          break;
>   1280  
>   1281                  i = DMA_RX_SIZE;
>   1282                  queue--;
>   1283          }
>   1284  
>   1285          return ret;
>   1286  }
> 
> regards,
> dan carpenter
> 

Sorry for delayed answer. I will fix this ASAP. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-19 15:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-12 19:49 [bug report] net: stmmac: adding multiple buffers for rx Dan Carpenter
2017-04-19 15:24 ` Joao Pinto

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.