Re: [PATCH] usb: musb: Kconfig: Depend on some machines under blackfin

2015-04-05 Thread Chen Gang
On 4/5/15 16:29, Greg Kroah-Hartman wrote: On Sun, Apr 05, 2015 at 06:33:44AM +0800, Chen Gang wrote: On 4/4/15 17:54, Greg Kroah-Hartman wrote: On Sat, Apr 04, 2015 at 05:51:21AM +0800, Chen Gang wrote: Under blackfin, only bf527, bf548 and bf609 may use musb. The related error

Re: [PATCH] usb: musb: Kconfig: Depend on some machines under blackfin

2015-04-04 Thread Chen Gang
On 4/4/15 17:54, Greg Kroah-Hartman wrote: On Sat, Apr 04, 2015 at 05:51:21AM +0800, Chen Gang wrote: Under blackfin, only bf527, bf548 and bf609 may use musb. The related error with allmodconfig: CC [M] drivers/usb/misc/trancevibrator.o In file included from drivers/usb/musb

Re: [PATCH] usb: musb: Kconfig: Depend on some machines under blackfin

2015-04-03 Thread Chen Gang
On 4/4/15 06:03, Richard Weinberger wrote: On Fri, Apr 3, 2015 at 11:51 PM, Chen Gang xili_gchen_5...@hotmail.com wrote: Under blackfin, only bf527, bf548 and bf609 may use musb. The related error with allmodconfig: CC [M] drivers/usb/misc/trancevibrator.o In file included from

[PATCH] usb: musb: Kconfig: Depend on some machines under blackfin

2015-04-03 Thread Chen Gang
: In function 'musb_indexed_ep_select': drivers/usb/musb/musb_regs.h:458:32: error: 'USB_INDEX' undeclared (first use in this function) #define MUSB_INDEX USB_OFFSET(USB_INDEX) /* 8 bit */ ^ Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- drivers/usb/musb

[PATCH] net: usb: sr9700: Use 'SR_' prefix for the common register macros

2015-02-02 Thread Chen Gang S
include/linux/module.h:9, from drivers/net/usb/sr9700.c:13: ./arch/xtensa/include/asm/processor.h:190:0: note: this is the location of the previous definition #define RSR(v,sr) __asm__ __volatile__ (rsr %0,__stringify(sr) : =a(v)); ^ Signed-off-by: Chen Gang gang.chen.5

Re: [PATCH] drivers/usb/host/ehci-xilinx-of.c: Include linux/of_irq.h to avoid compiling error

2014-09-29 Thread Chen Gang
this patch in 2014-09-24), so I need not resend it. Thank all of you for your work. Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org

[PATCH] drivers/usb/host/ehci-xilinx-of.c: Include linux/of_irq.h to avoid compiling error

2014-09-03 Thread Chen Gang
=implicit-function-declaration] irq = irq_of_parse_and_map(dn, 0); ^ Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- drivers/usb/host/ehci-xilinx-of.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/ehci-xilinx-of.c b/drivers/usb/host/ehci-xilinx-of.c index fe57710

Re: [PATCH] include/linux/usb/usb_phy_gen_xceiv.h: check built-in or module for swithing usb_nop_xceiv_register() implementation

2013-11-14 Thread Chen Gang
On 11/15/2013 02:37 AM, Tony Lindgren wrote: * Chen Gang gang.c...@asianux.com [131023 02:57]: When CONFIG_NOP_USB_XCEIV is as 'm', usb_nop_xceiv_register() will be exported when the related module is loaded. So for built-in source code, still need use the empty one. Or it will can not pass

[PATCH] include/linux/usb/usb_phy_gen_xceiv.h: check built-in or module for swithing usb_nop_xceiv_register() implementation

2013-10-23 Thread Chen Gang
: In function `omap3_evm_init': arch/arm/mach-omap2/board-omap3evm.c:703: undefined reference to `usb_nop_xceiv_register' Signed-off-by: Chen Gang gang.c...@asianux.com --- include/linux/usb/usb_phy_gen_xceiv.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/include/linux

