From: Shuah Khan <shuah@kernel.org>
To: Krzysztof Opasiak <k.opasiak@samsung.com>,
Arnd Bergmann <arnd@arndb.de>,
Valentina Manea <valentina.manea.m@gmail.com>,
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, 7 Nov 2017 14:10:31 -0700 [thread overview]
Message-ID: <3292da59-3b55-4020-6853-1e6f158dd084@kernel.org> (raw)
In-Reply-To: <3dde28df-64d5-4b2e-f044-04e73b3fb156@samsung.com>
On 11/07/2017 04:21 AM, Krzysztof Opasiak wrote:
>
>
> 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>
>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
thanks,
-- Shuah
prev parent reply other threads:[~2017-11-07 21:10 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 ` [PATCH 1/2] usbip: fix off-by-one frame number calculation Krzysztof Opasiak
2017-11-07 21:10 ` Shuah Khan [this message]
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=3292da59-3b55-4020-6853-1e6f158dd084@kernel.org \
--to=shuah@kernel.org \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=k.opasiak@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.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®