10727 tavor: NULL pointer errors

Review Request #1693 - Created April 11, 2019 and submitted

Information
Toomas Soome
illumos-gate
10727
b0502ed...
Reviewers
general
../../common/io/ib/adapters/tavor/tavor.c: In function 'tavor_intr_disable':
../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_get' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../../common/sys/pci_cap.h:81:35: note: in definition of macro 'PCI_CAP_GET16'
  pci_cap_get(h, PCI_CAP_CFGSZ_16, i, b, o))
                                   ^
../../common/io/ib/adapters/tavor/tavor.c:3443:47: note: in expansion of macro 'NULL'
    if ((msi_ctrl = PCI_CAP_GET16(pci_cfg_hdl, NULL,
                                               ^~~~
../../common/sys/pci_cap.h:110:17: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
 extern uint32_t pci_cap_get(ddi_acc_handle_t h, pci_cap_config_size_t size,
                 ^~~~~~~~~~~
../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../../common/sys/pci_cap.h:90:35: note: in definition of macro 'PCI_CAP_PUT32'
  pci_cap_put(h, PCI_CAP_CFGSZ_32, i, b, o, d))
                                   ^
../../common/io/ib/adapters/tavor/tavor.c:3457:31: note: in expansion of macro 'NULL'
    PCI_CAP_PUT32(pci_cfg_hdl, NULL, caps_ctrl,
                               ^~~~
../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
 extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
            ^~~~~~~~~~~
../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../../common/sys/pci_cap.h:88:35: note: in definition of macro 'PCI_CAP_PUT16'
  pci_cap_put(h, PCI_CAP_CFGSZ_16, i, b, o, d))
                                   ^
../../common/io/ib/adapters/tavor/tavor.c:3463:30: note: in expansion of macro 'NULL'
   PCI_CAP_PUT16(pci_cfg_hdl, NULL, caps_ctrl, PCI_MSI_CTRL,
                              ^~~~
../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
 extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
            ^~~~~~~~~~~

In file included from ../../common/sys/param.h:48:0,
                 from ../../common/sys/t_lock.h:38,
                 from ../../common/sys/conf.h:37,
                 from ../../common/io/ib/adapters/tavor/tavor_stats.c:37:
../../common/io/ib/adapters/tavor/tavor_stats.c: In function 'tavor_kstat_picN_create':
../../common/sys/null.h:32:14: error: passing argument 7 of 'kstat_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../../common/io/ib/adapters/tavor/tavor_stats.c:278:33: note: in expansion of macro 'NULL'
      KSTAT_TYPE_NAMED, num_evt, NULL);
                                 ^~~~
In file included from ../../common/sys/buf.h:46:0,
                 from ../../common/sys/copyops.h:32,
                 from ../../common/sys/watchpoint.h:32,
                 from ../../common/sys/proc.h:37,
                 from ../../common/sys/systm.h:40,
                 from ../../common/sys/conf.h:56,
                 from ../../common/io/ib/adapters/tavor/tavor_stats.c:37:
../../common/sys/kstat.h:793:17: note: expected 'uchar_t {aka unsigned char}' but argument is of type 'void *'
 extern kstat_t *kstat_create(const char *, int, const char *, const char *,
                 ^~~~~~~~~~~~

../../common/io/ib/adapters/tavor/tavor_qp.c: In function 'tavor_special_qp_alloc':
../../common/io/ib/adapters/tavor/tavor_qp.c:891:13: error: comparison between pointer and integer [-Werror]
  if (status != NULL) {
             ^~
cc1: all warnings being treated as errors

  
Andrew Stormont
Robert Mustacchi
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...