From: "Horst H. von Brand" <vonbrand@inf.utfsm.cl>
To: "Daniel Marjamäki" <daniel.marjamaki@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Want comments regarding patch
Date: Thu, 28 Dec 2006 17:07:36 -0300 [thread overview]
Message-ID: <200612282007.kBSK7akx021051@laptop13.inf.utfsm.cl> (raw)
In-Reply-To: Message from "=?ISO-8859-1?Q?Daniel_Marjam=E4ki?=" <daniel.marjamaki@gmail.com> of "Thu, 28 Dec 2006 19:41:25 BST." <80ec54e90612281041q3b2c2bcemb0308c1e89a29ac@mail.gmail.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 971 bytes --]
Daniel Marjamäki <daniel.marjamaki@gmail.com> wrote:
> I sent a patch with this content:
>
> - for (i = 0; i < MAX_PIRQS; i++)
> - pirq_entries[i] = -1;
> + memset(pirq_entries, -1, sizeof(pirq_entries));
>
> I'd like to know if you have any comments to this change. It was of
> course my intention to make the code shorter, simpler and faster.
- Is this code in some fast path? If so, I'd set up a constant array that
is memcpy()'d over the variable (or used to initialize it) as needed.
- If not, what is the point? Shaving off a few bytes/cycles and paying for
that with massive developer confusion? What if the constant changes and
is -2, or 1, tomorrow?
--
Dr. Horst H. von Brand User #22616 counter.li.org
Departamento de Informatica Fono: +56 32 2654431
Universidad Tecnica Federico Santa Maria +56 32 2654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 2797513
next prev parent reply other threads:[~2006-12-28 20:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-28 18:41 Daniel Marjamäki
2006-12-28 18:53 ` Arjan van de Ven
2006-12-28 23:52 ` Jan Engelhardt
2006-12-29 6:57 ` Daniel Marjamäki
2006-12-29 10:13 ` Jan Engelhardt
2006-12-28 20:07 ` Horst H. von Brand [this message]
[not found] <7x8ul-7NU-7@gated-at.bofh.it>
[not found] ` <7x8E5-80F-13@gated-at.bofh.it>
[not found] ` <7xdkq-7tB-25@gated-at.bofh.it>
[not found] ` <7xjSQ-1fR-13@gated-at.bofh.it>
[not found] ` <7xn0j-6rY-7@gated-at.bofh.it>
2006-12-30 0:00 ` Bodo Eggert
2006-12-30 11:07 ` Jan Engelhardt
2006-12-30 11:42 ` Arjan van de Ven
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=200612282007.kBSK7akx021051@laptop13.inf.utfsm.cl \
--to=vonbrand@inf.utfsm.cl \
--cc=daniel.marjamaki@gmail.com \
--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
all inboxes | Powered by JetHome®