[PATCH] drivers: usb: gadget: add '__ref' for rndis_config_register() and cdc_config_register()

2013-09-02 Thread Chen Gang
the variable .LM2953 to the variable .init.text:_cdc_do_config The function .LM2953() references the variable __init _cdc_do_config. This is often because .LM2953 lacks a __init annotation or the annotation of _cdc_do_config is wrong. Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/usb

Re: [PATCH 1/2] usb: class: move checking 'actual' code block into checking 'buffer[1]' code block

2013-07-18 Thread Chen Gang
Hello Maintainers: Please help check this patch when you have time. Thanks. On 07/11/2013 09:08 AM, Chen Gang wrote: Hello Maintainers: Please help check this patch when you have time, thanks. BTW: this uninitialized variable warning may not be found by gcc compiler (which a gcc bug

Re: [PATCH 1/2] usb: class: move checking 'actual' code block into checking 'buffer[1]' code block

2013-07-18 Thread Chen Gang F T
On 07/19/2013 12:43 PM, Ming Lei wrote: Hi Chen Gang, On Fri, Jul 19, 2013 at 12:21 PM, Chen Gang gang.c...@asianux.com wrote: Hello Maintainers: Please help check this patch when you have time. Looks your patch is correct, and I think Greg will handle your patch when usb-next tree

Re: [PATCH 1/2] usb: class: move checking 'actual' code block into checking 'buffer[1]' code block

2013-07-10 Thread Chen Gang
Hello Maintainers: Please help check this patch when you have time, thanks. BTW: this uninitialized variable warning may not be found by gcc compiler (which a gcc bug exists almost 10 years). Thanks. On 07/02/2013 12:06 PM, Chen Gang wrote: The variable 'actual' is only used in checking

[Patch 0/2] usb: class: 2 modifications for usbtmc.c

2013-07-01 Thread Chen Gang
checking, we also need check the other related code blocks. Diff stat: --- drivers/usb/class/usbtmc.c | 22 -- 1 files changed, 16 insertions(+), 6 deletions(-) Thanks. -- Chen Gang -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message

[PATCH 1/2] usb: class: move checking 'actual' code block into checking 'buffer[1]' code block

2013-07-01 Thread Chen Gang
The variable 'actual' is only used in checking 'buffer[1]' code block, so need move it into, or it may not be initialized. Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/usb/class/usbtmc.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH 2/2] usb: class: check the looping count for USBTMC_MAX_READS_TO_CLEAR_BULK_IN.

2013-07-01 Thread Chen Gang
The variable 'n' is initialized before goto usbtmc_clear_check_status looping, and used in inside do ... while looping, So it may be not less than 'USBTMC_MAX_READS_TO_CLEAR_BULK_IN', need add related checking for it before the looping do ... while. Signed-off-by: Chen Gang gang.c...@asianux.com

Re: [PATCH v3] USB: mos7840: looping issue: avoid the return value overriden by looping

2013-04-06 Thread Chen Gang
On 2013年04月03日 17:25, Chen Gang wrote: inside the 'for' looping: the return value 'rv' may override if not have a check in time. the next checking (outside the 'for' looping): can not find failure which generated during the 'for' looping the fix is for: let outside know

Re: [PATCH v3] USB: mos7840: looping issue: avoid the return value overriden by looping

2013-04-06 Thread Chen Gang
On 2013年04月06日 15:34, Chen Gang wrote: On 2013年04月03日 17:25, Chen Gang wrote: inside the 'for' looping: the return value 'rv' may override if not have a check in time. the next checking (outside the 'for' looping): can not find failure which generated during the 'for' looping

[PATCH v2] USB: mos7840: looping issue: avoid the return value overriden by looping

2013-04-03 Thread Chen Gang
is: commit 0de9a7024e7ae62512d080c7e2beb59d82958cd5 Author: Oliver Neukum oneu...@suse.de Date: Fri Mar 16 20:28:28 2007 +0100 Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/usb/serial/mos7840.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff

