Re: [PATCH] imx: add udc driver

David Brownell <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
Against 2.6.23 I get:

Applying patch imx_udc.patch
patching file arch/arm/mach-imx/generic.c
Hunk #1 succeeded at 36 with fuzz 2.
Hunk #2 succeeded at 291 (offset -12 lines).
Hunk #3 succeeded at 367 (offset -11 lines).
patching file drivers/usb/gadget/Kconfig
patching file drivers/usb/gadget/Makefile
patching file drivers/usb/gadget/ether.c
patching file drivers/usb/gadget/imx_udc.c
patching file drivers/usb/gadget/imx_udc.h
patching file include/asm-arm/arch-imx/hardware.h
Hunk #1 FAILED at 28.
Hunk #2 succeeded at 83 (offset -3 lines).
1 out of 2 hunks FAILED -- rejects in file include/asm-arm/arch-imx/hardware.h
patching file include/asm-arm/arch-imx/udc.h
Patch imx_udc.patch does not apply (enforce with -f)

The failed chunk is:

> --- a/include/asm-arm/arch-imx/hardware.h
> +++ b/include/asm-arm/arch-imx/hardware.h
> @@ -28,6 +28,8 @@
>  
>  # define __REG2(x,y)        (*(volatile u32 *)((u32)&__REG(x) + (y)))
>  
> +# define __REG8(x)	(*((volatile u8 *)IO_ADDRESS(x)))
> +
>  #else
>  # define __REG(x)	(IO_ADDRESS(x))
>  #endif

Because the kernel.org tree doesn't have that "#else" branch
for use in ASM code.

Also, this patch has around 400 checkpatch.pl problems, plus
space at end of line issues reported by "quilt".  I didn't yet
check for compiler warnings, or "sparse" output.

While looking at checkpatch.pl output, I found some obvious bugs
when checking the first two (!) warnings from the driver header:

 - Bogus range checking in irq_to_ep()
 - Using the wrong mask in EP_NO (see <linux/usb/ch9.h>)

I get the strong feeling this driver hasn't yet used many of
the normal tools for improving kernel code quality.  You should
fix such problems *before* submitting patches... can you resolve
all of those, then resubmit?

When you retest, please make sure you're running with lockdep
and slab poisoning.  (Lockdep gets overlooked more often than
I like.  IMO the ONLY excuse for that is in very early stages
of platform bringup, when it doesn't yet work.  IMX should be
long past that stage.)

- Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.