]> git.baikalelectronics.ru Git - uboot.git/commit
usb: dwc2-otg: make regs_otg (in platdata) a uintptr_t
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tue, 6 Jun 2017 13:42:29 +0000 (15:42 +0200)
committerSimon Glass <sjg@chromium.org>
Thu, 8 Jun 2017 03:30:48 +0000 (21:30 -0600)
commitf086fae5b95ba6d666a7e11e769a244fdc2da952
treebb4fc944ab9e07a2ddb8c11ff64bd6a936386298
parent0146e9a663b56cf7ddc59ce30acd2e1c623151fd
usb: dwc2-otg: make regs_otg (in platdata) a uintptr_t

The regs_otg field in uintptr_t of the platform data structure for
dwc2-otg has thus far been an unsigned int, but will eventually be
casted into a void*.

This raises the following error with GCC 6.3 and buildman:
  ../drivers/usb/gadget/dwc2_udc_otg.c: In function 'dwc2_udc_probe':
  ../drivers/usb/gadget/dwc2_udc_otg.c:821:8: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    reg = (struct dwc2_usbotg_reg *)pdata->regs_otg;
          ^

This changes regs_otg to a uintptr_t to ensure that it is large enough
to hold any valid pointer (and fix the associated warning).

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
include/usb/dwc2_udc.h