Re: [PATCH v2] USB: mos7840: looping issue: avoid the return value overriden by looping

2013-04-03 Thread Chen Gang
is below) :-) On 2013年04月01日 11:50, Chen Gang wrote: inside the 'for' looping: the return value 'rv' may override if not have a check in time. next checking, outside the 'for' looping: can not find failure which generated during the 'for' looping so need let outside know

Re: [PATCH v2] USB: mos7840: looping issue: avoid the return value overriden by looping

2013-04-03 Thread Chen Gang
On 2013年04月03日 16:31, Oliver Neukum wrote: correct but dirty. A boolean and a comment would be nice. ok, thanks. I will send patch v3. -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord

[PATCH v3] USB: mos7840: looping issue: avoid the return value overriden by looping

2013-04-03 Thread Chen Gang
the other ports just because there is an error in another port. Signed-off-by: Chen Gang gang.c...@asianux.com Signed-off-by: Oliver Neukum oneu...@suse.de --- drivers/usb/serial/mos7840.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial

Re: [PATCH] drivers/usb/core: processing failure, maching resume condition with suspend condition

2013-04-01 Thread Chen Gang
On 2013年04月01日 22:58, Alan Stern wrote: Thanks for spotting this. Acked-by: Alan Stern st...@rowland.harvard.edu thank you too. -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org

[PATCH] drivers/usb/core: processing failure, maching resume condition with suspend condition

2013-03-31 Thread Chen Gang
when suspend, it need check 'udev-actconfig'. so when process failure, also need check it. Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/usb/core/driver.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/usb/core/driver.c b/drivers/usb

Re: [PATCH] drivers/usb/gadget: beautify code, delete unused code

2013-03-14 Thread Chen Gang
于 2013年03月14日 23:07, Alan Stern 写道: I have a net2280. Which patch do you want me to test? The two of you have come up with two different versions. thank Alan very much, thank Felipe, too. :-) -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe

[PATCH] vers/usb/gadget: beautify code, delete useless comments

2013-03-11 Thread Chen Gang
since parameter driver has been deleted, also need delete relative comments. relative commit number is d93e2600d80fc41ccf339b4a2843a3007d479907 Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/usb/gadget/s3c-hsudc.c |1 - 1 files changed, 0 insertions(+), 1 deletions

Re: [PATCH] drivers/usb/gadget: beautify code, delete unused code

2013-03-11 Thread Chen Gang
and run the same test again? after reference the commit: d93e2600d80fc41ccf339b4a2843a3007d479907 it seems udc_start and udc_stop will have effect, so not need call driver-disconnect() is it correct ? thanks. -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send

Re: [PATCH] drivers/usb/gadget: beautify code, delete unused code

2013-03-11 Thread Chen Gang
于 2013年03月11日 18:17, Chen Gang 写道: 于 2013年03月04日 22:35, Felipe Balbi 写道: since stop_activity() also gets called from RESET interrupt, and in that case we need to call driver-disconnect(). Can you make a simple test that would take current code and issue a device reset to see if that would

[PATCH] usb: gadget: s3c-hsudc: delete outdated comment

2013-03-11 Thread Chen Gang
since commit d93e260 (usb: gadget: s3c-hsudc: use udc_start and udc_stop functions) the 'driver' parameter has been deleted from s3c_hsudc_stop_activity() but its documentation was left outdated. This patch deletes the comment since it makes no sense anymore. Signed-off-by: Chen Gang gang.c

Re: [PATCH] drivers/usb/gadget: beautify code, delete unused code

2013-03-11 Thread Chen Gang
于 2013年03月11日 18:50, Felipe Balbi 写道: On Mon, Mar 11, 2013 at 06:42:25PM +0800, Chen Gang wrote: if I can not find other members to help us, I will try to find another ways. code inspection works most of the time. excuse me, my English is not quite well, could you describe

Re: [PATCH] drivers/usb/gadget: beautify code, delete unused code

