Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] usb: dwc3: remove unused @lock member of dwc3_ep struct
@ 2019-06-20  8:12 Chunfeng Yun
  2019-06-20  8:19 ` Felipe Balbi
  0 siblings, 1 reply; 4+ messages in thread
From: Chunfeng Yun @ 2019-06-20  8:12 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Greg Kroah-Hartman, Matthias Brugger, Chunfeng Yun, linux-usb,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

The member @lock of dwc2_ep struct is only initialized,
and not used elsewhere, so remove it.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/dwc3/core.h   | 2 --
 drivers/usb/dwc3/gadget.c | 2 --
 2 files changed, 4 deletions(-)

diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index f19cbeb01087..72d28cb14bdf 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -649,7 +649,6 @@ struct dwc3_event_buffer {
  * @cancelled_list: list of cancelled requests for this endpoint
  * @pending_list: list of pending requests for this endpoint
  * @started_list: list of started requests on this endpoint
- * @lock: spinlock for endpoint request queue traversal
  * @regs: pointer to first endpoint register
  * @trb_pool: array of transaction buffers
  * @trb_pool_dma: dma address of @trb_pool
@@ -677,7 +676,6 @@ struct dwc3_ep {
 	struct list_head	pending_list;
 	struct list_head	started_list;
 
-	spinlock_t		lock;
 	void __iomem		*regs;
 
 	struct dwc3_trb		*trb_pool;
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index d67655384eb2..7f75da30caba 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2251,8 +2251,6 @@ static int dwc3_gadget_init_endpoint(struct dwc3 *dwc, u8 epnum)
 		dep->endpoint.comp_desc = NULL;
 	}
 
-	spin_lock_init(&dep->lock);
-
 	if (num == 0)
 		ret = dwc3_gadget_init_control_endpoint(dep);
 	else if (direction)
-- 
2.21.0


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

* Re: [PATCH] usb: dwc3: remove unused @lock member of dwc3_ep struct
  2019-06-20  8:12 [PATCH] usb: dwc3: remove unused @lock member of dwc3_ep struct Chunfeng Yun
@ 2019-06-20  8:19 ` Felipe Balbi
  2019-06-20  8:23   ` Chunfeng Yun
  0 siblings, 1 reply; 4+ messages in thread
From: Felipe Balbi @ 2019-06-20  8:19 UTC (permalink / raw)
  To: Chunfeng Yun
  Cc: Greg Kroah-Hartman, Matthias Brugger, Chunfeng Yun, linux-usb,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek


Hi,

Chunfeng Yun <chunfeng.yun@mediatek.com> writes:

> The member @lock of dwc2_ep struct is only initialized,
> and not used elsewhere, so remove it.
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
>  drivers/usb/dwc3/core.h   | 2 --
>  drivers/usb/dwc3/gadget.c | 2 --
>  2 files changed, 4 deletions(-)
>
> diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
> index f19cbeb01087..72d28cb14bdf 100644
> --- a/drivers/usb/dwc3/core.h
> +++ b/drivers/usb/dwc3/core.h
> @@ -649,7 +649,6 @@ struct dwc3_event_buffer {
>   * @cancelled_list: list of cancelled requests for this endpoint
>   * @pending_list: list of pending requests for this endpoint
>   * @started_list: list of started requests on this endpoint
> - * @lock: spinlock for endpoint request queue traversal
>   * @regs: pointer to first endpoint register
>   * @trb_pool: array of transaction buffers
>   * @trb_pool_dma: dma address of @trb_pool
> @@ -677,7 +676,6 @@ struct dwc3_ep {
>  	struct list_head	pending_list;
>  	struct list_head	started_list;
>  
> -	spinlock_t		lock;
>  	void __iomem		*regs;
>  
>  	struct dwc3_trb		*trb_pool;
> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> index d67655384eb2..7f75da30caba 100644
> --- a/drivers/usb/dwc3/gadget.c
> +++ b/drivers/usb/dwc3/gadget.c
> @@ -2251,8 +2251,6 @@ static int dwc3_gadget_init_endpoint(struct dwc3 *dwc, u8 epnum)
>  		dep->endpoint.comp_desc = NULL;
>  	}
>  
> -	spin_lock_init(&dep->lock);

heh, thanks. This is left-over from when I playing with further
paralelizing the driver. Turned out that there are not enough gains to
justify that work. I'll apply this patch.

-- 
balbi

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

* Re: [PATCH] usb: dwc3: remove unused @lock member of dwc3_ep struct
  2019-06-20  8:19 ` Felipe Balbi
@ 2019-06-20  8:23   ` Chunfeng Yun
  2019-06-20  8:51     ` Felipe Balbi
  0 siblings, 1 reply; 4+ messages in thread
From: Chunfeng Yun @ 2019-06-20  8:23 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Greg Kroah-Hartman, Matthias Brugger, linux-usb, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek

Hi,
On Thu, 2019-06-20 at 11:19 +0300, Felipe Balbi wrote:
> Hi,
> 
> Chunfeng Yun <chunfeng.yun@mediatek.com> writes:
> 
> > The member @lock of dwc2_ep struct is only initialized,
> > and not used elsewhere, so remove it.
Sorry, I need send v2 to fix typo of dwc2_ep

> >
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> >  drivers/usb/dwc3/core.h   | 2 --
> >  drivers/usb/dwc3/gadget.c | 2 --
> >  2 files changed, 4 deletions(-)
> >
> > diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
> > index f19cbeb01087..72d28cb14bdf 100644
> > --- a/drivers/usb/dwc3/core.h
> > +++ b/drivers/usb/dwc3/core.h
> > @@ -649,7 +649,6 @@ struct dwc3_event_buffer {
> >   * @cancelled_list: list of cancelled requests for this endpoint
> >   * @pending_list: list of pending requests for this endpoint
> >   * @started_list: list of started requests on this endpoint
> > - * @lock: spinlock for endpoint request queue traversal
> >   * @regs: pointer to first endpoint register
> >   * @trb_pool: array of transaction buffers
> >   * @trb_pool_dma: dma address of @trb_pool
> > @@ -677,7 +676,6 @@ struct dwc3_ep {
> >  	struct list_head	pending_list;
> >  	struct list_head	started_list;
> >  
> > -	spinlock_t		lock;
> >  	void __iomem		*regs;
> >  
> >  	struct dwc3_trb		*trb_pool;
> > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> > index d67655384eb2..7f75da30caba 100644
> > --- a/drivers/usb/dwc3/gadget.c
> > +++ b/drivers/usb/dwc3/gadget.c
> > @@ -2251,8 +2251,6 @@ static int dwc3_gadget_init_endpoint(struct dwc3 *dwc, u8 epnum)
> >  		dep->endpoint.comp_desc = NULL;
> >  	}
> >  
> > -	spin_lock_init(&dep->lock);
> 
> heh, thanks. This is left-over from when I playing with further
> paralelizing the driver. Turned out that there are not enough gains to
> justify that work. I'll apply this patch.
> 



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

* Re: [PATCH] usb: dwc3: remove unused @lock member of dwc3_ep struct
  2019-06-20  8:23   ` Chunfeng Yun
@ 2019-06-20  8:51     ` Felipe Balbi
  0 siblings, 0 replies; 4+ messages in thread
From: Felipe Balbi @ 2019-06-20  8:51 UTC (permalink / raw)
  To: Chunfeng Yun
  Cc: Greg Kroah-Hartman, Matthias Brugger, linux-usb, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek

Hi,

Chunfeng Yun <chunfeng.yun@mediatek.com> writes:

> Hi,
> On Thu, 2019-06-20 at 11:19 +0300, Felipe Balbi wrote:
>> Hi,
>> 
>> Chunfeng Yun <chunfeng.yun@mediatek.com> writes:
>> 
>> > The member @lock of dwc2_ep struct is only initialized,
>> > and not used elsewhere, so remove it.
> Sorry, I need send v2 to fix typo of dwc2_ep

I fixed when applying ;-)

-- 
balbi

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-20  8:12 [PATCH] usb: dwc3: remove unused @lock member of dwc3_ep struct Chunfeng Yun
2019-06-20  8:19 ` Felipe Balbi
2019-06-20  8:23   ` Chunfeng Yun
2019-06-20  8:51     ` Felipe Balbi

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org linux-usb@archiver.kernel.org
	public-inbox-index linux-usb


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/ public-inbox