From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933840AbdKGVKp (ORCPT ); Tue, 7 Nov 2017 16:10:45 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:34559 "EHLO mailout.easymail.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933802AbdKGVKn (ORCPT ); Tue, 7 Nov 2017 16:10:43 -0500 Reply-To: shuah@kernel.org Subject: Re: [PATCH 1/2] usbip: fix off-by-one frame number calculation To: Krzysztof Opasiak , Arnd Bergmann , Valentina Manea , Greg Kroah-Hartman Cc: Johan Hovold , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20171107104010.2884193-1-arnd@arndb.de> <3dde28df-64d5-4b2e-f044-04e73b3fb156@samsung.com> From: Shuah Khan Message-ID: <3292da59-3b55-4020-6853-1e6f158dd084@kernel.org> Date: Tue, 7 Nov 2017 14:10:31 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <3dde28df-64d5-4b2e-f044-04e73b3fb156@samsung.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > Looks good to me: > Reviewed-by: Krzysztof Opasiak > Acked-by: Shuah Khan thanks, -- Shuah