2013-03-11 Thread Chen Gang F T
. -- Chen Gang Flying Transformer -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] vers/usb/gadget: beautify code, delete useless comments

2013-03-11 Thread Chen Gang
. On 11-03-2013 14:14, Chen Gang wrote: since parameter driver has been deleted, also need delete relative comments. relative You probably meant related in both cases? ok, thanks, I need notice, next time. commit number is d93e2600d80fc41ccf339b4a2843a3007d479907

Re: [PATCH] drivers/usb/gadget: beautify code, delete unused code

2013-03-06 Thread Chen Gang
suggestions or completions. thanks :-) -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] drivers/usb/gadget: using strlcpy instead of strncpy

2013-03-04 Thread Chen Gang
于 2013年03月02日 03:47, Laurent Pinchart 写道: I've taken the patch in my tree. I've just sent a consolidated series of most pending UVC gadget patches to the list, and I will send you a pull request as soon as I receive a Tested-by. thanks -- Chen Gang Asianux Corporation

Re: [PATCH] drivers/usb/gadget: beautify code, delete unused code

2013-03-04 Thread Chen Gang
. -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] drivers/usb/gadget: using strlcpy instead of strncpy

2013-03-04 Thread Chen Gang
于 2013年03月04日 01:35, Laurent Pinchart 写道: On Sunday 03 March 2013 01:23:46 Felipe Balbi wrote: On Fri, Mar 01, 2013 at 08:47:34PM +0100, Laurent Pinchart wrote: On Wednesday 27 February 2013 10:26:23 Felipe Balbi wrote: On Sat, Feb 02, 2013 at 03:48:54PM +0800, Chen Gang wrote

[PATCH] drivers/usb/gadget: beautify code, delete unused code

2013-02-28 Thread Chen Gang
to new style commit 4cf5e00b055ba5e4f3852e477a2a4346730ea283 Author: Felipe Balbi ba...@ti.com Date: Mon Oct 10 10:37:17 2011 +0300 usb: gadget: net2280: convert to new style Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/usb/gadget/net2272.c |4 drivers

[PATCH] drivers/usb/gadget: using strlcpy instead of strncpy

2013-02-01 Thread Chen Gang
for NUL terminated string, better notice '\0' in the end. Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/usb/gadget/f_uvc.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c index 5b62987..92efd6e

[PATCH] drivers/usb/core: using strlcpy instead of strncpy

2013-02-01 Thread Chen Gang
for NUL terminated string, better notice '\0' in the end. Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/usb/core/devio.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index b78fbe2..4a863fd 100644

Re: [PATCH 2/2 v2] USB: uhci: beautify source code

2013-01-24 Thread Chen Gang
于 2013年01月25日 05:59, Greg KH 写道: This patch was line-wrapped and trailing spaces dropped, making it impossible to apply. I edited it by hand to get it to work, but please be more careful in the future. thank you very much. I should notice, next time. -- Chen Gang Asianux Corporation

[PATCH 0/2] drivers/usb/host/uhci-*: fix memory flow bug and beautify source code

2013-01-23 Thread Chen Gang
PATCH 1/2: check buffer length to avoid memory overflow PATCH 2/2: beautify source code PATCH 2/2 is made based on PATCH 1/2 please apply PATCH 1/2 firstly, and then apply PATCH 2/2 total stat (2 patches together): --- drivers/usb/host/uhci-debug.c | 178

[PATCH 1/2] drivers/usb/host/uhci-* : check buffer length to avoid memory overflow

2013-01-23 Thread Chen Gang
it like this: at first, make enough room for buffering the exceeding contents judge the contents which written whether bigger than buffer length if bigger (the exceeding contents will be in the exceeding buffer) break current work flow, and return. Signed-off-by: Chen Gang

[PATCH 2/2] drivers/usb/host/uhci-*: beautify source code

2013-01-23 Thread Chen Gang
get rid of the line breaks in string constants. let comments within 80 with limitation. delete ' \' at the end of a statement. Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/usb/host/uhci-debug.c | 28 drivers/usb/host/uhci-hcd.c | 27

