All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jaejoong Kim <climbbb.kim@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>, linux-media@vger.kernel.org
Subject: Re: [PATCH 1/2] media: usb: uvc: remove duplicate & operation
Date: Tue, 07 Nov 2017 13:36:42 +0200	[thread overview]
Message-ID: <2094561.XVScKd08z9@avalon> (raw)
In-Reply-To: <1508484328-11018-2-git-send-email-climbbb.kim@gmail.com>

Hello Jaejoong,

Thank you for the patch.

On Friday, 20 October 2017 10:25:27 EET Jaejoong Kim wrote:
> usb_endpoint_maxp() has an inline keyword and searches for bits[10:0]
> by & operation with 0x7ff. So, we can remove the duplicate & operation
> with 0x7ff.
> 
> Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and applied to my tree.

> ---
>  drivers/media/usb/uvc/uvc_video.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/usb/uvc/uvc_video.c
> b/drivers/media/usb/uvc/uvc_video.c index fb86d6a..f4ace63 100644
> --- a/drivers/media/usb/uvc/uvc_video.c
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -1469,13 +1469,13 @@ static unsigned int uvc_endpoint_max_bpi(struct
> usb_device *dev, case USB_SPEED_HIGH:
>  		psize = usb_endpoint_maxp(&ep->desc);
>  		mult = usb_endpoint_maxp_mult(&ep->desc);
> -		return (psize & 0x07ff) * mult;
> +		return psize * mult;
>  	case USB_SPEED_WIRELESS:
>  		psize = usb_endpoint_maxp(&ep->desc);
>  		return psize;
>  	default:
>  		psize = usb_endpoint_maxp(&ep->desc);
> -		return psize & 0x07ff;
> +		return psize;
>  	}
>  }


-- 
Regards,

Laurent Pinchart

  parent reply	other threads:[~2017-11-07 11:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-20  7:25 [PATCH 0/2] media: usb: remove duplicate & operation Jaejoong Kim
2017-10-20  7:25 ` [PATCH 1/2] media: usb: uvc: " Jaejoong Kim
2017-11-06  2:07   ` Jaejoong Kim
2017-11-07 11:36   ` Laurent Pinchart [this message]
2017-10-20  7:25 ` [PATCH 2/2] media: usb: usbtv: " Jaejoong Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2094561.XVScKd08z9@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=climbbb.kim@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.