Print this page
2976 remove useless offsetof() macros


  35 #include <sys/rmc_comm_dp.h>
  36 #include <sys/rmc_comm_dp_boot.h>
  37 #include <sys/rmc_comm_drvintf.h>
  38 #include <sys/rmc_comm.h>
  39 #include <sys/machsystm.h>
  40 #include <sys/sysevent.h>
  41 #include <sys/sysevent/dr.h>
  42 #include <sys/sysevent/env.h>
  43 #include <sys/sysevent/eventdefs.h>
  44 #include <sys/file.h>
  45 #include <sys/disp.h>
  46 #include <sys/reboot.h>
  47 #include <sys/envmon.h>
  48 #include <sys/rmclomv_impl.h>
  49 #include <sys/cpu_sgnblk_defs.h>
  50 #include <sys/utsname.h>
  51 #include <sys/systeminfo.h>
  52 #include <sys/ddi.h>
  53 #include <sys/time.h>
  54 #include <sys/promif.h>

  55 
  56 #define offsetof(s, m)  (size_t)(&(((s *)0)->m))
  57 #define RMCRESBUFLEN    1024
  58 #define DATE_TIME_MSG_SIZE      78
  59 #define RMCLOMV_WATCHDOG_MODE   "rmclomv-watchdog-mode"
  60 #define DELAY_TIME      5000000  /* 5 seconds, in microseconds */
  61 #define CPU_SIGNATURE_DELAY_TIME        5000000  /* 5 secs, in microsecs */
  62 
  63 extern void     pmugpio_watchdog_pat();
  64 
  65 extern int      watchdog_activated;
  66 static int      last_watchdog_msg = 1;
  67 extern int      watchdog_enable;
  68 extern int      boothowto;
  69 
  70 int             rmclomv_watchdog_mode;
  71 
  72 /*
  73  * functions local to this driver.
  74  */
  75 static int      rmclomv_getinfo(dev_info_t *dip, ddi_info_cmd_t cmd, void *arg,
  76     void **resultp);




  35 #include <sys/rmc_comm_dp.h>
  36 #include <sys/rmc_comm_dp_boot.h>
  37 #include <sys/rmc_comm_drvintf.h>
  38 #include <sys/rmc_comm.h>
  39 #include <sys/machsystm.h>
  40 #include <sys/sysevent.h>
  41 #include <sys/sysevent/dr.h>
  42 #include <sys/sysevent/env.h>
  43 #include <sys/sysevent/eventdefs.h>
  44 #include <sys/file.h>
  45 #include <sys/disp.h>
  46 #include <sys/reboot.h>
  47 #include <sys/envmon.h>
  48 #include <sys/rmclomv_impl.h>
  49 #include <sys/cpu_sgnblk_defs.h>
  50 #include <sys/utsname.h>
  51 #include <sys/systeminfo.h>
  52 #include <sys/ddi.h>
  53 #include <sys/time.h>
  54 #include <sys/promif.h>
  55 #include <sys/sysmacros.h>
  56 

  57 #define RMCRESBUFLEN    1024
  58 #define DATE_TIME_MSG_SIZE      78
  59 #define RMCLOMV_WATCHDOG_MODE   "rmclomv-watchdog-mode"
  60 #define DELAY_TIME      5000000  /* 5 seconds, in microseconds */
  61 #define CPU_SIGNATURE_DELAY_TIME        5000000  /* 5 secs, in microsecs */
  62 
  63 extern void     pmugpio_watchdog_pat();
  64 
  65 extern int      watchdog_activated;
  66 static int      last_watchdog_msg = 1;
  67 extern int      watchdog_enable;
  68 extern int      boothowto;
  69 
  70 int             rmclomv_watchdog_mode;
  71 
  72 /*
  73  * functions local to this driver.
  74  */
  75 static int      rmclomv_getinfo(dev_info_t *dip, ddi_info_cmd_t cmd, void *arg,
  76     void **resultp);