Re: [PATCH 2/2] drivers/usb/host/uhci-*: beautify source code

2013-01-23 Thread Chen Gang
于 2013年01月24日 00:34, Alan Stern 写道: Here you could just get rid of the second *** on each line. Or put the 7 ports max into parentheses and get rid of all the ***'s. Alan Stern thank you, I will send [PATCH 2/2 v2]. -- Chen Gang Asianux Corporation -- To unsubscribe from this list

[PATCH 2/2 v2] drivers/usb/host/uhci-*: beautify source code

2013-01-23 Thread Chen Gang
get rid of the line breaks in string constants. let comments within 80 with limitation. delete ' \' at the end of a statement. Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/usb/host/uhci-debug.c | 28 drivers/usb/host/uhci-hcd.c | 27

Re: [PATCH] drivers/usb/gadget: using strlcpy instead of strncpy

2013-01-22 Thread Chen Gang
于 2013年01月23日 09:00, Laurent Pinchart 写道: Thank you for the patch. I've applied it to my tree. thanks. -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http

[PATCH] drivers/usb/gadget: using strlcpy instead of strncpy

2013-01-21 Thread Chen Gang
for NUL terminated string, better notice '\0' in the end. Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/usb/gadget/uvc_v4l2.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/uvc_v4l2.c b/drivers/usb/gadget/uvc_v4l2.c index 2ca9386

Re: [PATCH v2] drivers/usb/host/uhci-* : check buffer length to avoid memory overflow

2013-01-21 Thread Chen Gang
it into multiple lines. if you do not think so, please tell me, I will restore, thanks. and also thank you for your details checking. -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org

Re: [PATCH v2] drivers/usb/host/uhci-* : check buffer length to avoid memory overflow

2013-01-20 Thread Chen Gang
Hello Alan Stern When you have time, could you help checking this patch ? welcome any reasonable rejections, too. thanks. gchen. 于 2013年01月19日 07:37, Greg KH 写道: On Sat, Jan 12, 2013 at 11:18:03PM +0800, Chen Gang wrote: for function uhci_sprint_schedule: the buffer len

[PATCH v2] drivers/usb/host/uhci-* : check buffer length to avoid memory overflow

2013-01-12 Thread Chen Gang
contents not seperated in second line. Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/usb/host/uhci-debug.c | 178 +++-- drivers/usb/host/uhci-hcd.c | 31 --- drivers/usb/host/uhci-q.c |2 +- 3 files changed, 136 insertions(+), 75

Re: [PATCH] drivers/usb/host/uhci-* : check buffer length to avoid memory overflow

2013-01-08 Thread Chen Gang
things) -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] drivers/usb/host/uhci-* : check buffer length to avoid memory overflow

2012-12-20 Thread Chen Gang
-by: Chen Gang gang.c...@asianux.com --- drivers/usb/host/uhci-debug.c | 140 + drivers/usb/host/uhci-hcd.c |4 +- drivers/usb/host/uhci-q.c |2 +- 3 files changed, 102 insertions(+), 44 deletions(-) diff --git a/drivers/usb/host/uhci-debug.c b

[PATCH] drivers/usb/host/ohci* : set urb-hcpriv = NULL immediately, after free it

2012-12-18 Thread Chen Gang
although we can not say it is surely a bug. it is better to set urb-hcpriv = NULL, after finish calling urb_free_priv. before kfree urb_priv, better to judge whether urb_priv == NULL, firstly. Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/usb/host/ohci-q.c |7 ++- 1

Re: [PATCH] drivers/usb/host/ohci* : set urb-hcpriv = NULL immediately, after free it

2012-12-18 Thread Chen Gang
this. If urb_priv is NULL, that's a bug. We want it to cause a visible error, not silently fail. good idea ! (for private use, it is a good idea) I'll send patch v2 -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message

[PATCH v2] drivers/usb/host/ohci* : set urb-hcpriv = NULL immediately, after free it

