Print this page
cstyle sort of updates
7127  remove -Wno-missing-braces from Makefile.uts

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/avs/ns/sdbc/sd_bcache.c
          +++ new/usr/src/uts/common/avs/ns/sdbc/sd_bcache.c
↓ open down ↓ 425 lines elided ↑ open up ↑
 426  426  
 427  427  
 428  428  
 429  429  /* _SD_DEBUG */
 430  430  #if defined(_SD_DEBUG) || defined(DEBUG)
 431  431  static int _sd_cctl_valid(_sd_cctl_t *);
 432  432  #endif
 433  433  
 434  434  static
 435  435  nsc_def_t _sdbc_fd_def[] = {
 436      -        "Attach",       (uintptr_t)sdbc_fd_attach_cd,   0,
 437      -        "Detach",       (uintptr_t)sdbc_fd_detach_cd,   0,
 438      -        "Flush",        (uintptr_t)sdbc_fd_flush_cd,    0,
 439      -        0,              0,                              0
      436 +        { "Attach",     (uintptr_t)sdbc_fd_attach_cd,   0 },
      437 +        { "Detach",     (uintptr_t)sdbc_fd_detach_cd,   0 },
      438 +        { "Flush",      (uintptr_t)sdbc_fd_flush_cd,    0 },
      439 +        { NULL,         (uintptr_t)NULL,                0 }
 440  440  };
 441  441  
 442  442  
 443  443  /*
 444  444   * _sdbc_cache_configure - initialize cache blocks, queues etc.
 445  445   *
 446  446   * ARGUMENTS:
 447  447   *      cblocks  - Number of cache blocks
 448  448   *
 449  449   * RETURNS:
↓ open down ↓ 1643 lines elided ↑ open up ↑
2093 2093          sdbc_cblk_fba_t st_cblk_len;    /* FBA len of starting cache block */
2094 2094          sdbc_cblk_fba_t end_cblk_len;   /* FBA len of ending cache block */
2095 2095          sdbc_cblk_fba_t st_cblk_off;    /* FBA offset into starting cblock */
2096 2096          nsc_off_t io_pos;       /* offset in FBA's */
2097 2097          nsc_size_t fba_orig_len;
2098 2098          int sts, stall;
2099 2099          _sd_cctl_t *centry = NULL;
2100 2100          _sd_cctl_t *lentry = NULL;
2101 2101          _sd_cctl_t *ioent = NULL;
2102 2102          _sd_cctl_t *last_ioent = NULL;
2103      -        sdbc_allocbuf_t alloc_tok = {0};
     2103 +        sdbc_allocbuf_t alloc_tok = {{(intptr_t)NULL}};
2104 2104          int this_entry_type = 0;
2105 2105          nsc_size_t request_blocks = 0; /* number of cache blocks required */
2106 2106          int pageio;
2107 2107  
2108 2108          handle->bh_flag |= NSC_HACTIVE;
2109 2109          ASSERT(cd >= 0);
2110 2110          cdi = &_sd_cache_files[cd];
2111 2111  
2112 2112          /* prefetch: truncate if req'd */
2113 2113          if (fba_len > sdbc_max_fbas)
↓ open down ↓ 419 lines elided ↑ open up ↑
2533 2533          sdbc_cblk_fba_t st_cblk_off;    /* FBA offset into starting cblock */
2534 2534          nsc_off_t io_pos;       /* offset in FBA's */
2535 2535          _sd_bufvec_t *bufvec;
2536 2536          _sd_cctl_t *centry, *lentry, *ioent = NULL;
2537 2537          nsc_size_t fba_orig_len = fba_len;      /* FBA length of orig request */
2538 2538          int stall, pageio;
2539 2539          unsigned char cc_flag;
2540 2540          int this_entry_type;
2541 2541          int locked = 0;
2542 2542          nsc_size_t dmchain_request_blocks; /* size of dmchain in cache blocks */
2543      -        sdbc_allocbuf_t alloc_tok = {0};
     2543 +        sdbc_allocbuf_t alloc_tok = {{(intptr_t)NULL}};
