提交 f8057b7f 编写于 作者: H Hannes Eder 提交者: David S. Miller

drivers/net/netxen: fix sparse warnings: use NULL pointer instead of plain integer

Fix this sparse warnings:

  drivers/net/netxen/netxen_nic_hw.c:1462:18: warning: Using plain integer as NULL pointer
  drivers/net/netxen/netxen_nic_hw.c:1536:18: warning: Using plain integer as NULL pointer
Signed-off-by: NHannes Eder <hannes@hanneseder.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e855aac8
...@@ -1459,7 +1459,7 @@ static int netxen_nic_pci_mem_read_direct(struct netxen_adapter *adapter, ...@@ -1459,7 +1459,7 @@ static int netxen_nic_pci_mem_read_direct(struct netxen_adapter *adapter,
mem_ptr = ioremap(mem_base + mem_page, PAGE_SIZE * 2); mem_ptr = ioremap(mem_base + mem_page, PAGE_SIZE * 2);
else else
mem_ptr = ioremap(mem_base + mem_page, PAGE_SIZE); mem_ptr = ioremap(mem_base + mem_page, PAGE_SIZE);
if (mem_ptr == 0UL) { if (mem_ptr == NULL) {
*(uint8_t *)data = 0; *(uint8_t *)data = 0;
return -1; return -1;
} }
...@@ -1533,7 +1533,7 @@ netxen_nic_pci_mem_write_direct(struct netxen_adapter *adapter, u64 off, ...@@ -1533,7 +1533,7 @@ netxen_nic_pci_mem_write_direct(struct netxen_adapter *adapter, u64 off,
mem_ptr = ioremap(mem_base + mem_page, PAGE_SIZE*2); mem_ptr = ioremap(mem_base + mem_page, PAGE_SIZE*2);
else else
mem_ptr = ioremap(mem_base + mem_page, PAGE_SIZE); mem_ptr = ioremap(mem_base + mem_page, PAGE_SIZE);
if (mem_ptr == 0UL) if (mem_ptr == NULL)
return -1; return -1;
addr = mem_ptr; addr = mem_ptr;
addr += start & (PAGE_SIZE - 1); addr += start & (PAGE_SIZE - 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册