2012-12-18 Thread Chen Gang
although we can not say it is surely a bug. it is better to set urb-hcpriv = NULL, after finish calling urb_free_priv. Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/usb/host/ohci-q.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb

Re: [Suggestion] drivers/usb/host/uhci* : sprintf, need check len when use buf

2012-12-18 Thread Chen Gang
the count of output contents, then judge whether match the MAX_OUTPUT. if you have additional completions, please tell me. I will start the implementation when get your reply. Regards. -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux

Re: [Suggestion] drivers/usb/host/ohci* : not setting urb-hcpriv = NULL after kfree it.

2012-12-17 Thread Chen Gang
于 2012年12月17日 23:27, Alan Stern 写道: On Mon, 17 Dec 2012, Chen Gang wrote: 于 2012年12月17日 11:08, Alan Stern 写道: It is pretty much as I explained in my previous email. finish_urb calls usb_free_priv while holding the lock. Then while still holding the lock, it calls

Re: [Suggestion] drivers/usb/host/ohci* : not setting urb-hcpriv = NULL after kfree it.

2012-12-17 Thread Chen Gang
于 2012年12月17日 23:27, Alan Stern 写道: On Mon, 17 Dec 2012, Chen Gang wrote: 于 2012年12月17日 11:08, Alan Stern 写道: It is pretty much as I explained in my previous email. finish_urb calls usb_free_priv while holding the lock. Then while still holding the lock, it calls

Re: [Suggestion] drivers/usb/host/uhci* : sprintf, need check len when use buf

2012-12-16 Thread Chen Gang
not think it is a good idea). excuse me, please wait some days (at least, I need construct the relative environments for testing). thanks. -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org

Re: [Suggestion] drivers/usb/host/ohci* : not setting urb-hcpriv = NULL after kfree it.

2012-12-16 Thread Chen Gang
于 2012年12月16日 01:04, Alan Stern 写道: On Sat, 15 Dec 2012, Chen Gang wrote: Hello Alan Stern: in drivers/usb/host/ohci-q.c, function finish_urb: when we finish call urb_free_priv, we not set urb-hcpriv = NULL (line 46) urb_free_priv call kfree for urb_priv (which is urb

Re: [Suggestion] drivers/usb/host/ohci* : not setting urb-hcpriv = NULL after kfree it.

2012-12-16 Thread Chen Gang
于 2012年12月17日 09:37, Chen Gang 写道: 于 2012年12月16日 01:04, Alan Stern 写道: Also, don't forget that the first think usb_hcd_giveback_urb does is set urb-hcpriv to NULL. in finish_urb: when call usb_hcd_giveback_urb, need unlock firstly (lock again, after finish). kfree urb-hcpriv

Re: [Suggestion] drivers/usb/host/ohci* : not setting urb-hcpriv = NULL after kfree it.

2012-12-16 Thread Chen Gang
and usb_hcd_link_urb_to_ep is called. it is true for ohci_urb_dequeue. how about finish_unlinks and takeback_td in drives/usb/host/ohci-q.c ? (they also can call finish_urb). -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body

[Suggestion] drivers/usb/host/ohci* : not setting urb-hcpriv = NULL after kfree it.

2012-12-15 Thread Chen Gang
Hello Alan Stern: in drivers/usb/host/ohci-q.c, function finish_urb: when we finish call urb_free_priv, we not set urb-hcpriv = NULL (line 46) urb_free_priv call kfree for urb_priv (which is urb-hcpriv, line 29) within finish_urb, we not set urb-hcpriv = NULL (line 43..81) in

[Suggestion] drivers/usb/host/uhci* : sprintf, need check len when use buf

2012-12-14 Thread Chen Gang
Hello Alan Stern: in drivers/usb/host/uhci-debug.c, for function uhci_sprint_schedule: we are not check the len of buf (not like another static functions in this file). the buffer len is MAX_OUTPUT: 64 * 1024 (line 491, line 517) the buffer may not be enough: we may loop

Re: [Suggestion] drivers/usb/host/uhci* : sprintf, need check len when use buf

2012-12-14 Thread Chen Gang
/majordomo-info.html -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [Suggestion] drivers/usb/renesas_usbhs: pkt is still in use, after it was already free.

2012-12-09 Thread Chen Gang
. gchen. Best regards --- Kuninori Morimoto -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [Suggestion] drivers/usb/core: dev-config and dev-rawdescriptors, when processing failure.

2012-12-08 Thread Chen Gang
ok, thanks. :-) gchen. 于 2012年12月07日 23:18, Alan Stern 写道: On Fri, 7 Dec 2012, Chen Gang wrote: but I still not quite be sure, please help checking (total 3 steps, below). thanks. -- Step 1

