From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752070AbdLEUSA (ORCPT ); Tue, 5 Dec 2017 15:18:00 -0500 Received: from erebus.the-tk.com ([109.74.205.187]:34372 "EHLO erebus.the-tk.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751921AbdLEUR5 (ORCPT ); Tue, 5 Dec 2017 15:17:57 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=the-tk.com; h=date:from:to :cc:subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=sel0; b=YxEq1zaiSIejkqe3ZTvKfaMw2Zo+zWhxf 2Pvu4fE1tQl97zAT1lisHkVG7fk4CIAIxJNae7l7rvQjE3DorjIvOooSRODE6LB2 W+/mmIptU5Vz4um0H1CMOmqZPr7oRZFsfHopGooVYkMBRVODzqiLJVIAFgrHRW69 r61w/U7L+8= Date: Tue, 5 Dec 2017 20:17:52 +0000 From: Tomasz Kramkowski To: Jiri Kosina Cc: Benjamin Tissoires , Yuxuan Shui , Diego Elio =?iso-8859-1?Q?Petten=F2?= , Alex Manoussakis , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] HID: elecom: rewrite report fixup for EX-G and future mice Message-ID: <20171205201307.GA13831@gaia.local> References: <20171204205550.2621-1-tk@the-tk.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171204205550.2621-1-tk@the-tk.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 04, 2017 at 08:55:50PM +0000, Tomasz Kramkowski wrote: > +static void mouse_button_fixup(struct hid_device *hdev, > + __u8 *rdesc, unsigned int *rsize, > + int nbuttons) I've just remembered what has been bugging me yesterday when I was reviewing this patch. I had come to the realisation (and then subsequently forgotten) that this function should probably return __u8 * and also get assigned to rdesc on the other end. It seems to me that it makes most sense to allow for the possibility (although slim) of this function eventually being expanded to actually replace the report descriptor (technically the full report descriptor contains a bunch of useless crap like INPUT reports for media keys and the FEATURE report which as far as I can tell is totally useless or may or may not be some tactic by ELECOM to future-proof their firmware). The other option would be to make rsize not a pointer because it doesn't need to be. But that kind of makes the flow of the two functions somewhat inconsistent. I'm not sure if I'm alone in that feeling. Anyway, I should have written this down when I first caught it, sorry for the noise. I'll let you guys review this patch and give any other feedback you might have and I'll try to get a v2 as soon as possible afterwards. -- Tomasz Kramkowski | GPG: 40B037BA0A5B8680 | Web: https://the-tk.com/