1. Jan 26, 2018
    • Colin Ian King's avatar
      staging: rtlwifi: remove redundant initialization of 'cfg_cmd' · 3384e011
      Colin Ian King authored
      
      
      The initialization of cfg_cmd is redundant as the value is never read
      and it is being re-assigned to cfg_cmd = pwrcfgcmd[ary_idx] inside a
      loop, hence it can be removed.
      
      Cleans up clang warning:
      drivers/staging/rtlwifi/core.c:1819:22: warning: Value stored to
      'cfg_cmd' during its initialization is never read
      
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3384e011
    • Colin Ian King's avatar
      staging: rtl8723bs: remove a couple of redundant initializations · c5f69117
      Colin Ian King authored
      
      
      The initialization of PwrCfgCmd is redundant as the value is never read
      and it is being re-assigned to PwrSeqCmd[AryIdx] inside a loop, hence
      it can be removed.  Also, the initialization of ie_ptr is redundant as
      the value is never read and it is being re-assigned in either path of
      an if statement, hence it can be removed too.
      
      Cleans up clang warnings:
      drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c:53:15: warning: Value
      stored to 'PwrCfgCmd' during its initialization is never read
      drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:374:7: warning: Value
      stored to 'ie_ptr' during its initialization is never read
      
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c5f69117
    • Eujon Sellers's avatar
      staging: comedi: reformat lines to 80 chars or less · 26311087
      Eujon Sellers authored
      
      
      This is a cleanup patch to fix line length issue found
      by checkpatch.pl script.
      
      In this patch, lines 186, 192 and 199 have been wrapped.
      
      Signed-off-by: default avatarEujon Sellers <eujon.sellers@gmail.com>
      Cc: Ian Abbott <abbotti@mev.co.uk>
      Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      26311087
    • Dmitry Eremin's avatar
      staging: lustre: separate a connection destroy from free struct kib_conn · 9b046013
      Dmitry Eremin authored
      The logic of the original commit 4d99b258 ("staging: lustre: avoid
      intensive reconnecting for ko2iblnd") was assumed conditional free of
      struct kib_conn if the second argument free_conn in function
      kiblnd_destroy_conn(struct kib_conn *conn, bool free_conn) is true.
      But this hunk of code was dropped from original commit. As result the logic
      works wrong and current code use struct kib_conn after free.
      
      > drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
      > 3317  kiblnd_destroy_conn(conn, !peer);
      >                           ^^^^ Freed always (but should be conditionally)
      > 3318
      > 3319  spin_lock_irqsave(lock, flags);
      > 3320  if (!peer)
      > 3321      continue;
      > 3322
      > 3323  conn->ibc_peer = peer;
      >       ^^^^^^^^^^^^^^ Use after free
      > 3324  if (peer->ibp_reconnected < KIB_RECONN_HIGH_RACE)
      > 3325      list_add_tail(&conn->ibc_list,
      >                          ^^^^^^^^^^^^^^ Use after free
      > 3326                    &kiblnd_data.kib_reconn_list);
      > 3327  else
      > 3328      list_add_tail(&conn->ibc_list,
      >                          ^^^^^^^^^^^^^^ Use after free
      > 3329                    &kiblnd_data.kib_reconn_wait);
      
      To avoid confusion this fix moved the freeing a struct kib_conn outside of
      the function kiblnd_destroy_conn() and free as it was intended in original
      commit.
      
      Cc: <stable@vger.kernel.org> # v4.6
      Fixes: 4d99b258
      
       ("staging: lustre: avoid intensive reconnecting for ko2iblnd")
      Signed-off-by: default avatarDmitry Eremin <Dmitry.Eremin@intel.com>
      Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9b046013
  2. Jan 25, 2018
  3. Jan 23, 2018
  4. Jan 22, 2018
  5. Jan 17, 2018