Project

General

Profile

Actions

Bug #10715

closed

ohci: NULL pointer errors

Added by Toomas Soome about 4 years ago. Updated about 4 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

NULL pointer errors:

    ../../common/io/usb/hcd/openhci/ohci_polled.c: In function 'ohci_polled_save
_state':
    ../../common/sys/usb/hcd/openhci/ohcid.h:783:7: error: cast from pointer to 
integer of different size [-Werror=pointer-to-int-cast]
          ((int32_t)(val)))
           ^
    ../../common/io/usb/hcd/openhci/ohci_polled.c:1084:3: note: in expansion of 
macro 'Set_HCCA'
       Set_HCCA(ohcip->ohci_hccap->HccaDoneHead, NULL);
       ^~~~~~~~
    ../../common/io/usb/hcd/openhci/ohci_polled.c: In function 'ohci_polled_rest
ore_state':
    ../../common/sys/usb/hcd/openhci/ohcid.h:783:7: error: cast from pointer to 
integer of different size [-Werror=pointer-to-int-cast]
          ((int32_t)(val)))
           ^
    ../../common/io/usb/hcd/openhci/ohci_polled.c:1390:3: note: in expansion of 
macro 'Set_HCCA'
       Set_HCCA(ohcip->ohci_hccap->HccaDoneHead, NULL);
       ^~~~~~~~
    ../../common/io/usb/hcd/openhci/ohci_polled.c: In function 'ohci_polled_chec
k_done_list':
    ../../common/sys/usb/hcd/openhci/ohcid.h:783:7: error: cast from pointer to 
integer of different size [-Werror=pointer-to-int-cast]
          ((int32_t)(val)))
           ^
    ../../common/io/usb/hcd/openhci/ohci_polled.c:1544:3: note: in expansion of 
macro 'Set_HCCA'
       Set_HCCA(ohcip->ohci_hccap->HccaDoneHead, NULL);
       ^~~~~~~~

    ../../common/io/usb/hcd/openhci/ohci.c: In function 'ohci_alloc_hc_ed':
    ../../common/sys/usb/hcd/openhci/ohcid.h:769:7: error: cast from pointer to 
integer of different size [-Werror=pointer-to-int-cast]
          ((int32_t)(val)))
           ^
    ../../common/io/usb/hcd/openhci/ohci.c:3819:4: note: in expansion of macro '
Set_ED'
        Set_ED(hc_ed->hced_prev, NULL);
        ^~~~~~
    ../../common/sys/usb/hcd/openhci/ohcid.h:769:7: error: cast from pointer to 
integer of different size [-Werror=pointer-to-int-cast]
          ((int32_t)(val)))
           ^
    ../../common/io/usb/hcd/openhci/ohci.c:3820:4: note: in expansion of macro '
Set_ED'
        Set_ED(hc_ed->hced_next, NULL);
        ^~~~~~
    ../../common/io/usb/hcd/openhci/ohci.c: In function 'ohci_insert_intr_ed':
    ../../common/sys/usb/hcd/openhci/ohcid.h:769:7: error: cast from pointer to 