Re: [Suggestion] drivers/usb/renesas_usbhs: pkt is still in use, after it was already free.

2012-12-08 Thread Chen Gang
于 2012年12月07日 23:03, Greg KH 写道: On Fri, Dec 07, 2012 at 08:42:25PM +0800, Chen Gang wrote: Hello Greg Kroah-Hartman: in drivers/usb/renesas_usbhs/mod_host.c, in function usbhsh_queue_done: get ureq from pkt, by using the macro usbhsh_pkt_to_ureq (at line 637) pkt is the sub

[Suggestion] drivers/usb/renesas_usbhs: pkt is still in use, after it was already free.

2012-12-07 Thread Chen Gang
Hello Greg Kroah-Hartman: in drivers/usb/renesas_usbhs/mod_host.c, in function usbhsh_queue_done: get ureq from pkt, by using the macro usbhsh_pkt_to_ureq (at line 637) pkt is the sub-object of ureq (line 73..76, line 157..158) free ureq, by calling function usbhsh_ureq_free (at

[Suggestion] drivers/usb/core: for u16, use stack allocation instead of kmalloc

2012-12-06 Thread Chen Gang
Hello Greg Kroah-Hartman: in drivers/usb/core/message.c: at line 943, status is kmalloc ( sizeof u16 ) at line 952, assign the value of status to data at line 953, free status. it is better to let u16 status instead of u16 *status = kmalloc thanks. gchen. 940 int

Re: [Suggestion] drivers/usb/core: for u16, use stack allocation instead of kmalloc

2012-12-06 Thread Chen Gang
于 2012年12月06日 19:01, Peter Stuge 写道: Chen Gang wrote: it is better to let u16 status instead of u16 *status = kmalloc . 940 int usb_get_status(struct usb_device *dev, int type, int target, void *data) 941 { 942 int ret; 943 u16 *status = kmalloc(sizeof(*status

Re: [Suggestion] drivers/usb/core: for u16, use stack allocation instead of kmalloc

2012-12-06 Thread Chen Gang
于 2012年12月06日 19:32, Oliver Neukum 写道: On Thursday 06 December 2012 18:51:25 Chen Gang wrote: Hello Greg Kroah-Hartman: in drivers/usb/core/message.c: at line 943, status is kmalloc ( sizeof u16 ) at line 952, assign the value of status to data at line 953, free status

[Suggestion] drivers/usb/core: dev-config and dev-rawdescriptors, when processing failure.

2012-12-06 Thread Chen Gang
Hello Oliver Neukum: in drivers/usb/core/config.c, for function usb_get_configuration: if processing failed at line 694, we will goto err2 (line 755..759) in this condition, we do not free dev-config and dev-rawdescriptors. after checking another relative source code, it seems not an

Re: [Suggestion] drivers/usb/core: dev-config and dev-rawdescriptors, when processing failure.

2012-12-06 Thread Chen Gang
于 2012年12月06日 23:50, Alan Stern 写道: On Thu, 6 Dec 2012, Chen Gang wrote: in drivers/usb/core/config.c, for function usb_get_configuration: if processing failed at line 694, we will goto err2 (line 755..759) in this condition, we do not free dev-config and dev-rawdescriptors