[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4b0f8fc9b361495c8678de81b1cba381@bfs.de>
Date: Tue, 25 Aug 2020 13:08:07 +0000
From: Walter Harms <wharms@....de>
To: Dan Carpenter <dan.carpenter@...cle.com>
CC: Stefan Achatz <erazor_de@...rs.sourceforge.net>,
Jiri Kosina <jikos@...nel.org>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: AW: [PATCH v2] HID: roccat: add bounds checking in
kone_sysfs_write_settings()
lets hope the maintainer picks that up.
re,
wh
________________________________________
Von: Dan Carpenter [dan.carpenter@...cle.com]
Gesendet: Dienstag, 25. August 2020 09:29
An: Walter Harms
Cc: Stefan Achatz; Jiri Kosina; Benjamin Tissoires; linux-input@...r.kernel.org; linux-kernel@...r.kernel.org; kernel-janitors@...r.kernel.org
Betreff: Re: [PATCH v2] HID: roccat: add bounds checking in kone_sysfs_write_settings()
On Mon, Aug 24, 2020 at 03:35:16PM +0000, Walter Harms wrote:
> hello Dan,
>
> i notice that you can shorten the line to:
> (line above checks for count==sizeof(struct kone_settings))
>
> difference = memcmp(settings, &kone->settings, count);
>
> nothing special just to shorten the line and make use of count.
>
> and just to save one indent level and because its readabel nicely:
> if ( ! difference )
> goto unlock;
>
> hope that helps
Yeah. I wrote that version and I wanted to send it, but then I decided
not to change the style too much. I definitely agree with you, but I
figured I would keep the patch less intrusive.
regards,
dan carpenter
Powered by blists - more mailing lists