10377 ahci: NULL pointer errors

Review Request #1452 - Created Feb. 11, 2019 and submitted

Information
Toomas Soome
illumos-gate
10377
067a50c...
Reviewers
general
In file included from ../../common/sys/param.h:48:0,
                 from ../../common/sys/scsi/scsi_types.h:39,
                 from ../../common/sys/scsi/scsi.h:36,
                 from ../../common/io/sata/adapters/ahci/ahci.c:85:
../../common/io/sata/adapters/ahci/ahci.c: In function 'ahci_tran_abort':
../../common/sys/null.h:32:14: error: passing argument 4 of 'ahci_restart_port_wait_till_ready' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../../common/io/sata/adapters/ahci/ahci.c:2667:24: note: in expansion of macro 'NULL'
      ahci_portp, port, NULL, NULL);
                        ^~~~
../../common/io/sata/adapters/ahci/ahci.c:225:12: note: expected 'int' but argument is of type 'void *'
 static int ahci_restart_port_wait_till_ready(ahci_ctl_t *, ahci_port_t *,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../common/io/sata/adapters/ahci/ahci.c: In function 'ahci_alloc_rcvd_fis':
../../common/io/sata/adapters/ahci/ahci.c:6269:49: error: comparison between pointer and integer [-Werror]
      &ahci_portp->ahciport_rcvd_fis_acc_handle) != NULL) {
                                                 ^~
../../common/io/sata/adapters/ahci/ahci.c: In function 'ahci_alloc_cmd_list':
../../common/io/sata/adapters/ahci/ahci.c:6361:49: error: comparison between pointer and integer [-Werror]
      &ahci_portp->ahciport_cmd_list_acc_handle) != NULL) {
                                                 ^~
../../common/io/sata/adapters/ahci/ahci.c: In function 'ahci_alloc_cmd_tables':
../../common/io/sata/adapters/ahci/ahci.c:6478:58: error: comparison between pointer and integer [-Werror]
       &ahci_portp->ahciport_cmd_tables_acc_handle[slot]) !=
                                                          ^~
cc1: all warnings being treated as errors

  
Andrew Stormont
Marcel Telka
Andy Fiddaman
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...