2544 2544          int min_frag = 0;       /* frag statistics */
2545 2545          int max_frag = 0;       /* frag statistics */
2546 2546          int nfrags = 0;         /* frag statistics */
2547 2547  #ifdef DEBUG
2548 2548          int err = 0;
2549 2549  #endif
2550 2550  
2551 2551  
2552 2552          ASSERT(*handle_p != NULL);
2553 2553          handle = *handle_p;
↓ open down ↓ 1583 lines elided ↑ open up ↑
4137 4137   *      flag    - can be ALLOC_NOWAIT
4138 4138   * RETURNS:
4139 4139   *      A cache block chain or NULL if ALLOC_NOWAIT and request fails
4140 4140   *
4141 4141   *      Note: caller must check for null return if called with
4142 4142   *      ALLOC_NOWAIT set.
4143 4143   */
4144 4144  _sd_cctl_t *
4145 4145  sdbc_centry_alloc_blks(int cd, nsc_off_t cblk, nsc_size_t reqblks, int flag)
4146 4146  {
4147      -        sdbc_allocbuf_t alloc_tok = {0}; /* must be 0 */
     4147 +        sdbc_allocbuf_t alloc_tok = {{(intptr_t)NULL}}; /* must be NULL */
4148 4148          int stall = 0;
4149 4149          _sd_cctl_t *centry = NULL;
4150 4150          _sd_cctl_t *lentry = NULL;
4151 4151          _sd_cctl_t *anchor = NULL;
4152 4152          _sd_cctl_t *next_centry;
4153 4153  
4154 4154          ASSERT(reqblks);
4155 4155  
4156 4156          while (reqblks) {
4157 4157                  centry = sdbc_centry_alloc(cd, cblk, reqblks, &stall,
↓ open down ↓ 2920 lines elided ↑ open up ↑
7078 7078          }
7079 7079          for (i = 0; i < _SD_MAX_MAP; i++) {
7080 7080                  _sd_lookup_map[i].mi_io_count = SDBC_LOOKUP_DTCOUNT(i);
7081 7081                  mask = ~i;
7082 7082                  _sd_lookup_map[i].mi_io_count += SDBC_LOOKUP_DTCOUNT(mask);
7083 7083          }
7084 7084  }
7085 7085  
7086 7086  
7087 7087  nsc_def_t _sd_sdbc_def[] = {
7088      -        "Open",         (uintptr_t)_sd_open_io,                 0,
7089      -        "Close",        (uintptr_t)_sd_close_io,                0,
7090      -        "Attach",       (uintptr_t)_sdbc_io_attach_cd,          0,
7091      -        "Detach",       (uintptr_t)_sdbc_io_detach_cd,          0,
7092      -        "AllocBuf",     (uintptr_t)_sd_alloc_buf,               0,
7093      -        "FreeBuf",      (uintptr_t)_sd_free_buf,                0,
7094      -        "Read",         (uintptr_t)_sd_read,                    0,
7095      -        "Write",        (uintptr_t)_sd_write,                   0,
7096      -        "Zero",         (uintptr_t)_sd_zero,                    0,
7097      -        "Copy",         (uintptr_t)_sd_copy,                    0,
7098      -        "CopyDirect",   (uintptr_t)_sd_copy_direct,             0,
7099      -        "Uncommit",     (uintptr_t)_sd_uncommit,                0,
7100      -        "AllocHandle",  (uintptr_t)_sd_alloc_handle,            0,
7101      -        "FreeHandle",   (uintptr_t)_sd_free_handle,             0,
7102      -        "Discard",      (uintptr_t)_sd_discard_pinned,          0,
7103      -        "Sizes",        (uintptr_t)_sd_cache_sizes,             0,
7104      -        "GetPinned",    (uintptr_t)_sd_get_pinned,              0,
7105      -        "NodeHints",    (uintptr_t)_sd_node_hint_caller,        0,
7106      -        "PartSize",     (uintptr_t)_sd_get_partsize,            0,
7107      -        "MaxFbas",      (uintptr_t)_sd_get_maxfbas,             0,
7108      -        "Control",      (uintptr_t)_sd_control,                 0,
7109      -        "Provide",      NSC_CACHE,                              0,
7110      -        0,              0,                                      0
     7088 +        { "Open",       (uintptr_t)_sd_open_io,                 0 },
     7089 +        { "Close",      (uintptr_t)_sd_close_io,                0 },
     7090 +        { "Attach",     (uintptr_t)_sdbc_io_attach_cd,          0 },
     7091 +        { "Detach",     (uintptr_t)_sdbc_io_detach_cd,          0 },
     7092 +        { "AllocBuf",   (uintptr_t)_sd_alloc_buf,               0 },
     7093 +        { "FreeBuf",    (uintptr_t)_sd_free_buf,                0 },
     7094 +        { "Read",       (uintptr_t)_sd_read,                    0 },
     7095 +        { "Write",      (uintptr_t)_sd_write,                   0 },
     7096 +        { "Zero",       (uintptr_t)_sd_zero,                    0 },
     7097 +        { "Copy",       (uintptr_t)_sd_copy,                    0 },
     7098 +        { "CopyDirect", (uintptr_t)_sd_copy_direct,             0 },
     7099 +        { "Uncommit",   (uintptr_t)_sd_uncommit,                0 },
     7100 +        { "AllocHandle", (uintptr_t)_sd_alloc_handle,           0 },
     7101 +        { "FreeHandle", (uintptr_t)_sd_free_handle,             0 },
     7102 +        { "Discard",    (uintptr_t)_sd_discard_pinned,          0 },
     7103 +        { "Sizes",      (uintptr_t)_sd_cache_sizes,             0 },
     7104 +        { "GetPinned",  (uintptr_t)_sd_get_pinned,              0 },
     7105 +        { "NodeHints",  (uintptr_t)_sd_node_hint_caller,        0 },
     7106 +        { "PartSize",   (uintptr_t)_sd_get_partsize,            0 },
     7107 +        { "MaxFbas",    (uintptr_t)_sd_get_maxfbas,             0 },
     7108 +        { "Control",    (uintptr_t)_sd_control,                 0 },
     7109 +        { "Provide",    NSC_CACHE,                              0 },
     7110 +        { NULL,         (uintptr_t)NULL,                        0 }
7111 7111  };
7112 7112  
7113 7113  /*
7114 7114   * do the SD_GET_CD_CLUSTER_DATA ioctl (get the global filename data)
7115 7115   */
7116 7116  /* ARGSUSED */
7117 7117  int
7118 7118  sd_get_file_info_data(char *uaddrp)
7119 7119  {
7120 7120          return (ENOTTY);
↓ open down ↓ 367 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX