1. 18 Apr, 2017 16 commits
    • Tobin C. Harding's avatar
      staging: ks7010: add struct comment to ks_sdio_card · 3dfb942f
      Tobin C. Harding authored
      ks_sdio_card structure description does not have a kernel doc format
      comment.
      
      Add kernel doc format comment to struct ks_sdio_card.
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3dfb942f
    • Tobin C. Harding's avatar
      staging: ks7010: move hw info into dev private data · 18bd6dd1
      Tobin C. Harding authored
      Currently driver uses a hardware information struct description to
      group some SDIO related functionality (work, work queue, sdio private
      data pointer). This structure is then embedded in the device private
      data structure. Having nested structures described in different header
      files means that to view the device private data programmers must open
      two header files. This structure could be embedded anonymously in the
      device private data and achieve the same result (grouping of function
      specific to SDIO) without the need to open multiple headers. However,
      the SDIO private data structure already has various different data and
      pointers, adding the embedded structure adds little extra meaning and
      lengthens all the dereferences throughout the driver, often meaning
      addition line breaks and braces. We can increase readability and
      reduce code complexity by moving the hardware information data and
      pointers to directly be within the device private data structure
      description.
      
      While preparing for this refactoring it was noted that the identifier
      currently used for the delayed work is 'rw_wq', this is confusing
      since the 'wq' suffix typically means 'work queue'. This identifier
      would be more meaningful if it used the suffix 'dwork' as does the
      declaration of queue_delayed_work() (include/linux/workqueue.h).
      
      The identifier for the work queue is currently 'ks7010sdio_wq'. This
      identifier can be shortened without loss of meaning because there is
      only one work queue within the driver. Identifier 'wq' is typical
      within in-tree driver code and aptly describes the pointer.
      
      Current pointer to the SDIO private data is identified by 'sdio_card',
      this is sufficiently meaningful from within the hw_info structure but
      once the hw_info_t structure is removed the pointer would be better to
      have a prefix appended to it to retain the prior level of meaning.
      
      Move members from struct hw_info_t to struct ks_wlan_private.
      
      Rename identifiers;
      struct delayed_work pointer 'rw_wq' to 'rw_dwork'.
      struct workqueue_struct pointer 'ks7010sdio_wq' to 'wq'.
      struct ks_sdio_card  pointer 'sdio_card' to 'ks_sdio_card'.
      
      Remove structure description hw_info_t. Fix init/destroy calls. Fix
      all call sites, SDIO private data access calls, and queuing calls.
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      18bd6dd1
    • Tobin C. Harding's avatar
      staging: ks7010: move tasklet_struct to ks_wlan_private · 321dabdc
      Tobin C. Harding authored
      Currently a pointer to the tasklet_struct used for bottom half
      processing on the receive path is within the hw_info_t structure. This
      structure is then embedded in the device private data
      structure. Having the tasklet_struct nested does not add meaning to
      the device private data, device private data already (and typically)
      has various data relating to the device, there is no real need to
      separate the tasklet_struct to a SDIO specific structure. While not
      adding allot of extra meaning having the nested structure means the
      programmer must open two header files to read the description of the
      device private data, the code would be easier to read if the device
      private data struct description was not spread over two files.
      
      Move tasklet_struct out of sdio header file and into the device
      private data structure description.
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      321dabdc
    • Tobin C. Harding's avatar
      staging: ks7010: rename wakeup work struct · 07e483c1
      Tobin C. Harding authored
      struct work_struct uses identifier ks_wlan_wakeup_task, this is
      confusing because the 'task' suffix implies that this is a
      tasklet_struct instead of a work struct. Suffix 'work' would be more
      clear. The code would be easier to read if it followed the principle
      of least surprise and used the 'work' suffix for a work_struct
      identifier.
      
      Rename work_struct structure 'ks_wlan_wakeup_task' to 'wakeup_work'.
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      07e483c1
    • Tobin C. Harding's avatar
      staging: ks7010: clean up SDIO header comments · b9ca8bb4
      Tobin C. Harding authored
      SDIO header file does not use kernel doc format struct
      comments. Adding them aids readability and enables documentation to be
      built from the source code. Other comments may be tidied up as we do this.
      
      Add kernel format struct comments. Tidy up comments.
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b9ca8bb4
    • Tobin C. Harding's avatar
      staging: ks7010: fix complete_handler · 055da4f9
      Tobin C. Harding authored
      complete_handler() takes void * types as parameters. void * parameters are then
      cast to struct types. Call sites for this function either pass in NULL
      or pointers to the struct types cast to void *. This casting is
      unnecessary and can be removed.
      
      Struct tx_device_buffer (which contains a pointer member to the
      complete_handler() function) has as member 'ks_wlan_priv *priv' this is
      unnecessary, we always have a pointer to this struct there is no need
      to store it here.
      
      The complete_handler can be more clearly defined by using struct
      pointer types instead of void * types. The code is currently
      unnecessarily complex, storing and passing extraneous pointer
      parameters.
      
      Remove unnecessary parameters, unnecessary casting to/from 'void
      *'. Fix all call sites involving complete_handler().
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      055da4f9
    • Tobin C. Harding's avatar
      staging: ks7010: replace defines with enum types · 68711ceb
      Tobin C. Harding authored
      Header has multiple constants defined using preprocessor
      directive. In the cases where these are an integer progression an
      enumeration type can be used. Doing so adds documentation to the code
      and makes the usage explicit. Maintain original constant value, this
      value is returned by the device.
      
      Replace (integer progression) preprocessor constants with enumeration
      type.
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      68711ceb
    • Tobin C. Harding's avatar
      staging: ks7010: create reg_status_type enum type · bfee6a23
      Tobin C. Harding authored
      SDIO header currently defines unused constants READ_STATUS_BUSY and
      WRITE_STATUS_IDLE. There are reciprocal constants that are used
      READ_STATUS_IDLE and WRITE_STATUS_BUSY. We can roll these into a
      single enumeration type and remove the two that are unused.
      
      Add enumeration type containing IDLE/BUSY pair that are currently used
      within the SDIO source. Change source to use new enum types.
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bfee6a23
    • Darryl T. Agostinelli's avatar
      staging: greybus: uart.c: Remove include linux/serial.h · 4330887f
      Darryl T. Agostinelli authored
      $ make includecheck | grep staging
      ./drivers/staging/greybus/uart.c: linux/serial.h is included more than once.
      Signed-off-by: default avatarDarryl T. Agostinelli <dagostinelli@gmail.com>
      Reviewed-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4330887f
    • Darryl T. Agostinelli's avatar
      staging: greybus: light.c: Remove include linux/version.h · 6163904e
      Darryl T. Agostinelli authored
      Fixes:
      $ make versioncheck | grep staging
      ./drivers/staging/greybus/light.c: 15 linux/version.h not needed.
      Signed-off-by: default avatarDarryl T. Agostinelli <dagostinelli@gmail.com>
      Reviewed-by: default avatarRui Miguel Silva <rmfrfs@gmail.com>
      Reviewed-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6163904e
    • Skanda Guruanand's avatar
      staging: lustre: Fix sparse endianness warnings cast to restricted __le64 and __le32 · 54094ee8
      Skanda Guruanand authored
      The struct lu_dirpage elements in lustre_idl.h file are modified to
      __le64 and __le32 types since the  elements are always converted from
      litte endian to processor native format in mdc_request.c file.
      
      Following warnings are removed by this fix.
      
      drivers/staging/lustre/lustre/mdc/mdc_request.c:958:42: warning: cast to restricted __le64
      drivers/staging/lustre/lustre/mdc/mdc_request.c:959:42: warning: cast to restricted __le64
      drivers/staging/lustre/lustre/mdc/mdc_request.c:962:42: warning: cast to restricted __le64
      drivers/staging/lustre/lustre/mdc/mdc_request.c:963:42: warning: cast to restricted __le64
      drivers/staging/lustre/lustre/mdc/mdc_request.c:985:50: warning: cast to restricted __le32
      drivers/staging/lustre/lustre/mdc/mdc_request.c:1193:24: warning: cast to restricted __le64
      drivers/staging/lustre/lustre/mdc/mdc_request.c:1328:25: warning: cast to restricted __le64
      drivers/staging/lustre/lustre/mdc/mdc_request.c:1329:23: warning: cast to restricted __le64
      drivers/staging/lustre/lustre/mdc/mdc_request.c:1332:25: warning: cast to restricted __le64
      drivers/staging/lustre/lustre/mdc/mdc_request.c:1333:23: warning: cast to restricted __le64
      Signed-off-by: default avatarSkanda Guruanand <skanda.kashyap@gmail.com>
      Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      54094ee8
    • Craig Inches's avatar
      Staging: lustre cleanup macros in libcfs_private.h · 983ca9b3
      Craig Inches authored
      This resolves a checkpatch warning that "Single statement macros should
      not use a do {} while (0) loop" by removing the loop and adjusting line
      length accordingly.
      Signed-off-by: default avatarCraig Inches <Craig@craiginches.com>
      Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      983ca9b3
    • Alexandre Bailon's avatar
      staging: greybus: make cport_quiesce() method optional · 2e2fd6be
      Alexandre Bailon authored
      The cport_quiesce() method is mandatory in the case of
      the es2 Greybus hd controller to shutdown the cports on
      the es2 controller.
      In order to add support of another controller which may not
      need to shutdown its cports, make the cport_quiesce() optional,
      and check if the controller implement it before to use it.
      Signed-off-by: default avatarAlexandre Bailon <abailon@baylibre.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2e2fd6be
    • Paul Gortmaker's avatar
      staging/media: make atomisp vlv2_plat_clock explicitly non-modular · 4064771d
      Paul Gortmaker authored
      The Makefile / Kconfig currently controlling compilation of this code is:
      
      clock/Makefile:obj-$(CONFIG_INTEL_ATOMISP)     += vlv2_plat_clock.o
      
      atomisp/Kconfig:menuconfig INTEL_ATOMISP
      atomisp/Kconfig:        bool "Enable support to Intel MIPI camera drivers"
      
      ...meaning that it currently is not being built as a module by anyone.
      
      Lets remove the modular code that is essentially orphaned, so that
      when reading the driver there is no doubt it is builtin-only.
      
      Since module_init was already not in use by this driver, the init
      ordering remains unchanged with this commit.
      
      Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
      
      We also delete the MODULE_LICENSE tag etc. since all that information
      is already contained at the top of the file in the comments.
      
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: linux-media@vger.kernel.org
      Cc: devel@driverdev.osuosl.org
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4064771d
    • Greg Kroah-Hartman's avatar
      staging: atomisp: remove odd 'list' file · cf3112e9
      Greg Kroah-Hartman authored
      This removes a strange 'list' file in
      drivers/staging/media/atomisp/pci/atomisp2/ that was not being used for
      anything.
      
      Cc: Alan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cf3112e9
    • Greg Kroah-Hartman's avatar
      staging: atomisp: fix build breakage from files going away · e6642ef0
      Greg Kroah-Hartman authored
      Previous patches deleted files, but the Makefile still referenced their
      .o files.  Fix this up by removing them in the Makefile.
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Alan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e6642ef0
  2. 14 Apr, 2017 22 commits
  3. 11 Apr, 2017 2 commits
    • Tobin C. Harding's avatar
      staging: ks7010: move check and break to top of loop · d317d054
      Tobin C. Harding authored
      Function uses an if statement within a for loop to guard a block of
      code. If 'if' statement conditional evaluates to false, loop breaks. The
      same logic can be expressed by inverting the conditional and breaking
      when new conditional evaluates to true. This allows the subsequent code
      to be indented one level less, aiding readability. Reduced indentation
      also allows for the code to be laid out more clearly and fixes two
      checkpatch warnings.
      
      Invert if statement conditional, break from for loop if new
      conditional evaluates to true. Reduce indentation in subsequent code,
      fix whitespace issues. Do not change program logic.
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d317d054
    • Tobin C. Harding's avatar
      staging: ks7010: remove multi-way decision · eb8c4e54
      Tobin C. Harding authored
      Function uses multi-way decision for control flow. Final statement of
      function is spin_unlock(). Code can be simplified by adding a goto label
      labelling the call to spin_unlock() and jumping to label instead of
      using multi-way decision. This allows the code to be indented one
      level less which adds to the readability.
      
      Add goto label. Remove multi-way decision by jumping to label. Reduce
      indentation in subsequent code. Do not change program logic.
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      eb8c4e54