From: Walter Harms <wharms@bfs.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Stefan Achatz <erazor_de@users.sourceforge.net>,
Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: AW: [PATCH v2] HID: roccat: add bounds checking in kone_sysfs_write_settings()
Date: Tue, 25 Aug 2020 13:08:07 +0000 [thread overview]
Message-ID: <4b0f8fc9b361495c8678de81b1cba381@bfs.de> (raw)
In-Reply-To: <20200825072903.GQ1793@kadam>
lets hope the maintainer picks that up.
re,
wh
________________________________________
Von: Dan Carpenter [dan.carpenter@oracle.com]
Gesendet: Dienstag, 25. August 2020 09:29
An: Walter Harms
Cc: Stefan Achatz; Jiri Kosina; Benjamin Tissoires; linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; kernel-janitors@vger.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
next prev parent reply other threads:[~2020-08-25 13:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-05 9:55 [PATCH] HID: roccat: add bounds checking in kone_sysfs_write_settings() Dan Carpenter
2020-08-17 10:07 ` Jiri Kosina
2020-08-19 6:53 ` Stefan Achatz
2020-08-24 8:57 ` [PATCH v2] " Dan Carpenter
2020-08-24 15:35 ` AW: " Walter Harms
2020-08-25 7:29 ` Dan Carpenter
2020-08-25 13:08 ` Walter Harms [this message]
2020-09-09 6:35 ` Jiri Kosina
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=4b0f8fc9b361495c8678de81b1cba381@bfs.de \
--to=wharms@bfs.de \
--cc=benjamin.tissoires@redhat.com \
--cc=dan.carpenter@oracle.com \
--cc=erazor_de@users.sourceforge.net \
--cc=jikos@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).