[U-Boot] [PATCH v3 2/5] sunxi: add USB EHCI driver

Marek Vasut marex at denx.de
Fri Jul 25 17:01:33 CEST 2014


On Thursday, July 24, 2014 at 10:54:21 PM, Roman Byshko wrote:
> The Allwinner aka sunxi SoCs have one or more USB host controllers.
> This adds a driver for their EHCI.
> 
> Signed-off-by: Roman Byshko <rbyshko at gmail.com>

Did you verify the patches to be checkpatch clean please ? Also, they don't 
apply to u-boot-usb/master , so I will wait for V4 with this cleanup and rebase 
on top of u-boot-usb. Otherwise they are good, thanks !

CHECK: No space is necessary after a cast
#170: FILE: drivers/usb/host/ehci-sunxi.c:43:
+               .gpio_vbus = CONFIG_SUNXI_USB_VBUS0_GPIO,
+               .csr = (void*) SUNXI_USB_CSR,

ERROR: "(foo*)" should be "(foo *)"
#170: FILE: drivers/usb/host/ehci-sunxi.c:43:
+               .csr = (void*) SUNXI_USB_CSR,

CHECK: No space is necessary after a cast
#179: FILE: drivers/usb/host/ehci-sunxi.c:52:
+               .gpio_vbus = CONFIG_SUNXI_USB_VBUS1_GPIO,
+               .csr = (void*) SUNXI_USB_CSR,

ERROR: "(foo*)" should be "(foo *)"
#179: FILE: drivers/usb/host/ehci-sunxi.c:52:
+               .csr = (void*) SUNXI_USB_CSR,

ERROR: do not initialise statics to 0 or NULL
#186: FILE: drivers/usb/host/ehci-sunxi.c:59:
+static int enabled_hcd_count = 0;

ERROR: "foo* bar" should be "foo *bar"
#188: FILE: drivers/usb/host/ehci-sunxi.c:61:
+static void* get_io_base(int hcd_id)

CHECK: No space is necessary after a cast
#191: FILE: drivers/usb/host/ehci-sunxi.c:64:
+       if (hcd_id == 1)
+               return (void*) SUNXI_USB1_IO_BASE;

ERROR: "(foo*)" should be "(foo *)"
#191: FILE: drivers/usb/host/ehci-sunxi.c:64:
+               return (void*) SUNXI_USB1_IO_BASE;

CHECK: No space is necessary after a cast
#193: FILE: drivers/usb/host/ehci-sunxi.c:66:
+       else if (hcd_id == 2)
+               return (void*) SUNXI_USB2_IO_BASE;

ERROR: "(foo*)" should be "(foo *)"
#193: FILE: drivers/usb/host/ehci-sunxi.c:66:
+               return (void*) SUNXI_USB2_IO_BASE;

ERROR: trailing statements should be on next line
#194: FILE: drivers/usb/host/ehci-sunxi.c:67:
+       else return NULL;

ERROR: trailing whitespace
#195: FILE: drivers/usb/host/ehci-sunxi.c:68:
+}^I$

CHECK: Alignment should match open parenthesis
#301: FILE: drivers/usb/host/ehci-sunxi.c:174:
+       debug("sunxi-ehci: init hccr %x and hcor %x hc_length %d\n",
+               (uint32_t)*hccr, (uint32_t)*hcor,

total: 8 errors, 0 warnings, 5 checks, 203 lines checked

NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
      scripts/cleanfile

NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX 
MULTISTATEMENT_MACRO_USE_DO_WHILE NETWORKING_BLOCK_COMMENT_STYLE USLEEP_RANGE

/tmp/[U-Boot] [PATCH v3 2_5] sunxi_add USB EHCI driver.mbox has style problems, 
please review.

Best regards,
Marek Vasut


More information about the U-Boot mailing list