Re: [PATCH 9/9] usb: host: ehci.h: move constant to right

2015-12-10 Thread Peter Senna Tschudin
On Wed, Dec 09, 2015 at 07:15:37PM -0300, Geyslan G. Bem wrote: > This patch moves the constant 0x3ff to right and put spaces > in the right shift. > > Caught by coccinelle: > scripts/coccinelle/misc/compare_const_fl.cocci > > Signed-off-by: Geyslan G. Bem Acked-by:

Re: [PATCH 8/9v2] usb: host: ehci.h: move pointer operator to name side

2015-12-10 Thread Peter Senna Tschudin
t other than that the patch looks good to me. Acked-by: Peter Senna Tschudin > --- > drivers/usb/host/ehci.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h > index 15de5bf..81e609a 100644 > --

Re: [PATCH 7/9v2] usb: host: ehci.h: remove macros trailing semicolon

2015-12-10 Thread Peter Senna Tschudin
ut other than that the patch looks good to me. Acked-by: Peter Senna Tschudin > --- > drivers/usb/host/ehci.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h > index ea56147..15de5bf 100644 > --- a

Re: [PATCH 6/9v2] usb: host: ehci.h: use space after comma

2015-12-10 Thread Peter Senna Tschudin
On Wed, Dec 09, 2015 at 07:32:35PM -0300, Geyslan G. Bem wrote: > Put space after comma. > > This patch also changes QH_NEXT macro for better reading. > > Caught by checkpatch: "ERROR: space required after that ','" > > Signed-off-by: Geyslan G. Bem > --- > drivers/usb/host/ehci.h | 5 +++-- >

Re: [PATCH 5/9v2] usb: host: ehci.h: remove direct use of __attribute__ keyword

2015-12-10 Thread Peter Senna Tschudin
igned-off-by: Geyslan G. Bem As with previous, missing the changelog, but other than that the patch looks good to me. Acked-by: Peter Senna Tschudin > --- > drivers/usb/host/ehci.h | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/usb/host/ehci.h b/drive

Re: [PATCH 4/9v2] usb: host: ehci.h: fix single statement macros

2015-12-10 Thread Peter Senna Tschudin
m As with previous, missing the changelog, but other than that the patch looks good to me. Acked-by: Peter Senna Tschudin > --- > drivers/usb/host/ehci.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/host/ehci.h b/drivers/usb/

Re: [PATCH 2/9v2] usb: host: ehci.h: remove space before function open parenthesis

2015-12-10 Thread Peter Senna Tschudin
; --- As with previous, missing the changelog here, but other than that the patch looks good to me. Acked-by: Peter Senna Tschudin > drivers/usb/host/ehci.h | 22 +++--- > 1 file changed, 11 insertions(+), 11 deletions(-) > > diff --git a/drivers/usb/host/ehci.

Re: [PATCH 3/9v2] usb: host: ehci.h: remove space before open square bracket

2015-12-10 Thread Peter Senna Tschudin
he changelog, but other than that the patch looks good to me. Acked-by: Peter Senna Tschudin > --- > drivers/usb/host/ehci.h | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h > index 46982df..

Re: [PATCH 1/9v2] usb: host: ehci.h: remove space before comma

2015-12-10 Thread Peter Senna Tschudin
changed from V1. Other than that: Acked-by: Peter Senna Tschudin Not related to this patch, I did not receive patch 9/9v2. > drivers/usb/host/ehci.h | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h > in

Re: [PATCH 2/9v2] usb: host: ehci.h: remove space before function open parenthesis

2015-12-10 Thread Peter Senna Tschudin
an G. Bem <geys...@gmail.com> > --- As with previous, missing the changelog here, but other than that the patch looks good to me. Acked-by: Peter Senna Tschudin <peter.se...@gmail.com> > drivers/usb/host/ehci.h | 22 +++--- > 1 file changed, 11 insertions(+), 11 deletio

Re: [PATCH 4/9v2] usb: host: ehci.h: fix single statement macros

2015-12-10 Thread Peter Senna Tschudin
an G. Bem <geys...@gmail.com> As with previous, missing the changelog, but other than that the patch looks good to me. Acked-by: Peter Senna Tschudin <peter.se...@gmail.com> > --- > drivers/usb/host/ehci.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --

Re: [PATCH 3/9v2] usb: host: ehci.h: remove space before open square bracket

2015-12-10 Thread Peter Senna Tschudin
th previous, missing the changelog, but other than that the patch looks good to me. Acked-by: Peter Senna Tschudin <peter.se...@gmail.com> > --- > drivers/usb/host/ehci.h | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/drivers/us

Re: [PATCH 5/9v2] usb: host: ehci.h: remove direct use of __attribute__ keyword

2015-12-10 Thread Peter Senna Tschudin
off-by: Geyslan G. Bem <geys...@gmail.com> As with previous, missing the changelog, but other than that the patch looks good to me. Acked-by: Peter Senna Tschudin <peter.se...@gmail.com> > --- > drivers/usb/host/ehci.h | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) &g

Re: [PATCH 1/9v2] usb: host: ehci.h: remove space before comma

2015-12-10 Thread Peter Senna Tschudin
fter the ---) what changed from V1. Other than that: Acked-by: Peter Senna Tschudin <peter.se...@gmail.com> Not related to this patch, I did not receive patch 9/9v2. > drivers/usb/host/ehci.h | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drive

Re: [PATCH 8/9v2] usb: host: ehci.h: move pointer operator to name side

2015-12-10 Thread Peter Senna Tschudin
vious, missing the changelog, but other than that the patch looks good to me. Acked-by: Peter Senna Tschudin <peter.se...@gmail.com> > --- > drivers/usb/host/ehci.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/host/ehci.h b/drivers/usb/hos

Re: [PATCH 7/9v2] usb: host: ehci.h: remove macros trailing semicolon

2015-12-10 Thread Peter Senna Tschudin
, missing the changelog, but other than that the patch looks good to me. Acked-by: Peter Senna Tschudin <peter.se...@gmail.com> > --- > drivers/usb/host/ehci.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host

Re: [PATCH 6/9v2] usb: host: ehci.h: use space after comma

2015-12-10 Thread Peter Senna Tschudin
On Wed, Dec 09, 2015 at 07:32:35PM -0300, Geyslan G. Bem wrote: > Put space after comma. > > This patch also changes QH_NEXT macro for better reading. > > Caught by checkpatch: "ERROR: space required after that ','" > > Signed-off-by: Geyslan G. Bem > --- >

Re: [PATCH 9/9] usb: host: ehci.h: move constant to right

2015-12-10 Thread Peter Senna Tschudin
ail.com> Acked-by: Peter Senna Tschudin <peter.se...@gmail.com> > --- > drivers/usb/host/ehci.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h > index 81e609a..de94555 100644 > --- a/drivers/usb/h

Re: [PATCH] usb: use BUG_ON() instead of BUG()

2015-12-07 Thread Peter Senna Tschudin
On Wed, Dec 2, 2015 at 11:18 PM, Geyslan G. Bem wrote: > Replace BUG() with BUG_ON(). > > Caught by coccinelle. I would mention the path to the .cocci script, but other than that: Acked-by: Peter Senna Tschudin > > Signed-off-by: Geyslan G. Bem > --- > drivers/usb/ho

Re: [PATCH] usb: ehci: ohci: fix bool assignments

2015-12-07 Thread Peter Senna Tschudin
Geyslan G. Bem Acked-by: Peter Senna Tschudin > --- > drivers/usb/host/ehci-hcd.c | 2 +- > drivers/usb/host/ohci-hcd.c | 4 ++-- > drivers/usb/host/u132-hcd.c | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/us

Re: [PATCH] usb: whci: fhci: remove comparison to bool

2015-12-07 Thread Peter Senna Tschudin
On Wed, Dec 2, 2015 at 10:45 PM, Geyslan G. Bem wrote: > Get rid of bool explicit comparisons. > > Caught by Coccinelle. I would mention the path to the .cocci script, but other than that: Acked-by: Peter Senna Tschudin > > Signed-off-by: Geyslan G. Bem > --- > driver

Re: [PATCH 3/3] usb: xhci: replace dma_pool_alloc and memset with dma_pool_zalloc

2015-12-07 Thread Peter Senna Tschudin
On Wed, Dec 2, 2015 at 9:43 PM, Geyslan G. Bem wrote: > Replace dma_pool_alloc and memset with a single call to dma_pool_zalloc. > > Caught by coccinelle. I would mention which script was used, but other than that: Acked-by: Peter Senna Tschudin > > Signed-off-by:

Re: [PATCH] ia64: bitvector_process could read out of bounds

2015-12-07 Thread Peter Senna Tschudin
w suffixes are unrelated to current ia64 vm magnitudes, they > make the code ready for it and avoid misleadings. I would mention that you also fix some white space issues, but other than that: Acked-by: Peter Senna Tschudin > > Catched using static analysis (cppcheck). > > Signed-

Re: [PATCH] ia64: bitvector_process could read out of bounds

2015-12-07 Thread Peter Senna Tschudin
were added. > Despite the new suffixes are unrelated to current ia64 vm magnitudes, they > make the code ready for it and avoid misleadings. I would mention that you also fix some white space issues, but other than that: Acked-by: Peter Senna Tschudin <peter.se...@gmail.com> > >

Re: [PATCH] usb: whci: fhci: remove comparison to bool

2015-12-07 Thread Peter Senna Tschudin
On Wed, Dec 2, 2015 at 10:45 PM, Geyslan G. Bem <geys...@gmail.com> wrote: > Get rid of bool explicit comparisons. > > Caught by Coccinelle. I would mention the path to the .cocci script, but other than that: Acked-by: Peter Senna Tschudin <peter.se...@gmail.com> > > Si

Re: [PATCH] usb: ehci: ohci: fix bool assignments

2015-12-07 Thread Peter Senna Tschudin
> Signed-off-by: Geyslan G. Bem <geys...@gmail.com> Acked-by: Peter Senna Tschudin <peter.se...@gmail.com> > --- > drivers/usb/host/ehci-hcd.c | 2 +- > drivers/usb/host/ohci-hcd.c | 4 ++-- > drivers/usb/host/u132-hcd.c | 2 +- > 3 files changed, 4 insertions(+),

Re: [PATCH 3/3] usb: xhci: replace dma_pool_alloc and memset with dma_pool_zalloc

2015-12-07 Thread Peter Senna Tschudin
On Wed, Dec 2, 2015 at 9:43 PM, Geyslan G. Bem <geys...@gmail.com> wrote: > Replace dma_pool_alloc and memset with a single call to dma_pool_zalloc. > > Caught by coccinelle. I would mention which script was used, but other than that: Acked-by: Peter Senna Tschudin <pet

Re: [PATCH] usb: use BUG_ON() instead of BUG()

2015-12-07 Thread Peter Senna Tschudin
On Wed, Dec 2, 2015 at 11:18 PM, Geyslan G. Bem <geys...@gmail.com> wrote: > Replace BUG() with BUG_ON(). > > Caught by coccinelle. I would mention the path to the .cocci script, but other than that: Acked-by: Peter Senna Tschudin <peter.se...@gmail.com> > > Signed-o

[PATCH 3/9 V2] usb/host/fotg210: Remove return statement inside if

2015-10-17 Thread Peter Senna Tschudin
This patch make changes to an if else statement which simplifies the code allowing to remove a return. CC: Joe Perches Signed-off-by: Peter Senna Tschudin --- Subject was: [PATCH 3/9] usb/host/fotg210: Remove useless else statement To be applied on top of V1. Changes from V1: Instead

[PATCH 3/9 V2] usb/host/fotg210: Remove return statement inside if

2015-10-17 Thread Peter Senna Tschudin
This patch make changes to an if else statement which simplifies the code allowing to remove a return. CC: Joe Perches <j...@perches.com> Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- Subject was: [PATCH 3/9] usb/host/fotg210: Remove useless else statement To be ap

[PATCH 3/9] usb/host/fotg210: Remove useless else statement

2015-10-12 Thread Peter Senna Tschudin
This patch remove an else statement after a return to make the code easier to understand. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210

[PATCH 1/9] usb/host/fotg210: Fix coding style issues

2015-10-12 Thread Peter Senna Tschudin
This patch fix coding style issues reported by checkpatch that do not change semantics of the code. Signed-off-by: Peter Senna Tschudin --- This patch introduces one checkpatch warning for line over 80 characters, but my personal feeling is that it looks better and easier to read this way

[PATCH 2/9] usb/host/fotg210: remove KERN_WARNING from pr_warn

2015-10-12 Thread Peter Senna Tschudin
This patch remove KERN_WARNING from a call to pr_warn(). Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c index d80b2e8..25885ef 100644

[PATCH 7/9] usb/host/fotg210: convert macro to inline function

2015-10-12 Thread Peter Senna Tschudin
This patch convert the macro speed_char in an inline function. The goal of this patch is to make the code easier to read. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git

[PATCH 4/9] usb/host/fotg210: Remove NULL checks dma_pool_destroy

2015-10-12 Thread Peter Senna Tschudin
This patch remove NULL checks before calls to dma_pool_destroy() as the function now can handle NULL pointers. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/usb/host/fotg210-hcd.c b

[PATCH 0/9] usb/host/fotg210: code style and warning fixes

2015-10-12 Thread Peter Senna Tschudin
This patch series fix warnings reported by checkpatch on the FOTG210 EHCI-like driver. Peter Senna Tschudin (9): usb/host/fotg210: Fix coding style issues usb/host/fotg210: remove KERN_WARNING from pr_warn usb/host/fotg210: Remove useless else statement usb/host/fotg210: Remove NULL

[PATCH 6/9] usb/host/fotg210: replace msleep by usleep_range

2015-10-12 Thread Peter Senna Tschudin
msleep under 20ms can result in sleeping up to 20ms, which may not be intended. Replace msleep(5) by usleep_range(5000, 1). The range of 5 ms is to reduce the chances of creating an interrupt while reducing the maximum wait time in 50%. Signed-off-by: Peter Senna Tschudin --- drivers/usb

[PATCH 8/9] usb/host/fotg210: Add function: output_buf_tds_dir()

2015-10-12 Thread Peter Senna Tschudin
a new function named output_buf_tds_dir(). This change makes the code easier to read and calm down checkpatch. This patch changes it to: fill_periodic_buffer() -> for() -> do -> switch() -> if() -> output_buf_tds_dir() Signed-off-by: Peter Senna Tschudin --- drive

[PATCH 5/9] usb/host/fotg210: change kmalloc by kmalloc_array

2015-10-12 Thread Peter Senna Tschudin
This patch replaces: kmalloc(DBG_SCHED_LIMIT * sizeof(*seen), GFP_ATOMIC) by: kmalloc_array(DBG_SCHED_LIMIT, sizeof(*seen), GFP_ATOMIC) as kmalloc_array() should be used for allocating arrays. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 2 +- 1 file changed, 1

[PATCH 9/9] usb/host/fotg210: Add function scan_frame_queue()

2015-10-12 Thread Peter Senna Tschudin
d scan_frame_queue() containing the last 4 nesting levels, and removes the need of backwards goto, making the code easier to read. After the patch it becomes: scan_iosoc() -> for() -> while() -> scan_frame_queue() Signed-off-by: Peter Senna Tschudin --- drivers/u

[PATCH 2/9] usb/host/fotg210: remove KERN_WARNING from pr_warn

2015-10-12 Thread Peter Senna Tschudin
This patch remove KERN_WARNING from a call to pr_warn(). Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- drivers/usb/host/fotg210-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c

[PATCH 4/9] usb/host/fotg210: Remove NULL checks dma_pool_destroy

2015-10-12 Thread Peter Senna Tschudin
This patch remove NULL checks before calls to dma_pool_destroy() as the function now can handle NULL pointers. Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- drivers/usb/host/fotg210-hcd.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/d

[PATCH 0/9] usb/host/fotg210: code style and warning fixes

2015-10-12 Thread Peter Senna Tschudin
This patch series fix warnings reported by checkpatch on the FOTG210 EHCI-like driver. Peter Senna Tschudin (9): usb/host/fotg210: Fix coding style issues usb/host/fotg210: remove KERN_WARNING from pr_warn usb/host/fotg210: Remove useless else statement usb/host/fotg210: Remove NULL

[PATCH 7/9] usb/host/fotg210: convert macro to inline function

2015-10-12 Thread Peter Senna Tschudin
This patch convert the macro speed_char in an inline function. The goal of this patch is to make the code easier to read. Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- drivers/usb/host/fotg210-hcd.c | 27 --- 1 file changed, 16 insertions(

[PATCH 3/9] usb/host/fotg210: Remove useless else statement

2015-10-12 Thread Peter Senna Tschudin
This patch remove an else statement after a return to make the code easier to understand. Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- drivers/usb/host/fotg210-hcd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/fotg210-h

[PATCH 1/9] usb/host/fotg210: Fix coding style issues

2015-10-12 Thread Peter Senna Tschudin
This patch fix coding style issues reported by checkpatch that do not change semantics of the code. Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- This patch introduces one checkpatch warning for line over 80 characters, but my personal feeling is that it looks better and

[PATCH 9/9] usb/host/fotg210: Add function scan_frame_queue()

2015-10-12 Thread Peter Senna Tschudin
d scan_frame_queue() containing the last 4 nesting levels, and removes the need of backwards goto, making the code easier to read. After the patch it becomes: scan_iosoc() -> for() -> while() -> scan_frame_queue() Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- dri

[PATCH 8/9] usb/host/fotg210: Add function: output_buf_tds_dir()

2015-10-12 Thread Peter Senna Tschudin
a new function named output_buf_tds_dir(). This change makes the code easier to read and calm down checkpatch. This patch changes it to: fill_periodic_buffer() -> for() -> do -> switch() -> if() -> output_buf_tds_dir() Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.c

[PATCH 5/9] usb/host/fotg210: change kmalloc by kmalloc_array

2015-10-12 Thread Peter Senna Tschudin
This patch replaces: kmalloc(DBG_SCHED_LIMIT * sizeof(*seen), GFP_ATOMIC) by: kmalloc_array(DBG_SCHED_LIMIT, sizeof(*seen), GFP_ATOMIC) as kmalloc_array() should be used for allocating arrays. Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- drivers/usb/host/fotg210-hcd

[PATCH 6/9] usb/host/fotg210: replace msleep by usleep_range

2015-10-12 Thread Peter Senna Tschudin
msleep under 20ms can result in sleeping up to 20ms, which may not be intended. Replace msleep(5) by usleep_range(5000, 1). The range of 5 ms is to reduce the chances of creating an interrupt while reducing the maximum wait time in 50%. Signed-off-by: Peter Senna Tschudin <peter

Re: [PATCH 06/14] RFC: usb/host/fotg210: replace msleep by usleep_range

2015-10-04 Thread Peter Senna Tschudin
On Fri, Oct 2, 2015 at 7:52 PM, Alan Stern wrote: > On Fri, 2 Oct 2015, Felipe Balbi wrote: > >> On Mon, Sep 21, 2015 at 05:01:10PM +0200, Peter Senna Tschudin wrote: >> > msleep under 20ms can result in sleeping up to 20ms, which may not be >> > intended. Replace

Re: [PATCH 06/14] RFC: usb/host/fotg210: replace msleep by usleep_range

2015-10-04 Thread Peter Senna Tschudin
On Fri, Oct 2, 2015 at 7:52 PM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Fri, 2 Oct 2015, Felipe Balbi wrote: > >> On Mon, Sep 21, 2015 at 05:01:10PM +0200, Peter Senna Tschudin wrote: >> > msleep under 20ms can result in sleeping up to 20ms, which may no

Re: [PATCH] usb-host: Remove fusbh200 driver

2015-10-03 Thread Peter Senna Tschudin
On Fri, Oct 2, 2015 at 7:39 PM, Felipe Balbi wrote: > On Fri, Oct 02, 2015 at 01:18:27PM +0200, Peter Senna Tschudin wrote: >> fusbh200 and fotg210 are very similar. The initial idea was to consolidate >> both drivers but I'm afraid fusbh200 is not being used. >> >> Thi

Re: [PATCH] usb-host: Remove fusbh200 driver

2015-10-03 Thread Peter Senna Tschudin
On Fri, Oct 2, 2015 at 7:39 PM, Felipe Balbi <ba...@ti.com> wrote: > On Fri, Oct 02, 2015 at 01:18:27PM +0200, Peter Senna Tschudin wrote: >> fusbh200 and fotg210 are very similar. The initial idea was to consolidate >> both drivers but I'm afraid fusbh200 is not being u

Re: similar files: fusbh200-hcd.c and fotg210-hcd.c

2015-09-25 Thread Peter Senna Tschudin
On Tue, Sep 15, 2015 at 6:50 PM, Felipe Balbi wrote: > Hi, > > On Tue, Sep 15, 2015 at 06:41:55PM +0200, Peter Senna Tschudin wrote: >> On Tue, Sep 15, 2015 at 4:33 PM, Felipe Balbi wrote: >> > On Mon, Sep 14, 2015 at 07:50:02PM +0200, Peter Senna Tschudin wrote: >>

Re: similar files: fusbh200-hcd.c and fotg210-hcd.c

2015-09-25 Thread Peter Senna Tschudin
On Tue, Sep 15, 2015 at 6:50 PM, Felipe Balbi <ba...@ti.com> wrote: > Hi, > > On Tue, Sep 15, 2015 at 06:41:55PM +0200, Peter Senna Tschudin wrote: >> On Tue, Sep 15, 2015 at 4:33 PM, Felipe Balbi <ba...@ti.com> wrote: >> > On Mon, Sep 14, 2015 at 07:50:02

[PATCH 03/14] RFC: usb/host/fotg210: Remove useless else statement

2015-09-21 Thread Peter Senna Tschudin
This patch remove an else statement after a return to make the code easier to understand. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210

[PATCH 04/14] RFC: usb/host/fotg210: Remove NULL checks dma_pool_destroy

2015-09-21 Thread Peter Senna Tschudin
This patch remove NULL checks before calls to dma_pool_destroy() as the function now can handle NULL pointers. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/usb/host/fotg210-hcd.c b

[PATCH 08/14] RFC: usb/host/fotg210: convert macro to inline function

2015-09-21 Thread Peter Senna Tschudin
This patch convert the macro speed_char in an inline function. The goal of this patch is to make the code easier to read. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git

[PATCH 01/14] RFC: usb/host/fotg210: Fix coding style issues

2015-09-21 Thread Peter Senna Tschudin
This patch fix coding style issues reported by checkpatch that do not change semantics of the code. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 1248 +--- drivers/usb/host/fotg210.h | 36 +- 2 files changed, 558 insertions

[PATCH 07/14] RFC: usb/host/fotg210: Remove a macro from snprintf

2015-09-21 Thread Peter Senna Tschudin
This patch removes a macro from a call to snprintf() and moves it's content to just before the call to snprintf() assigning a value to a new variable named tmp. The goal of this patch is to make the code easier to understand. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210

[PATCH 06/14] RFC: usb/host/fotg210: replace msleep by usleep_range

2015-09-21 Thread Peter Senna Tschudin
msleep under 20ms can result in sleeping up to 20ms, which may not be intended. Replace msleep(5) by usleep_range(5000, 6000). Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/fotg210

[PATCH 13/14] RFC: usb/host/faraday-hcd: Move #defines outside struct

2015-09-21 Thread Peter Senna Tschudin
For making the code more readable and to facilitate supporting multiple hardware versions, move #defines to outside the struct declaration. This patch also renames fhcd2xx_regs to fotg210_regs as this struct is specific to fotg210. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host

[PATCH 05/14] RFC: usb/host/fotg210: change kmalloc by kmalloc_array

2015-09-21 Thread Peter Senna Tschudin
This patch change: kmalloc(DBG_SCHED_LIMIT * sizeof(*seen), GFP_ATOMIC) by: kmalloc_array(DBG_SCHED_LIMIT, sizeof(*seen), GFP_ATOMIC) as kmalloc_array() should be used for allocating arrays. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 2 +- 1 file changed, 1

[PATCH 02/14] RFC: usb/host/fotg210: remove KERN_WARNING from pr_info

2015-09-21 Thread Peter Senna Tschudin
This patch remove KERN_WARNING from a call to pr_info(). Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c index 48eac34..36413b2 100644

[PATCH 14/14] RFC: usb/host/faraday-hcd: Import FUSBH200 parameters

2015-09-21 Thread Peter Senna Tschudin
This patch adds FUSBH200 parameters to faraday-hcd.h. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/faraday-hcd.h | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/faraday-hcd.h b/drivers/usb/host/faraday

[PATCH 10/14] RFC: usb/host/fotg210: Add function scan_frame_queue()

2015-09-21 Thread Peter Senna Tschudin
d scan_frame_queue() containing the last 4 nesting levels, and removes the need of backwards goto, making the code easier to read. After the patch it becomes: scan_iosoc() -> for() -> while() -> scan_frame_queue() Signed-off-by: Peter Senna Tschudin --- drivers/u

[PATCH 09/14] RFC: usb/host/fotg210: Add function: output_buf_tds_dir()

2015-09-21 Thread Peter Senna Tschudin
to a new inline function named output_buf_tds_dir(). This change makes the code easier to read and calm down checkpatch. This patch changes it to: fill_periodic_buffer() -> for() -> do -> switch() -> if() -> output_buf_tds_dir() Signed-off-by: Peter Senna Tschudin --- drive

[PATCH 00/14] RFC: Consolidation: FUSB200 and FOTG210

2015-09-21 Thread Peter Senna Tschudin
and 10 that may have impact on performance? Or should I wait until I can get some hw to test? - Do you know easy to find and cheap devices using this two host controllers? - Should I worry about drivers/usb/gadget/udc/fotg210-udc.c? Peter Senna Tschudin (14): usb/host/fotg210: Fix coding

[PATCH 01/14] RFC: usb/host/fotg210: Fix coding style issues

2015-09-21 Thread Peter Senna Tschudin
This patch fix coding style issues reported by checkpatch that do not change semantics of the code. Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- drivers/usb/host/fotg210-hcd.c | 1248 +--- drivers/usb/host/fotg210.h | 36 +- 2

[PATCH 08/14] RFC: usb/host/fotg210: convert macro to inline function

2015-09-21 Thread Peter Senna Tschudin
This patch convert the macro speed_char in an inline function. The goal of this patch is to make the code easier to read. Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- drivers/usb/host/fotg210-hcd.c | 27 --- 1 file changed, 16 insertions(

[PATCH 04/14] RFC: usb/host/fotg210: Remove NULL checks dma_pool_destroy

2015-09-21 Thread Peter Senna Tschudin
This patch remove NULL checks before calls to dma_pool_destroy() as the function now can handle NULL pointers. Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- drivers/usb/host/fotg210-hcd.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/d

[PATCH 03/14] RFC: usb/host/fotg210: Remove useless else statement

2015-09-21 Thread Peter Senna Tschudin
This patch remove an else statement after a return to make the code easier to understand. Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- drivers/usb/host/fotg210-hcd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/fotg210-h

[PATCH 09/14] RFC: usb/host/fotg210: Add function: output_buf_tds_dir()

2015-09-21 Thread Peter Senna Tschudin
to a new inline function named output_buf_tds_dir(). This change makes the code easier to read and calm down checkpatch. This patch changes it to: fill_periodic_buffer() -> for() -> do -> switch() -> if() -> output_buf_tds_dir() Signed-off-by: Peter Senna Tschudin <peter.se...

[PATCH 00/14] RFC: Consolidation: FUSB200 and FOTG210

2015-09-21 Thread Peter Senna Tschudin
and 10 that may have impact on performance? Or should I wait until I can get some hw to test? - Do you know easy to find and cheap devices using this two host controllers? - Should I worry about drivers/usb/gadget/udc/fotg210-udc.c? Peter Senna Tschudin (14): usb/host/fotg210: Fix coding

[PATCH 07/14] RFC: usb/host/fotg210: Remove a macro from snprintf

2015-09-21 Thread Peter Senna Tschudin
This patch removes a macro from a call to snprintf() and moves it's content to just before the call to snprintf() assigning a value to a new variable named tmp. The goal of this patch is to make the code easier to understand. Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.

[PATCH 10/14] RFC: usb/host/fotg210: Add function scan_frame_queue()

2015-09-21 Thread Peter Senna Tschudin
d scan_frame_queue() containing the last 4 nesting levels, and removes the need of backwards goto, making the code easier to read. After the patch it becomes: scan_iosoc() -> for() -> while() -> scan_frame_queue() Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- dri

[PATCH 02/14] RFC: usb/host/fotg210: remove KERN_WARNING from pr_info

2015-09-21 Thread Peter Senna Tschudin
This patch remove KERN_WARNING from a call to pr_info(). Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- drivers/usb/host/fotg210-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c

[PATCH 14/14] RFC: usb/host/faraday-hcd: Import FUSBH200 parameters

2015-09-21 Thread Peter Senna Tschudin
This patch adds FUSBH200 parameters to faraday-hcd.h. Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- drivers/usb/host/faraday-hcd.h | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/faraday-h

[PATCH 06/14] RFC: usb/host/fotg210: replace msleep by usleep_range

2015-09-21 Thread Peter Senna Tschudin
msleep under 20ms can result in sleeping up to 20ms, which may not be intended. Replace msleep(5) by usleep_range(5000, 6000). Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- drivers/usb/host/fotg210-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 13/14] RFC: usb/host/faraday-hcd: Move #defines outside struct

2015-09-21 Thread Peter Senna Tschudin
For making the code more readable and to facilitate supporting multiple hardware versions, move #defines to outside the struct declaration. This patch also renames fhcd2xx_regs to fotg210_regs as this struct is specific to fotg210. Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.

[PATCH 05/14] RFC: usb/host/fotg210: change kmalloc by kmalloc_array

2015-09-21 Thread Peter Senna Tschudin
This patch change: kmalloc(DBG_SCHED_LIMIT * sizeof(*seen), GFP_ATOMIC) by: kmalloc_array(DBG_SCHED_LIMIT, sizeof(*seen), GFP_ATOMIC) as kmalloc_array() should be used for allocating arrays. Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- drivers/usb/host/fotg210-hcd

checkpatch: should it count the number of ^---$?

2015-09-18 Thread Peter Senna Tschudin
Now with the correct E-mail for lkml... I sent a patch* that broke some script handling the patch because the commit message has a line that was exactly ---. Should checkpatch count the number of lines with something like ^---$ and warn if this number is greater than 1? Thank you! Peter *

checkpatch: should it count the number of ^---$?

2015-09-18 Thread Peter Senna Tschudin
Now with the correct E-mail for lkml... I sent a patch* that broke some script handling the patch because the commit message has a line that was exactly ---. Should checkpatch count the number of lines with something like ^---$ and warn if this number is greater than 1? Thank you! Peter *

[tip:perf/urgent] perf tools: Bool functions shouldn't return -1

2015-09-17 Thread tip-bot for Peter Senna Tschudin
Commit-ID: bf6445631c6f00882b25516a174d5073ce0c6f81 Gitweb: http://git.kernel.org/tip/bf6445631c6f00882b25516a174d5073ce0c6f81 Author: Peter Senna Tschudin AuthorDate: Thu, 17 Sep 2015 12:08:53 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 17 Sep 2015 15:31:52 -0300 perf

[PATCH] tools-powerpc: Return false instead of -1

2015-09-17 Thread Peter Senna Tschudin
. This issue was found by the following Coccinelle semantic patch: @@ identifier f, ret; constant C; typedef bool; @@ bool f (...){ <+... ret = -C; ... * return ret; ...+> } Signed-off-by: Peter Senna Tschudin --- I could not compile this specific file, but I did some testing on toy ex

[PATCH] tools-perf: Change -1 by false

2015-09-17 Thread Peter Senna Tschudin
if -1 is replaced by true, the diff is empty. This issue was found by the following Coccinelle semantic patch: @@ identifier f; constant C; typedef bool; @@ bool f (...){ <+... * return -C; ...+> } Signed-off-by: Peter Senna Tschudin --- tools/perf/util/util.c | 2 +- 1 file changed,

Re: [PATCH] arch-powerpc: Return false instead of -EFAULT

2015-09-17 Thread Peter Senna Tschudin
On Thu, Sep 17, 2015 at 11:47 AM, Michael Ellerman wrote: > On Thu, 2015-09-17 at 11:18 +0200, Peter Senna Tschudin wrote: >> Returning a negative value for a boolean function seem to have the >> undesired effect of returning true. Replace -EINVAL by false in a >> bo

[PATCH] arch-powerpc: Return false instead of -EFAULT

2015-09-17 Thread Peter Senna Tschudin
ot a trampoline\n"); return -EINVAL; } This issue was found by the following Coccinelle semantic patch: @@ identifier f; constant C; typedef bool; @@ bool f (...){ <+... * return -C; ...+> } Signed-off-by: Peter Senna Tschudin --- arch/powerpc/kernel/module_64.c | 2 +-

Re: [PATCH] arch-powerpc: Return false instead of -EFAULT

2015-09-17 Thread Peter Senna Tschudin
On Thu, Sep 17, 2015 at 11:47 AM, Michael Ellerman <m...@ellerman.id.au> wrote: > On Thu, 2015-09-17 at 11:18 +0200, Peter Senna Tschudin wrote: >> Returning a negative value for a boolean function seem to have the >> undesired effect of returning true. Replace -EINVAL

[PATCH] tools-perf: Change -1 by false

2015-09-17 Thread Peter Senna Tschudin
if -1 is replaced by true, the diff is empty. This issue was found by the following Coccinelle semantic patch: @@ identifier f; constant C; typedef bool; @@ bool f (...){ <+... * return -C; ...+> } Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- tools/perf/util/uti

[PATCH] tools-powerpc: Return false instead of -1

2015-09-17 Thread Peter Senna Tschudin
. This issue was found by the following Coccinelle semantic patch: @@ identifier f, ret; constant C; typedef bool; @@ bool f (...){ <+... ret = -C; ... * return ret; ...+> } Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- I could not compile this specific file, bu

[PATCH] arch-powerpc: Return false instead of -EFAULT

2015-09-17 Thread Peter Senna Tschudin
ot a trampoline\n"); return -EINVAL; } This issue was found by the following Coccinelle semantic patch: @@ identifier f; constant C; typedef bool; @@ bool f (...){ <+... * return -C; ...+> } Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com> --- arch/po

[tip:perf/urgent] perf tools: Bool functions shouldn't return -1

2015-09-17 Thread tip-bot for Peter Senna Tschudin
Commit-ID: bf6445631c6f00882b25516a174d5073ce0c6f81 Gitweb: http://git.kernel.org/tip/bf6445631c6f00882b25516a174d5073ce0c6f81 Author: Peter Senna Tschudin <peter.se...@gmail.com> AuthorDate: Thu, 17 Sep 2015 12:08:53 +0200 Committer: Arnaldo Carvalho de Melo <a...@redhat.com>

Re: similar files: fusbh200-hcd.c and fotg210-hcd.c

2015-09-15 Thread Peter Senna Tschudin
On Tue, Sep 15, 2015 at 4:33 PM, Felipe Balbi wrote: > On Mon, Sep 14, 2015 at 07:50:02PM +0200, Peter Senna Tschudin wrote: >> On Mon, Sep 14, 2015 at 5:01 PM, Felipe Balbi wrote: >> > On Sat, Sep 12, 2015 at 03:14:50PM +0200, Peter Senna Tschudin wrote: >>

Re: similar files: fusbh200-hcd.c and fotg210-hcd.c

2015-09-15 Thread Peter Senna Tschudin
On Tue, Sep 15, 2015 at 4:33 PM, Felipe Balbi <ba...@ti.com> wrote: > On Mon, Sep 14, 2015 at 07:50:02PM +0200, Peter Senna Tschudin wrote: >> On Mon, Sep 14, 2015 at 5:01 PM, Felipe Balbi <ba...@ti.com> wrote: >> > On Sat, Sep 12, 2015 at 03:14:50PM +02

Re: similar files: fusbh200-hcd.c and fotg210-hcd.c

2015-09-14 Thread Peter Senna Tschudin
On Mon, Sep 14, 2015 at 5:01 PM, Felipe Balbi wrote: > On Sat, Sep 12, 2015 at 03:14:50PM +0200, Peter Senna Tschudin wrote: >> >> Should these files be consolidated? And if so how? >> > if you can find an easy way, that would be a very, very welcome patch. >

Re: similar files: fusbh200-hcd.c and fotg210-hcd.c

2015-09-14 Thread Peter Senna Tschudin
On Mon, Sep 14, 2015 at 5:01 PM, Felipe Balbi <ba...@ti.com> wrote: > On Sat, Sep 12, 2015 at 03:14:50PM +0200, Peter Senna Tschudin wrote: >> >> Should these files be consolidated? And if so how? >> > if you can find an easy way, that would be a very, very wel

Re: similar files: fusbh200-hcd.c and fotg210-hcd.c

2015-09-12 Thread Peter Senna Tschudin
>> Should these files be consolidated? And if so how? > if you can find an easy way, that would be a very, very welcome patch. Is the ideal solution to consolidate both fusbh200-hcd.c and fotg210-hcd.c in a single module? If this is the case, how to detect at run time which version of the hw is

Re: similar files: fusbh200-hcd.c and fotg210-hcd.c

2015-09-12 Thread Peter Senna Tschudin
>> Should these files be consolidated? And if so how? > if you can find an easy way, that would be a very, very welcome patch. Is the ideal solution to consolidate both fusbh200-hcd.c and fotg210-hcd.c in a single module? If this is the case, how to detect at run time which version of the hw is

<    1   2   3   4   5   6   7   8   9   10   >