1. 02 Aug, 2018 12 commits
  2. 01 Aug, 2018 21 commits
  3. 30 Jul, 2018 7 commits
    • Colin Ian King's avatar
      iio: light: si1133 fix test for val being not zero or not one. · 1e96e93a
      Colin Ian King authored
      The current check on val always results in true and so the
      call to sii1133_update_adcsens never gets called. Fix this check
      so it returns with -EINVAL only when val is not zero and not one.
      
      Detected by CoverityScan, CID#1472099 ("Logically dead code")
      
      Fixes: e01e7eaf ("iio: light: introduce si1133")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      1e96e93a
    • John Whitmore's avatar
      staging:rtl8192u: Refactor enum DM_CCK_Rx_Path_Method - Style · 1c58e9cc
      John Whitmore authored
      The enumerated type DM_CCK_Rx_Path_Method is used as a container for
      constant definitions, rather then an enumerated type enabling compiler
      type checking. To correct this, the variable which uses the constants,
      defined by the enumeration, has had its type changed from a u8 to the
      enumeration.
      
      Additionally the type has been moved above the structure where the type
      is used, to avoid compiler error. The typedef has been removed from the
      enumerated type to clear the checkpatch issue with defining new types.
      The name of the type has been changed to cck_rx_path_method to clear
      the checkpatch issue with CamelCase naming. And the enumerated constant
      CCK_Rx_Version_MAX has been removed, since it is never used in code.
      
      The changes are all coding style in nature and so should have no
      impact on runtime code execution.
      Signed-off-by: default avatarJohn Whitmore <johnfwhitmore@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1c58e9cc
    • John Whitmore's avatar
      staging:rtl8192u: Refactor enum dm_dig_cs_ratio_e - Style · cff3d470
      John Whitmore authored
      The enumerated type dm_dig_cs_ratio_e is never actually used as a type,
      but only as a collection of related constants. This is because the
      variables, which use the defined constant values, are defined as being
      of type u8 rather then tne enumerated type. This omission negates the
      possibility of taking advantage of compiler type checking.
      
      To enable the use of compiler type checking of the enumeration the two
      variables, (curcs_ratio_state & precs_ratio_state), which use the type's
      constants have their types changed from u8 to enum dig_cck_cs_ratio_state.
      
      Additionally the types declaration has been moved above the dig
      structure, where the type is used. The 'typedef' keyword has been
      removed from the type to clear the checkpatch issue with defining new
      types. And the constant DIG_CS_MAX has been removed since this is never
      used in the code.
      
      These changes are purely coding style changes and should not impact
      on runtime code execution.
      Signed-off-by: default avatarJohn Whitmore <johnfwhitmore@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cff3d470
    • John Whitmore's avatar
      staging:rtl8192u: Refactor enum dm_dig_pd_th_e - Style · a48aa566
      John Whitmore authored
      The enumerated type dm_dig_pd_th_e is never actually used as
      the type for the two variables which use the constants, which the
      enumeration defines. This omission removes the possibility of taking
      advantage of compiler type checking.
      
      To correct this the two member variables, (curpd_thstate & prepd_thstate)
      have been changed to use the type enum dig_pkt_detection_threshold rather
      then u8.
      
      Additionally the enum's declaration has been moved above the dig
      structure, where the type is used, the 'typedef' has been removed to
      clear the checkpatch issue with defining new types, and the value
      'DIG_PD_MAX' has been removed from the enumeration, since it is never
      used in code.
      Signed-off-by: default avatarJohn Whitmore <johnfwhitmore@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a48aa566
    • John Whitmore's avatar
      staging:rtl8192u: Refactor dm_dig_connect_e - Style · c3575c7c
      John Whitmore authored
      The enumerated type dm_dig_connect_e is only used to group constant
      values, as the actual type is never used as the type for the variables
      which use the defined constants (cur_connect_state and pre_connect_state).
      
      These two member variables have had there defined types changed to
      properly reflect there usage and to permit compiler type checks to be
      performed.
      
      In addition the definition of the enumerated type has been moved above
      the structure which uses the type. The typedef of the enumerated type
      has been removed to clear the checkpatch issue with defining new types
      and the enumerated value DIG_CONNECT_MAX has been removed since it is
      never used in code.
      
      The resulting changes are all coding style in nature and should not
      impact runtime code execution.
      Signed-off-by: default avatarJohn Whitmore <johnfwhitmore@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c3575c7c
    • John Whitmore's avatar
      staging:rtl8192u: Remove unused enum dm_dig_dbg_e - Style · 98881511
      John Whitmore authored
      The enumerated type dm_dig_dbg_e is never used in code so has simply
      been removed from the source code.
      
      this is a coding style change which should have no impact on runtime
      code execution.
      Signed-off-by: default avatarJohn Whitmore <johnfwhitmore@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      98881511
    • John Whitmore's avatar
      staging:rtl8192u: Refactor enum dm_dig_alg_e - Style · ebd0dcbd
      John Whitmore authored
      The enumerated type dm_dig_alg_e is only used by one variable in the
      code, 'dig_algorithm', a member variable of the structure dig. That
      member variable was defined to be of type 'u8' thus negating any
      advantage of the use of an enumerated type, (compiler type-checking).
      
      The type of the variable 'dig_algorithm' has been change to reflect
      its use of the enumeration and the enumerated type moved in the file
      so that it appears before it is used in the file.
      
      Additionally the 'typedef' has been removed to clear the checkpatch
      issue with defining new types, and the type renamed to
      enum dig_algorithm.
      
      The enumerated constant DIG_ALGO_MAX has been removed from the type
      since it is never used in the code.
      
      These changes are all coding style in nature and as such should have
      no impact on runtime code execution.
      Signed-off-by: default avatarJohn Whitmore <johnfwhitmore@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ebd0dcbd