Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753914AbcCRQhv (ORCPT ); Fri, 18 Mar 2016 12:37:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:59764 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753836AbcCRQhp (ORCPT ); Fri, 18 Mar 2016 12:37:45 -0400 Date: Fri, 18 Mar 2016 17:37:43 +0100 (CET) From: Jiri Kosina X-X-Sender: jkosina@pobox.suse.cz To: David Herrmann cc: Cyan Ogilvie , David Herrmann , Benjamin Tissoires , "open list:HID CORE LAYER" , linux-kernel Subject: Re: [PATCH] HID: wiimote: Fix wiimote mp scale linearization In-Reply-To: Message-ID: References: <1458147581-4126-1-git-send-email-cyan.ogilvie@gmail.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 819 Lines: 29 On Thu, 17 Mar 2016, David Herrmann wrote: > > @@ -2070,15 +2072,15 @@ static void wiimod_mp_in_mp(struct wiimote_data *wdata, const __u8 *ext) > > z -= 8192; > > > > if (!(ext[3] & 0x02)) > > - x *= 18; > > + x = (x * 2000 * 9) / 440; > > else > > x *= 9; > > if (!(ext[4] & 0x02)) > > - y *= 18; > > + y = (y * 2000 * 9) / 440; > > else > > y *= 9; > > if (!(ext[3] & 0x01)) > > - z *= 18; > > + z = (z * 2000 * 9) / 440; > > So 2000/440 ~= 4.5, so this is exactly what the initial comment said. > Patch looks good to me: > > Reviewed-by: David Herrmann Appplied to for-4.6/upstream-fixes. Thanks, -- Jiri Kosina SUSE Labs