Project

General

Profile

Bug #10377

ahci: NULL pointer errors

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors with NULL pointer:

    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

History

#1

Updated by Electric Monk 10 months ago

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

git commit ae673e5c67dbaeec7e77d54c9f6adbbde5778bfb

commit  ae673e5c67dbaeec7e77d54c9f6adbbde5778bfb
Author: Toomas Soome <tsoome@me.com>
Date:   2019-02-16T07:37:15.000Z

    10377 ahci: NULL pointer errors
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Marcel Telka <marcel@telka.sk>
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF