lkml.org 
[lkml]   [2015]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 10/10] usb: host: ehci-sched: remove unnecessary braces
From
Date
On 12/12/2015 4:19 AM, Geyslan G. Bem wrote:

> This patch removes unnecessary braces in single statement blocks at the
> same time as replaces the if statement with a ternary conditional.
>
> Tested by compilation only.
> Caught by checkpatch.
>
> Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
> ---
> drivers/usb/host/ehci-sched.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
> index 1dc1d5c..f6e828a 100644
> --- a/drivers/usb/host/ehci-sched.c
> +++ b/drivers/usb/host/ehci-sched.c
> @@ -1060,11 +1060,7 @@ iso_stream_init(
> epnum = usb_pipeendpoint(urb->pipe);
> is_input = usb_pipein(urb->pipe) ? USB_DIR_IN : 0;
> maxp = usb_endpoint_maxp(&urb->ep->desc);
> - if (is_input) {
> - buf1 = (1 << 11);
> - } else {
> - buf1 = 0;
> - }
> + buf1 = (is_input) ? (1 << 11) : 0;

Parens not needed, especially the first ones.

[...]

MBR, Sergei



\
 
 \ /
  Last update: 2015-12-12 16:01    [W:0.141 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site