[PATCH 00/15] staging: comedi: cleanup NULL pointer checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For aesthetics, change all the NULL comparisons from (foo == NULL) to (!foo)
and (foo != NULL) to simply (foo).

In addition, remove the NULL pointer checks of the 'cmd' in the s626 driver.
The 'cmd' is the address of a member variable in a struct. It will always
be valid.

H Hartley Sweeten (15):
  staging: comedi: comedi_fops: (!foo) preferred over (foo == NULL)
  staging: comedi: drivers: (!foo) preferred over (foo == NULL)
  staging: comedi: amplc_pci224: (!foo) preferred over (foo == NULL)
  staging: comedi: amplc_pci230: (!foo) preferred over (foo == NULL)
  staging: comedi: cb_pcidas64: (!foo) preferred over (foo == NULL)
  staging: comedi: mite: (!foo) preferred over (foo == NULL)
  staging: comedi: ni_660x: (!foo) preferred over (foo == NULL)
  staging: comedi: ni_atmio: (!foo) preferred over (foo == NULL)
  staging: comedi: ni_labpc_common: (!foo) preferred over (foo == NULL)
  staging: comedi: ni_pcidio: (!foo) preferred over (foo == NULL)
  staging: comedi: ni_pcimio: (!foo) preferred over (foo == NULL)
  staging: comedi: ni_tiocmd: (!foo) preferred over (foo == NULL)
  staging: comedi: ni_mio_common: (!foo) preferred over (foo == NULL)
  staging: comedi: kcomedilib_main: (!foo) preferred over (foo == NULL)
  staging: comedi: s626: remove unnecessary 'cmd' pointer checks

 drivers/staging/comedi/comedi_fops.c               | 22 +++++++++++-----------
 drivers/staging/comedi/drivers.c                   |  8 ++++----
 drivers/staging/comedi/drivers/amplc_pci224.c      |  2 +-
 drivers/staging/comedi/drivers/amplc_pci230.c      |  2 +-
 drivers/staging/comedi/drivers/cb_pcidas64.c       | 10 +++++-----
 drivers/staging/comedi/drivers/mite.c              |  6 +++---
 drivers/staging/comedi/drivers/ni_660x.c           |  6 +++---
 drivers/staging/comedi/drivers/ni_atmio.c          |  2 +-
 drivers/staging/comedi/drivers/ni_labpc_common.c   |  2 +-
 drivers/staging/comedi/drivers/ni_mio_common.c     | 12 ++++++------
 drivers/staging/comedi/drivers/ni_pcidio.c         |  4 ++--
 drivers/staging/comedi/drivers/ni_pcimio.c         | 10 +++++-----
 drivers/staging/comedi/drivers/ni_tiocmd.c         |  6 +++---
 drivers/staging/comedi/drivers/s626.c              |  8 ++------
 .../staging/comedi/kcomedilib/kcomedilib_main.c    |  2 +-
 15 files changed, 49 insertions(+), 53 deletions(-)

-- 
2.3.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux