zhong jiang (2):
ethernet: declance: Use NULL to compare with pointer-typed value
rather than 0
ethernet: lpc_eth: Use NULL to compare with pointer-typed value
rather than 0
drivers/net/ethernet/amd/declance.c | 2 +-
drivers/net/ethernet/nxp/lpc_eth.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
1.7.12.4
We should use NULL to compare with pointer-typed value rather than
0. The issue is detected with the help of Coccinelle.
---
drivers/net/ethernet/amd/declance.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
We should use NULL to compare with pointer-typed value rather than 0.
The issue is detected with the help of Coccinelle.
---
drivers/net/ethernet/nxp/lpc_eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -1350,7 +1350,7 @@ static int lpc_eth_drv_probe(struct platform_device *pdev)"IRAM not big enough for net buffers, using SDRAM instead.\n");}-if(pldat->dma_buff_base_v==0){+if(pldat->dma_buff_base_v==NULL){ret=dma_coerce_mask_and_coherent(&pdev->dev,DMA_BIT_MASK(32));if(ret)gotoerr_out_free_irq;
From: Vladimir Zapolskiy <vz@mleia.com> Date: 2018-08-17 15:29:06
Hi zhong jiang,
On 08/17/2018 04:18 PM, zhong jiang wrote:
quoted hunk
We should use NULL to compare with pointer-typed value rather than 0.
The issue is detected with the help of Coccinelle.
---
drivers/net/ethernet/nxp/lpc_eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -1350,7 +1350,7 @@ static int lpc_eth_drv_probe(struct platform_device *pdev)"IRAM not big enough for net buffers, using SDRAM instead.\n");}-if(pldat->dma_buff_base_v==0){+if(pldat->dma_buff_base_v==NULL){
That's a valid finding, but please use a common 0 and NULL comparison in form of
if (!pldat->dma_buff_base_v)
To the change above please feel free to add my
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
if (ret)
goto err_out_free_irq;
Hi zhong jiang,
On 08/17/2018 04:18 PM, zhong jiang wrote:
quoted
We should use NULL to compare with pointer-typed value rather than 0.
The issue is detected with the help of Coccinelle.
---
drivers/net/ethernet/nxp/lpc_eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -1350,7 +1350,7 @@ static int lpc_eth_drv_probe(struct platform_device *pdev)"IRAM not big enough for net buffers, using SDRAM instead.\n");}-if(pldat->dma_buff_base_v==0){+if(pldat->dma_buff_base_v==NULL){
That's a valid finding, but please use a common 0 and NULL comparison in form of
if (!pldat->dma_buff_base_v)
To the change above please feel free to add my
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Thanks, Will do in v2
quoted
ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
if (ret)
goto err_out_free_irq;