integer of different size [-Werror=pointer-to-int-cast]
          ((int32_t)(val)))
           ^
    ../../common/io/usb/hcd/openhci/ohci.c:4072:3: note: in expansion of macro 'Set_ED'
       Set_ED(ept->hced_prev, NULL);
       ^~~~~~
    ../../common/io/usb/hcd/openhci/ohci.c: In function 'ohci_insert_isoc_ed':
    ../../common/sys/usb/hcd/openhci/ohcid.h:769:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          ((int32_t)(val)))
           ^
    ../../common/io/usb/hcd/openhci/ohci.c:4170:2: note: in expansion of macro 'Set_ED'
      Set_ED(ept->hced_next, NULL);
      ^~~~~~
    ../../common/io/usb/hcd/openhci/ohci.c: In function 'ohci_detach_ed_from_list':
    ../../common/sys/usb/hcd/openhci/ohcid.h:769:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          ((int32_t)(val)))
           ^
    ../../common/io/usb/hcd/openhci/ohci.c:4498:5: note: in expansion of macro 'Set_ED'
         Set_ED(next_ept->hced_prev,  NULL);
         ^~~~~~
    ../../common/sys/usb/hcd/openhci/ohcid.h:769:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          ((int32_t)(val)))
           ^
    ../../common/io/usb/hcd/openhci/ohci.c:4506:5: note: in expansion of macro 'Set_ED'
         Set_ED(next_ept->hced_prev, NULL);
         ^~~~~~
    ../../common/sys/usb/hcd/openhci/ohcid.h:769:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          ((int32_t)(val)))
           ^
    ../../common/io/usb/hcd/openhci/ohci.c:4534:6: note: in expansion of macro 'Set_ED'
          Set_ED(next_ept->hced_prev, NULL);
          ^~~~~~
    ../../common/sys/usb/hcd/openhci/ohcid.h:790:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          ((int32_t)(val)))
           ^
    ../../common/io/usb/hcd/openhci/ohci.c:4551:5: note: in expansion of macro 'Set_OpReg'
         Set_OpReg(hcr_ctrl_head, NULL);
         ^~~~~~~~~
    ../../common/sys/usb/hcd/openhci/ohcid.h:790:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          ((int32_t)(val)))
           ^
    ../../common/io/usb/hcd/openhci/ohci.c:4555:5: note: in expansion of macro 'Set_OpReg'
         Set_OpReg(hcr_bulk_head, NULL);
         ^~~~~~~~~
    ../../common/io/usb/hcd/openhci/ohci.c: In function 'ohci_ed_iommu_to_cpu':
    ../../common/io/usb/hcd/openhci/ohci.c:4703:11: error: comparison between pointer and integer [-Werror]
      if (addr == NULL) {
               ^~
    ../../common/io/usb/hcd/openhci/ohci.c: In function 'ohci_td_iommu_to_cpu':
    ../../common/io/usb/hcd/openhci/ohci.c:6733:11: error: comparison between pointer and integer [-Werror]
      if (addr == NULL) {
               ^~
    In file included from ../../common/io/usb/hcd/openhci/ohci.c:42:0:
    ../../common/io/usb/hcd/openhci/ohci.c: In function 'ohci_intr':
    ../../common/sys/usb/hcd/openhci/ohcid.h:783:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          ((int32_t)(val)))
           ^
    ../../common/io/usb/hcd/openhci/ohci.c:7878:4: note: in expansion of macro 'Set_HCCA'
        Set_HCCA(ohcip->ohci_hccap->HccaDoneHead, NULL);
        ^~~~~~~~
    ../../common/io/usb/hcd/openhci/ohci.c: In function 'ohci_reverse_done_list':
    ../../common/io/usb/hcd/openhci/ohci.c:8393:41: error: comparison between pointer and integer [-Werror]
      if (Get_TD(cpu_new_head->hctd_next_td) == NULL) {
                                             ^~
    In file included from ../../common/io/usb/hcd/openhci/ohci.c:42:0:
    ../../common/io/usb/hcd/openhci/ohci.c: In function 'ohci_do_soft_reset':
    ../../common/sys/usb/hcd/openhci/ohcid.h:783:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          ((int32_t)(val)))
           ^
    ../../common/io/usb/hcd/openhci/ohci.c:9821:3: note: in expansion of macro 'Set_HCCA'
       Set_HCCA(ohcip->ohci_hccap->HccaDoneHead, NULL);
       ^~~~~~~~
    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk about 4 years ago

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

git commit 3e1e1e62b0c0f0f7b5ebf7025cfa7f3e715f7cee

commit  3e1e1e62b0c0f0f7b5ebf7025cfa7f3e715f7cee
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-22T05:10:36.000Z

    10715 ohci: NULL pointer errors
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Actions

Also available in: Atom PDF