Project

General

Profile

Bug #10727

tavor: NULL pointer errors

Added by Toomas Soome 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
2019-04-11
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

NULL pointer errors:

    ../../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

History

#1

Updated by Electric Monk 7 months ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

git commit 6e20df6b5d4d0fa57c9187ddce3e1eb870a854e6

commit  6e20df6b5d4d0fa57c9187ddce3e1eb870a854e6
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-19T21:48:31.000Z

    10727 tavor: NULL pointer errors
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF