From: Greg KH <gregkh@linuxfoundation.org>
To: Claudiu Beznea <claudiu.beznea@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: wlan-ng: moved memset() calls after copy_from_user() call
Date: Mon, 21 Mar 2016 22:02:17 -0400 [thread overview]
Message-ID: <20160322020217.GA24033@kroah.com> (raw)
In-Reply-To: <1458071595-22365-1-git-send-email-claudiu.beznea@gmail.com>
On Tue, Mar 15, 2016 at 09:53:15PM +0200, Claudiu Beznea wrote:
> This patch moves memset() calls from p80211netdev_ethtool()
> after copy_from_user() call in order to avoid unnecessary
> instruction in case copy_from_user() fails.
Does that really matter? If an error happens, then we are on a "slow
path" and the extra memset didn't matter at all. Don't move code around
for no good reason, and if you think it makes things faster, then you
have to be able to prove it somehow :)
thanks,
greg k-h
next prev parent reply other threads:[~2016-03-22 2:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 19:53 [PATCH] Staging: wlan-ng: moved memset() calls after copy_from_user() call Claudiu Beznea
2016-03-22 2:02 ` Greg KH [this message]
[not found] ` <CAJSSEVxOjKtcvu8fpy2ghtG1haL80-r3SY-YQO2EuwDza94__Q@mail.gmail.com>
2016-03-22 13:27 ` Greg KH
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=20160322020217.GA24033@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=claudiu.beznea@gmail.com \
--cc=devel@driverdev.osuosl.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