mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Opasiak <k.opasiak@samsung.com>
To: Arnd Bergmann <arnd@arndb.de>,
	Valentina Manea <valentina.manea.m@gmail.com>,
	Shuah Khan <shuah@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Johan Hovold <johan@kernel.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] usbip: fix off-by-one frame number calculation
Date: Tue, 07 Nov 2017 12:21:19 +0100	[thread overview]
Message-ID: <3dde28df-64d5-4b2e-f044-04e73b3fb156@samsung.com> (raw)
In-Reply-To: <20171107104010.2884193-1-arnd@arndb.de>



On 11/07/2017 11:39 AM, Arnd Bergmann wrote:
> vgadget_get_frame returns a frame number from 0 to 2046, which
> may require an expensive division operation to wrap at one lower
> than the usual number.
> 
> I can't see any reason for this, and all other drivers wrap at
> a power-of-two number. My best explanation is that it was a simple
> typo, so I'm changing the % modulo operator into a cheaper bitmask
> that the other drivers use, to make it wrap after 0x7ff rather than
> before it.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Looks good to me:
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>

-- 
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics

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

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20171107104018epcas5p1f9c72d541c679e1c5a44e03a901e8498@epcas5p1.samsung.com>
2017-11-07 10:39 ` Arnd Bergmann
2017-11-07 10:39   ` [PATCH 2/2] usbip: use monotonic timestamps Arnd Bergmann
2017-11-07 11:22     ` Krzysztof Opasiak
2017-11-07 21:10       ` Shuah Khan
2017-11-07 11:21   ` Krzysztof Opasiak [this message]
2017-11-07 21:10     ` [PATCH 1/2] usbip: fix off-by-one frame number calculation Shuah Khan

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=3dde28df-64d5-4b2e-f044-04e73b3fb156@samsung.com \
    --to=k.opasiak@samsung.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=valentina.manea.m@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®