Print this page
10686 Debug macros causes smatch issues

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/pcie_impl.h
          +++ new/usr/src/uts/common/sys/pcie_impl.h
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   */
  24   24  
       25 +/*
       26 + * Copyright 2019, Joyent, Inc.
       27 + */
       28 +
  25   29  #ifndef _SYS_PCIE_IMPL_H
  26   30  #define _SYS_PCIE_IMPL_H
  27   31  
  28   32  #ifdef  __cplusplus
  29   33  extern "C" {
  30   34  #endif
  31   35  
  32   36  #include <sys/pcie.h>
  33   37  #include <sys/pciev.h>
  34   38  
↓ open down ↓ 449 lines elided ↑ open up ↑
 484  488          PCIE_DBG("%s:%d:(0x%x) %s(0x%x) 0x%x -> 0x%x\n", ddi_node_name(dip), \
 485  489              ddi_get_instance(dip), bus_p->bus_bdf, name, off, org, \
 486  490              PCIE_CAP_GET(sz, bus_p, off))
 487  491  #define PCIE_DBG_AER(dip, bus_p, name, sz, off, org) \
 488  492          PCIE_DBG("%s:%d:(0x%x) %s(0x%x) 0x%x -> 0x%x\n", ddi_node_name(dip), \
 489  493              ddi_get_instance(dip), bus_p->bus_bdf, name, off, org, \
 490  494              PCIE_AER_GET(sz, bus_p, off))
 491  495  
 492  496  #else   /* DEBUG */
 493  497  
 494      -#define PCIE_DBG_CFG 0 &&
 495      -#define PCIE_DBG 0 &&
 496      -#define PCIE_ARI_DBG 0 &&
 497      -#define PCIE_DBG_CAP 0 &&
 498      -#define PCIE_DBG_AER 0 &&
      498 +#define PCIE_DBG_CFG(...)
      499 +#define PCIE_DBG(...)
      500 +#define PCIE_ARI_DBG(...)
      501 +#define PCIE_DBG_CAP(...)
      502 +#define PCIE_DBG_AER(...)
 499  503  
 500  504  #endif  /* DEBUG */
 501  505  
 502  506  /* PCIe Friendly Functions */
 503  507  extern int pcie_init(dev_info_t *dip, caddr_t arg);
 504  508  extern int pcie_uninit(dev_info_t *dip);
 505  509  extern int pcie_hpintr_enable(dev_info_t *dip);
 506  510  extern int pcie_hpintr_disable(dev_info_t *dip);
 507  511  extern int pcie_intr(dev_info_t *dip);
 508  512  extern int pcie_open(dev_info_t *dip, dev_t *devp, int flags, int otyp,
↓ open down ↓ 114 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX