Re: [PATCH v2] usb: xhci: Remove unuseful 'return' and 'break' statement

2016-11-28 Thread Baolin Wang
On 28 November 2016 at 23:14, Mathias Nyman
 wrote:
> On 28.11.2016 09:41, Baolin Wang wrote:
>>
>> On 28 November 2016 at 15:21, Greg KH  wrote:
>>>
>>> On Mon, Nov 28, 2016 at 02:29:25PM +0800, Baolin Wang wrote:

 Hi Mathias,

 On 24 November 2016 at 19:16, Baolin Wang 
 wrote:
>
> Since these 'return' statements are not generally useful in void
> function, remove them. Also remove one unuseful 'break' statement
> in xhci_setup_addressable_virt_dev() function.
>
> Signed-off-by: Baolin Wang 
> ---
> Changes since v1:
>   - Add description of removing 'break' statement in commitlog.
> ---


 Could you apply this patch if there are no other comments? Thanks.
>>>
>>>
>>> Less than a week response for a simple cleanup patch?  Why the rush and
>>> pressure?  Relax, this really isn't an important patch...
>>
>>
>> I am sorry for the pressure, I just thought it is one simple cleanup
>> patch. It is okay for me to wait for.
>>
>
> Looks ok.
>
> If it applies I'll send it forward to usb-next after 4.10-rc1,
> It should end up in 4.11

Thanks.

-- 
Baolin.wang
Best Regards
--
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 v2] usb: xhci: Remove unuseful 'return' and 'break' statement

2016-11-28 Thread Mathias Nyman

On 28.11.2016 09:41, Baolin Wang wrote:

On 28 November 2016 at 15:21, Greg KH  wrote:

On Mon, Nov 28, 2016 at 02:29:25PM +0800, Baolin Wang wrote:

Hi Mathias,

On 24 November 2016 at 19:16, Baolin Wang  wrote:

Since these 'return' statements are not generally useful in void
function, remove them. Also remove one unuseful 'break' statement
in xhci_setup_addressable_virt_dev() function.

Signed-off-by: Baolin Wang 
---
Changes since v1:
  - Add description of removing 'break' statement in commitlog.
---


Could you apply this patch if there are no other comments? Thanks.


Less than a week response for a simple cleanup patch?  Why the rush and
pressure?  Relax, this really isn't an important patch...


I am sorry for the pressure, I just thought it is one simple cleanup
patch. It is okay for me to wait for.



Looks ok.

If it applies I'll send it forward to usb-next after 4.10-rc1,
It should end up in 4.11

-Mathias
--
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 v2] usb: xhci: Remove unuseful 'return' and 'break' statement

2016-11-27 Thread Baolin Wang
On 28 November 2016 at 15:21, Greg KH  wrote:
> On Mon, Nov 28, 2016 at 02:29:25PM +0800, Baolin Wang wrote:
>> Hi Mathias,
>>
>> On 24 November 2016 at 19:16, Baolin Wang  wrote:
>> > Since these 'return' statements are not generally useful in void
>> > function, remove them. Also remove one unuseful 'break' statement
>> > in xhci_setup_addressable_virt_dev() function.
>> >
>> > Signed-off-by: Baolin Wang 
>> > ---
>> > Changes since v1:
>> >  - Add description of removing 'break' statement in commitlog.
>> > ---
>>
>> Could you apply this patch if there are no other comments? Thanks.
>
> Less than a week response for a simple cleanup patch?  Why the rush and
> pressure?  Relax, this really isn't an important patch...

I am sorry for the pressure, I just thought it is one simple cleanup
patch. It is okay for me to wait for.

-- 
Baolin.wang
Best Regards
--
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 v2] usb: xhci: Remove unuseful 'return' and 'break' statement

2016-11-27 Thread Greg KH
On Mon, Nov 28, 2016 at 02:29:25PM +0800, Baolin Wang wrote:
> Hi Mathias,
> 
> On 24 November 2016 at 19:16, Baolin Wang  wrote:
> > Since these 'return' statements are not generally useful in void
> > function, remove them. Also remove one unuseful 'break' statement
> > in xhci_setup_addressable_virt_dev() function.
> >
> > Signed-off-by: Baolin Wang 
> > ---
> > Changes since v1:
> >  - Add description of removing 'break' statement in commitlog.
> > ---
> 
> Could you apply this patch if there are no other comments? Thanks.

Less than a week response for a simple cleanup patch?  Why the rush and
pressure?  Relax, this really isn't an important patch...

greg k-h
--
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 v2] usb: xhci: Remove unuseful 'return' and 'break' statement

2016-11-27 Thread Baolin Wang
Hi Mathias,

On 24 November 2016 at 19:16, Baolin Wang  wrote:
> Since these 'return' statements are not generally useful in void
> function, remove them. Also remove one unuseful 'break' statement
> in xhci_setup_addressable_virt_dev() function.
>
> Signed-off-by: Baolin Wang 
> ---
> Changes since v1:
>  - Add description of removing 'break' statement in commitlog.
> ---

Could you apply this patch if there are no other comments? Thanks.

-- 
Baolin.wang
Best Regards
--
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 v2] usb: xhci: Remove unuseful 'return' and 'break' statement

2016-11-24 Thread Baolin Wang
Since these 'return' statements are not generally useful in void
function, remove them. Also remove one unuseful 'break' statement
in xhci_setup_addressable_virt_dev() function.

Signed-off-by: Baolin Wang 
---
Changes since v1:
 - Add description of removing 'break' statement in commitlog.
---
 drivers/usb/host/xhci-hub.c  |2 --
 drivers/usb/host/xhci-mem.c  |1 -
 drivers/usb/host/xhci-ring.c |4 
 drivers/usb/host/xhci.c  |3 ---
 4 files changed, 10 deletions(-)

diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index 0ef1690..470ad66 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -444,8 +444,6 @@ void xhci_ring_device(struct xhci_hcd *xhci, int slot_id)
xhci_ring_ep_doorbell(xhci, slot_id, i, 0);
}
}
-
-   return;
 }
 
 static void xhci_disable_port(struct usb_hcd *hcd, struct xhci_hcd *xhci,
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 48a26d378..d6f59a3 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1146,7 +1146,6 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd 
*xhci, struct usb_device *ud
case USB_SPEED_WIRELESS:
xhci_dbg(xhci, "FIXME xHCI doesn't support wireless speeds\n");
return -EINVAL;
-   break;
default:
/* Speed was set earlier, this shouldn't happen. */
return -EINVAL;
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index d415911..2057d08 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -157,7 +157,6 @@ static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring 
*ring)
ring->deq_seg = ring->deq_seg->next;
ring->dequeue = ring->deq_seg->trbs;
}
-   return;
 }
 
 /*
@@ -1167,7 +1166,6 @@ static void xhci_handle_cmd_config_ep(struct xhci_hcd 
*xhci, int slot_id,
ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
return;
}
-   return;
 }
 
 static void xhci_handle_cmd_reset_dev(struct xhci_hcd *xhci, int slot_id,
@@ -1258,7 +1256,6 @@ static void xhci_handle_stopped_cmd_ring(struct xhci_hcd 
*xhci,
mod_timer(>cmd_timer, jiffies + XHCI_CMD_DEFAULT_TIMEOUT);
xhci_ring_cmd_db(xhci);
}
-   return;
 }
 
 
@@ -1307,7 +1304,6 @@ void xhci_handle_command_timeout(unsigned long data)
xhci_dbg(xhci, "Command timeout on stopped ring\n");
xhci_handle_stopped_cmd_ring(xhci, xhci->current_cmd);
spin_unlock_irqrestore(>lock, flags);
-   return;
 }
 
 static void handle_cmd_completion(struct xhci_hcd *xhci,
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index cf30cb6..dc337b3 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -269,8 +269,6 @@ static void xhci_free_irq(struct xhci_hcd *xhci)
return;
if (pdev->irq > 0)
free_irq(pdev->irq, xhci_to_hcd(xhci));
-
-   return;
 }
 
 /*
@@ -351,7 +349,6 @@ static void xhci_cleanup_msix(struct xhci_hcd *xhci)
}
 
hcd->msix_enabled = 0;
-   return;
 }
 
 static void __maybe_unused xhci_msix_sync_irqs(struct xhci_hcd *xhci)
-- 
1.7.9.5

--
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