diff options
author | Jubin John | 2016-02-15 05:19:49 +0100 |
---|---|---|
committer | Doug Ledford | 2016-03-11 02:45:36 +0100 |
commit | d125a6c66b972e8c6768707c2814107df5963f5f (patch) | |
tree | b9339bc0908ea5008f221ad3b10945da2b631a1c /drivers/staging/rdma/hfi1/chip.c | |
parent | staging/rdma/hfi1: Remove space after cast (diff) | |
download | kernel-qcow2-linux-d125a6c66b972e8c6768707c2814107df5963f5f.tar.gz kernel-qcow2-linux-d125a6c66b972e8c6768707c2814107df5963f5f.tar.xz kernel-qcow2-linux-d125a6c66b972e8c6768707c2814107df5963f5f.zip |
staging/rdma/hfi1: Fix comparison to NULL
Convert pointer comparisons to NULL to !pointer
to fix checkpatch check:
CHECK: Comparison to NULL could be written "!pointer"
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/staging/rdma/hfi1/chip.c')
-rw-r--r-- | drivers/staging/rdma/hfi1/chip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/rdma/hfi1/chip.c b/drivers/staging/rdma/hfi1/chip.c index cf578654e48b..ea0ffd467cdf 100644 --- a/drivers/staging/rdma/hfi1/chip.c +++ b/drivers/staging/rdma/hfi1/chip.c @@ -12260,7 +12260,7 @@ u64 hfi1_gpio_mod(struct hfi1_devdata *dd, u32 target, u32 data, u32 dir, int hfi1_init_ctxt(struct send_context *sc) { - if (sc != NULL) { + if (sc) { struct hfi1_devdata *dd = sc->dd; u64 reg; u8 set = (sc->type == SC_USER ? @@ -12371,7 +12371,7 @@ static void clean_up_interrupts(struct hfi1_devdata *dd) struct hfi1_msix_entry *me = dd->msix_entries; for (i = 0; i < dd->num_msix_entries; i++, me++) { - if (me->arg == NULL) /* => no irq, no affinity */ + if (!me->arg) /* => no irq, no affinity */ continue; hfi1_put_irq_affinity(dd, &dd->msix_entries[i]); free_irq(me->msix.vector, me->arg); @@ -12534,7 +12534,7 @@ static int request_msix_irqs(struct hfi1_devdata *dd) continue; } /* no argument, no interrupt */ - if (arg == NULL) + if (!arg) continue; /* make sure the name is terminated */ me->name[sizeof(me->name) - 1] = 0; |