[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1456287984-10459-9-git-send-email-jeffrey.t.kirsher@intel.com>
Date: Tue, 23 Feb 2016 20:26:12 -0800
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
To: davem@...emloft.net
Cc: Julia Lawall <julia.lawall@...6.fr>, netdev@...r.kernel.org,
nhorman@...hat.com, sassmann@...hat.com, jogreene@...hat.com,
Gangfeng Huang <gangfeng.huang@...com>,
Fengguang Wu <fengguang.wu@...el.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Subject: [net-next 08/20] igb: fix compare_const_fl.cocci warnings
From: Julia Lawall <julia.lawall@...6.fr>
Kernel code typically uses == NULL.
Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
CC: Gangfeng Huang <gangfeng.huang@...com>
Signed-off-by: Julia Lawall <julia.lawall@...6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
Tested-by: Aaron Brown <aaron.f.brown@...el.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
---
drivers/net/ethernet/intel/igb/igb_cdev.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_cdev.c b/drivers/net/ethernet/intel/igb/igb_cdev.c
index df237c6..28fafec 100644
--- a/drivers/net/ethernet/intel/igb/igb_cdev.c
+++ b/drivers/net/ethernet/intel/igb/igb_cdev.c
@@ -92,7 +92,7 @@ static int igb_bind(struct file *file, void __user *argp)
adapter = (struct igb_adapter *)file->private_data;
- if (NULL == adapter)
+ if (adapter == NULL)
return -ENOENT;
mmap_size = pci_resource_len(adapter->pdev, 0);
@@ -119,7 +119,7 @@ static long igb_mapring(struct file *file, void __user *arg)
return -EINVAL;
adapter = file->private_data;
- if (NULL == adapter) {
+ if (adapter == NULL) {
dev_err(&adapter->pdev->dev, "map to unbound device!\n");
return -ENOENT;
}
@@ -182,7 +182,7 @@ static long igb_mapbuf(struct file *file, void __user *arg)
return -EINVAL;
adapter = file->private_data;
- if (NULL == adapter) {
+ if (adapter == NULL) {
dev_err(&adapter->pdev->dev, "map to unbound device!\n");
return -ENOENT;
}
@@ -246,7 +246,7 @@ static long igb_unmapring(struct file *file, void __user *arg)
return -EINVAL;
adapter = file->private_data;
- if (NULL == adapter) {
+ if (adapter == NULL) {
dev_err(&adapter->pdev->dev, "map to unbound device!\n");
return -ENOENT;
}
@@ -310,7 +310,7 @@ static long igb_unmapbuf(struct file *file, void __user *arg)
return -EFAULT;
adapter = file->private_data;
- if (NULL == adapter) {
+ if (adapter == NULL) {
dev_err(&adapter->pdev->dev, "map to unbound device!\n");
return -ENOENT;
}
@@ -398,7 +398,7 @@ static int igb_close_file(struct inode *inode, struct file *file)
{
struct igb_adapter *adapter = file->private_data;
- if (NULL == adapter)
+ if (adapter == NULL)
return 0;
mutex_lock(&adapter->cdev_mutex);
@@ -434,7 +434,7 @@ static int igb_mmap(struct file *file, struct vm_area_struct *vma)
dma_addr_t pgoff = vma->vm_pgoff;
dma_addr_t physaddr;
- if (NULL == adapter)
+ if (adapter == NULL)
return -ENODEV;
if (pgoff == 0)
--
2.5.0
Powered by blists - more mailing lists