Print this page
2976 remove useless offsetof() macros

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/ib/clients/of/sol_ofs/sol_cma.h
          +++ new/usr/src/uts/common/sys/ib/clients/of/sol_ofs/sol_cma.h
↓ open down ↓ 22 lines elided ↑ open up ↑
  23   23   * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   */
  25   25  
  26   26  #ifndef _SYS_IB_CLIENTS_OF_SOL_OFS_SOL_CMA_H
  27   27  #define _SYS_IB_CLIENTS_OF_SOL_OFS_SOL_CMA_H
  28   28  
  29   29  #ifdef __cplusplus
  30   30  extern "C" {
  31   31  #endif
  32   32  
       33 +#include <sys/sysmacros.h>
  33   34  
  34   35  #include <sys/ib/clients/of/sol_ofs/sol_ofs_common.h>
  35   36  #include <sys/ib/clients/of/rdma/rdma_cm.h>
  36   37  #include <sys/ib/clients/of/sol_ofs/sol_ib_cma.h> /* Transport Specific */
  37   38  
  38      -#if !defined(offsetof)
  39      -#define offsetof(s, m)          (size_t)(&(((s *)0)->m))
  40      -#endif
  41   39  
  42   40  #define IS_UDP_CMID(idp)        ((idp)->ps == RDMA_PS_UDP || \
  43   41          (idp)->ps == RDMA_PS_IPOIB)
  44   42  #define IS_VALID_SOCKADDR(sockaddrp) \
  45   43          ((sockaddrp)->sa_family == AF_INET || \
  46   44          (sockaddrp)->sa_family == AF_INET6)
  47   45  
  48   46  /*
  49   47   * Global structure which contains information about all
  50   48   * CMIDs, which have called rdma_listen().
↓ open down ↓ 327 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX