linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] USB: XHCI: xhci-ring: Remove unused dma address calculation in inc_enq and inc_deq function
@ 2012-05-13 15:29 Girish Verma
  2012-09-05 22:47 ` Sarah Sharp
  2012-09-06 15:47 ` Girish Verma
  0 siblings, 2 replies; 9+ messages in thread
From: Girish Verma @ 2012-05-13 15:29 UTC (permalink / raw)
  To: kernel-janitors, linux-usb; +Cc: linux-kernel, sarah.a.sharp, gregkh

In xhci-ring.c, function inc_enq and inc_deq calculate the dma address
of trb but never used. 

Signed-off-by: Girish Verma <girish@circuitsutra.com>
---
 drivers/usb/host/xhci-ring.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 3d9422f..dcd67c1 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -146,7 +146,6 @@ static void next_trb(struct xhci_hcd *xhci,
 static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring)
 {
 	union xhci_trb *next;
-	unsigned long long addr;
 
 	ring->deq_updates++;
 
@@ -168,7 +167,6 @@ static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring)
 		ring->dequeue = ring->deq_seg->trbs;
 		next = ring->dequeue;
 	}
-	addr = (unsigned long long) xhci_trb_virt_to_dma(ring->deq_seg, ring->dequeue);
 }
 
 /*
@@ -193,7 +191,6 @@ static void inc_enq(struct xhci_hcd *xhci, struct xhci_ring *ring,
 {
 	u32 chain;
 	union xhci_trb *next;
-	unsigned long long addr;
 
 	chain = le32_to_cpu(ring->enqueue->generic.field[3]) & TRB_CHAIN;
 	/* If this is not event ring, there is one less usable TRB */
@@ -245,7 +242,6 @@ static void inc_enq(struct xhci_hcd *xhci, struct xhci_ring *ring,
 		ring->enqueue = ring->enq_seg->trbs;
 		next = ring->enqueue;
 	}
-	addr = (unsigned long long) xhci_trb_virt_to_dma(ring->enq_seg, ring->enqueue);
 }
 
 /*
-- 



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] USB: XHCI: xhci-ring: Remove unused dma address calculation in inc_enq and inc_deq function
  2012-05-13 15:29 [PATCH] USB: XHCI: xhci-ring: Remove unused dma address calculation in inc_enq and inc_deq function Girish Verma
@ 2012-09-05 22:47 ` Sarah Sharp
  2012-09-06 15:47 ` Girish Verma
  1 sibling, 0 replies; 9+ messages in thread
From: Sarah Sharp @ 2012-09-05 22:47 UTC (permalink / raw)
  To: Girish Verma; +Cc: kernel-janitors, linux-usb, linux-kernel, gregkh

Hi Girish,

Sorry for taking a really long time to respond!  This is a good idea,
but your patch doesn't apply any more.  Can you update it against the
latest kernel and resend it?

Sarah Sharp

On Sun, May 13, 2012 at 08:59:02PM +0530, Girish Verma wrote:
> In xhci-ring.c, function inc_enq and inc_deq calculate the dma address
> of trb but never used. 
> 
> Signed-off-by: Girish Verma <girish@circuitsutra.com>
> ---
>  drivers/usb/host/xhci-ring.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> index 3d9422f..dcd67c1 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ -146,7 +146,6 @@ static void next_trb(struct xhci_hcd *xhci,
>  static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring)
>  {
>  	union xhci_trb *next;
> -	unsigned long long addr;
>  
>  	ring->deq_updates++;
>  
> @@ -168,7 +167,6 @@ static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring)
>  		ring->dequeue = ring->deq_seg->trbs;
>  		next = ring->dequeue;
>  	}
> -	addr = (unsigned long long) xhci_trb_virt_to_dma(ring->deq_seg, ring->dequeue);
>  }
>  
>  /*
> @@ -193,7 +191,6 @@ static void inc_enq(struct xhci_hcd *xhci, struct xhci_ring *ring,
>  {
>  	u32 chain;
>  	union xhci_trb *next;
> -	unsigned long long addr;
>  
>  	chain = le32_to_cpu(ring->enqueue->generic.field[3]) & TRB_CHAIN;
>  	/* If this is not event ring, there is one less usable TRB */
> @@ -245,7 +242,6 @@ static void inc_enq(struct xhci_hcd *xhci, struct xhci_ring *ring,
>  		ring->enqueue = ring->enq_seg->trbs;
>  		next = ring->enqueue;
>  	}
> -	addr = (unsigned long long) xhci_trb_virt_to_dma(ring->enq_seg, ring->enqueue);
>  }
>  
>  /*
> -- 
> 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] USB: XHCI: xhci-ring: Remove unused dma address calculation in inc_enq and inc_deq function
  2012-05-13 15:29 [PATCH] USB: XHCI: xhci-ring: Remove unused dma address calculation in inc_enq and inc_deq function Girish Verma
  2012-09-05 22:47 ` Sarah Sharp
@ 2012-09-06 15:47 ` Girish Verma
  2012-09-06 18:28   ` Sarah Sharp
  2012-09-07 10:46   ` Sergei Shtylyov
  1 sibling, 2 replies; 9+ messages in thread
From: Girish Verma @ 2012-09-06 15:47 UTC (permalink / raw)
  To: kernel-janitors; +Cc: linux-usb, linux-kernel, sarah.a.sharp, gregkh

Resending patch with latest kernel code:
In xhci-ring.c, function inc_enq and inc_deq calculate the dma address
of trb but never used. 



Signed-off-by: Girish Verma <girish@circuitsutra.com>
---
 drivers/usb/host/xhci-ring.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 643c2f3..5c5c47b 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -145,7 +145,6 @@ static void next_trb(struct xhci_hcd *xhci,
  */
 static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring)
 {
-	unsigned long long addr;
 
 	ring->deq_updates++;
 
@@ -176,7 +175,6 @@ static void inc_deq(struct xhci_hcd *xhci, struct
xhci_ring *ring)
 		}
 	} while (last_trb(xhci, ring, ring->deq_seg, ring->dequeue));
 
-	addr = (unsigned long long) xhci_trb_virt_to_dma(ring->deq_seg,
ring->dequeue);
 }
 
 /*
@@ -201,7 +199,6 @@ static void inc_enq(struct xhci_hcd *xhci, struct
xhci_ring *ring,
 {
 	u32 chain;
 	union xhci_trb *next;
-	unsigned long long addr;
 
 	chain = le32_to_cpu(ring->enqueue->generic.field[3]) & TRB_CHAIN;
 	/* If this is not event ring, there is one less usable TRB */
@@ -253,7 +250,6 @@ static void inc_enq(struct xhci_hcd *xhci, struct
xhci_ring *ring,
 		ring->enqueue = ring->enq_seg->trbs;
 		next = ring->enqueue;
 	}
-	addr = (unsigned long long) xhci_trb_virt_to_dma(ring->enq_seg,
ring->enqueue);
 }
 
 /*
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] USB: XHCI: xhci-ring: Remove unused dma address calculation in inc_enq and inc_deq function
  2012-09-06 15:47 ` Girish Verma
@ 2012-09-06 18:28   ` Sarah Sharp
  2012-11-11 23:36     ` Yuhong Bao
  2012-09-07 10:46   ` Sergei Shtylyov
  1 sibling, 1 reply; 9+ messages in thread
From: Sarah Sharp @ 2012-09-06 18:28 UTC (permalink / raw)
  To: Girish Verma; +Cc: kernel-janitors, linux-usb, linux-kernel, gregkh

Hmm, your patch got corrupted:

sarah@xanatos:~/git/kernels/xhci$ git am -s -3 ~/Maildir.fetchmail/.to-apply-next/
Applying: USB: XHCI: xhci-ring: Remove unused dma address calculation in inc_enq and inc_deq function
fatal: corrupt patch at line 18
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 USB: XHCI: xhci-ring: Remove unused dma address calculation in inc_enq and inc_deq function
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".

It looks like your mail client attempted to line wrap it.  You might
want to use mutt, thunderbird, or maybe even the plain text gmail
interface to resend this.

Also...

On Thu, Sep 06, 2012 at 09:17:33PM +0530, Girish Verma wrote:
> Resending patch with latest kernel code:

^^^ Don't include this line in your patch description.  Otherwise it
will be in the git history forever.  If you want to add comments to me
like this, you can edit the patch before you send it in your email
client, and put comments...

> In xhci-ring.c, function inc_enq and inc_deq calculate the dma address
> of trb but never used. 
> 
> 
> 
> Signed-off-by: Girish Verma <girish@circuitsutra.com>
> ---

...here, after the --- line and before the diff stat.  patch will ignore
any lines after the dash line up until the first @ line.

Finally, please remove the two newlines between your patch description
and the signed-off-by line.  Thanks!

>  drivers/usb/host/xhci-ring.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> index 643c2f3..5c5c47b 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ -145,7 +145,6 @@ static void next_trb(struct xhci_hcd *xhci,
>   */
>  static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring)
>  {
> -	unsigned long long addr;
>  
>  	ring->deq_updates++;
>  
> @@ -176,7 +175,6 @@ static void inc_deq(struct xhci_hcd *xhci, struct
> xhci_ring *ring)
>  		}
>  	} while (last_trb(xhci, ring, ring->deq_seg, ring->dequeue));
>  
> -	addr = (unsigned long long) xhci_trb_virt_to_dma(ring->deq_seg,
> ring->dequeue);
>  }
>  
>  /*
> @@ -201,7 +199,6 @@ static void inc_enq(struct xhci_hcd *xhci, struct
> xhci_ring *ring,
>  {
>  	u32 chain;
>  	union xhci_trb *next;
> -	unsigned long long addr;
>  
>  	chain = le32_to_cpu(ring->enqueue->generic.field[3]) & TRB_CHAIN;
>  	/* If this is not event ring, there is one less usable TRB */
> @@ -253,7 +250,6 @@ static void inc_enq(struct xhci_hcd *xhci, struct
> xhci_ring *ring,
>  		ring->enqueue = ring->enq_seg->trbs;
>  		next = ring->enqueue;
>  	}
> -	addr = (unsigned long long) xhci_trb_virt_to_dma(ring->enq_seg,
> ring->enqueue);
>  }
>  
>  /*
> -- 
> 1.7.0.4
> 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] USB: XHCI: xhci-ring: Remove unused dma address calculation in inc_enq and inc_deq function
  2012-09-06 15:47 ` Girish Verma
  2012-09-06 18:28   ` Sarah Sharp
@ 2012-09-07 10:46   ` Sergei Shtylyov
  1 sibling, 0 replies; 9+ messages in thread
From: Sergei Shtylyov @ 2012-09-07 10:46 UTC (permalink / raw)
  To: Girish Verma
  Cc: kernel-janitors, linux-usb, linux-kernel, sarah.a.sharp, gregkh

Hello.

On 06-09-2012 19:47, Girish Verma wrote:

> Resending patch with latest kernel code:

    That comment should have been put after the --- tear line.

> In xhci-ring.c, function inc_enq and inc_deq calculate the dma address
> of trb but never used.



> Signed-off-by: Girish Verma <girish@circuitsutra.com>
> ---
>   drivers/usb/host/xhci-ring.c |    4 ----
>   1 files changed, 0 insertions(+), 4 deletions(-)

> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> index 643c2f3..5c5c47b 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ -145,7 +145,6 @@ static void next_trb(struct xhci_hcd *xhci,
>    */
>   static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring)
>   {
> -	unsigned long long addr;
>
>   	ring->deq_updates++;
>
> @@ -176,7 +175,6 @@ static void inc_deq(struct xhci_hcd *xhci, struct
> xhci_ring *ring)
>   		}
>   	} while (last_trb(xhci, ring, ring->deq_seg, ring->dequeue));
>
> -	addr = (unsigned long long) xhci_trb_virt_to_dma(ring->deq_seg,
> ring->dequeue);
>   }
>
>   /*
> @@ -201,7 +199,6 @@ static void inc_enq(struct xhci_hcd *xhci, struct
> xhci_ring *ring,
>   {
>   	u32 chain;
>   	union xhci_trb *next;
> -	unsigned long long addr;
>
>   	chain = le32_to_cpu(ring->enqueue->generic.field[3]) & TRB_CHAIN;
>   	/* If this is not event ring, there is one less usable TRB */
> @@ -253,7 +250,6 @@ static void inc_enq(struct xhci_hcd *xhci, struct
> xhci_ring *ring,
>   		ring->enqueue = ring->enq_seg->trbs;
>   		next = ring->enqueue;
>   	}
> -	addr = (unsigned long long) xhci_trb_virt_to_dma(ring->enq_seg,
> ring->enqueue);

    The patch is line wrapped. Should be easy to fix by hand when applying 
though...

WBR, Sergei


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] USB: XHCI: xhci-ring: Remove unused dma address calculation in inc_enq and inc_deq function
  2012-09-06 18:28   ` Sarah Sharp
@ 2012-11-11 23:36     ` Yuhong Bao
  0 siblings, 0 replies; 9+ messages in thread
From: Yuhong Bao @ 2012-11-11 23:36 UTC (permalink / raw)
  To: Sarah Sharp, Girish Verma
  Cc: kernel-janitors, linux-usb, linux-kernel, gregkh

> It looks like your mail client attempted to line wrap it. You might
> want to use mutt, thunderbird, or maybe even the plain text gmail
> interface to resend this.
If anyone is using Outlook, see this:
https://lkml.org/lkml/2011/1/25/587

Yuhong Bao 		 	   		  

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] USB: XHCI: xhci-ring: Remove unused dma address calculation in inc_enq and inc_deq function
  2012-05-13 13:34 ` Sergei Shtylyov
@ 2012-05-13 14:00   ` Girish Verma
  0 siblings, 0 replies; 9+ messages in thread
From: Girish Verma @ 2012-05-13 14:00 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: kernel-janitors, linux-usb, linux-kernel, sarah.a.sharp, gregkh

Thank for the information, I will resend the patch

On Sun, May 13, 2012 at 7:04 PM, Sergei Shtylyov <sshtylyov@mvista.com> wrote:
> Hello.
>
> On 13-05-2012 5:06, Girish Verma wrote:
>
>> Hi,
>
>
>   Greeting shouldn't be a part of the changelog.
>
>
>> in xhci-ring.c, function inc_enq and inc_deq calculate the dma address
>> of trb but never used. This calculation may be used for debugging
>> purpose, in that case this code should be part of debug flag.
>
>
>> Signed-off-by: Girish Verma<girish@circuitsutra.com>
>> ---
>>  drivers/usb/host/xhci-ring.c |    4 ----
>>  1 files changed, 0 insertions(+), 4 deletions(-)
>
>
>> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
>> index 3d9422f..dcd67c1 100644
>> --- a/drivers/usb/host/xhci-ring.c
>> +++ b/drivers/usb/host/xhci-ring.c
>
> [...]
>
>> @@ -168,7 +167,6 @@ static void inc_deq(struct xhci_hcd *xhci, struct
>> xhci_ring *ring)
>>                ring->dequeue = ring->deq_seg->trbs;
>>                next = ring->dequeue;
>>        }
>> -       addr = (unsigned long long) xhci_trb_virt_to_dma(ring->deq_seg,
>> ring->dequeue);
>
>
>   Your patch is line-wrapped. Maybe the amintainer would be able to fix this
> tho...
>
> WBR, Sergei

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] USB: XHCI: xhci-ring: Remove unused dma address calculation in inc_enq and inc_deq function
  2012-05-13  1:06 Girish Verma
@ 2012-05-13 13:34 ` Sergei Shtylyov
  2012-05-13 14:00   ` Girish Verma
  0 siblings, 1 reply; 9+ messages in thread
From: Sergei Shtylyov @ 2012-05-13 13:34 UTC (permalink / raw)
  To: Girish Verma
  Cc: kernel-janitors, linux-usb, linux-kernel, sarah.a.sharp, gregkh

Hello.

On 13-05-2012 5:06, Girish Verma wrote:

> Hi,

    Greeting shouldn't be a part of the changelog.

> in xhci-ring.c, function inc_enq and inc_deq calculate the dma address
> of trb but never used. This calculation may be used for debugging
> purpose, in that case this code should be part of debug flag.

> Signed-off-by: Girish Verma<girish@circuitsutra.com>
> ---
>   drivers/usb/host/xhci-ring.c |    4 ----
>   1 files changed, 0 insertions(+), 4 deletions(-)

> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> index 3d9422f..dcd67c1 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
[...]
> @@ -168,7 +167,6 @@ static void inc_deq(struct xhci_hcd *xhci, struct
> xhci_ring *ring)
>   		ring->dequeue = ring->deq_seg->trbs;
>   		next = ring->dequeue;
>   	}
> -	addr = (unsigned long long) xhci_trb_virt_to_dma(ring->deq_seg,
> ring->dequeue);

    Your patch is line-wrapped. Maybe the amintainer would be able to fix this 
tho...

WBR, Sergei

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] USB: XHCI: xhci-ring: Remove unused dma address calculation in inc_enq and inc_deq function
@ 2012-05-13  1:06 Girish Verma
  2012-05-13 13:34 ` Sergei Shtylyov
  0 siblings, 1 reply; 9+ messages in thread
From: Girish Verma @ 2012-05-13  1:06 UTC (permalink / raw)
  To: kernel-janitors, linux-usb; +Cc: linux-kernel, sarah.a.sharp, gregkh

Hi,

in xhci-ring.c, function inc_enq and inc_deq calculate the dma address
of trb but never used. This calculation may be used for debugging
purpose, in that case this code should be part of debug flag.

Signed-off-by: Girish Verma <girish@circuitsutra.com>
---
 drivers/usb/host/xhci-ring.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 3d9422f..dcd67c1 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -146,7 +146,6 @@ static void next_trb(struct xhci_hcd *xhci,
 static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring)
 {
 	union xhci_trb *next;
-	unsigned long long addr;

 	ring->deq_updates++;

@@ -168,7 +167,6 @@ static void inc_deq(struct xhci_hcd *xhci, struct
xhci_ring *ring)
 		ring->dequeue = ring->deq_seg->trbs;
 		next = ring->dequeue;
 	}
-	addr = (unsigned long long) xhci_trb_virt_to_dma(ring->deq_seg,
ring->dequeue);
 }

 /*
@@ -193,7 +191,6 @@ static void inc_enq(struct xhci_hcd *xhci, struct
xhci_ring *ring,
 {
 	u32 chain;
 	union xhci_trb *next;
-	unsigned long long addr;

 	chain = le32_to_cpu(ring->enqueue->generic.field[3]) & TRB_CHAIN;
 	/* If this is not event ring, there is one less usable TRB */
@@ -245,7 +242,6 @@ static void inc_enq(struct xhci_hcd *xhci, struct
xhci_ring *ring,
 		ring->enqueue = ring->enq_seg->trbs;
 		next = ring->enqueue;
 	}
-	addr = (unsigned long long) xhci_trb_virt_to_dma(ring->enq_seg,
ring->enqueue);
 }

 /*
--

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-11-11 23:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-13 15:29 [PATCH] USB: XHCI: xhci-ring: Remove unused dma address calculation in inc_enq and inc_deq function Girish Verma
2012-09-05 22:47 ` Sarah Sharp
2012-09-06 15:47 ` Girish Verma
2012-09-06 18:28   ` Sarah Sharp
2012-11-11 23:36     ` Yuhong Bao
2012-09-07 10:46   ` Sergei Shtylyov
  -- strict thread matches above, loose matches on Subject: below --
2012-05-13  1:06 Girish Verma
2012-05-13 13:34 ` Sergei Shtylyov
2012-05-13 14:00   ` Girish Verma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).