Print this page
10703 smatch unreachable code checking needs reworking
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/1394/s1394_dev_disc.c
          +++ new/usr/src/uts/common/io/1394/s1394_dev_disc.c
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
  23   23   * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27      -#pragma ident   "%Z%%M% %I%     %E% SMI"
       27 +/*
       28 + * Copyright 2019 Joyent, Inc.
       29 + */
  28   30  
  29   31  /*
  30   32   * s1394_dev_disc.c
  31   33   *    1394 Services Layer Device Discovery Routines
  32   34   *    This file contains the bus reset thread code, bus manager routines and
  33   35   *    various routines that are used to implement remote Config ROM reading.
  34   36   *
  35   37   *    FUTURE:
  36   38   *    Rescan the bus if invalid nodes are seen.
  37   39   *    Investigate taskq for reading phase2 config rom reads.
↓ open down ↓ 44 lines elided ↑ open up ↑
  82   84  
  83   85  #define BUMP_CFGROM_READ_DELAY(n)                                       \
  84   86          (n)->cfgrom_read_delay += s1394_cfgrom_read_delay_incr
  85   87  
  86   88  #define CFGROM_GET_READ_DELAY(n, d)                                     \
  87   89          ((d) = (n)->cfgrom_read_delay)
  88   90  
  89   91  #define SETUP_QUAD_READ(n, reset_fails, quadlet, cnt)                   \
  90   92  {                                                                       \
  91   93          int i = (reset_fails);                                          \
  92      -        if (i != 0) {                                                   \
       94 +        if (i != 0) {                                                   \
  93   95                  (n)->cfgrom_read_fails = 0;                             \
  94   96                  (n)->cfgrom_read_delay = (uchar_t)s1394_cfgrom_read_delay_ms; \
  95   97          }                                                               \
  96   98          (n)->cfgrom_quad_to_read = (quadlet);                           \
  97   99          (n)->cfgrom_quad_read_cnt = (cnt);                              \
  98  100  }
  99  101  
 100  102  static void s1394_wait_for_events(s1394_hal_t *hal, int firsttime);
 101  103  
 102  104  static int s1394_wait_for_cfgrom_callbacks(s1394_hal_t *hal, uint_t wait_gen,
↓ open down ↓ 379 lines elided ↑ open up ↑
 482  484          ASSERT(MUTEX_HELD(&hal->br_thread_mutex));
 483  485          ASSERT(MUTEX_NOT_HELD(&hal->topology_tree_mutex));
 484  486          TNF_PROBE_0(s1394_br_thread_exit_enter, S1394_TNF_SL_HOTPLUG_STACK, "");
 485  487          s1394_flush_cmplq(hal);
 486  488  #ifndef __lock_lint
 487  489          CALLB_CPR_EXIT(&hal->hal_cprinfo);
 488  490  #endif
 489  491          hal->br_thread_ev_type &= ~BR_THR_GO_AWAY;
 490  492          thread_exit();
 491  493          /*NOTREACHED*/
 492      -        TNF_PROBE_0(s1394_br_thread_exit_enter, S1394_TNF_SL_HOTPLUG_STACK, "");
 493  494  }
 494  495  
 495  496  /*
 496  497   * s1394_target_bus_reset_notifies()
 497  498   *    tells the ndi event framework to invoke any callbacks registered for
 498  499   *    "bus reset event".
 499  500   */
 500  501  static void
 501  502  s1394_target_bus_reset_notifies(s1394_hal_t *hal, t1394_localinfo_t *localinfo)
 502  503  {
↓ open down ↓ 2919 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX