From: Arjan van de Ven <arjan@infradead.org>
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 19:53:15 +0100 [thread overview]
Message-ID: <1167331995.3281.4374.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <80ec54e90612281041q3b2c2bcemb0308c1e89a29ac@mail.gmail.com>
On Thu, 2006-12-28 at 19:41 +0100, Daniel Marjamäki wrote:
> Hello all!
>
> 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.
Hi,
personally I don't like the new code; memset only takes a byte as
argument and while it probably is the same, that is now implicit
behavior and no longer explicit. A reasonably good compiler will notice
it's the same and generate the best code anyway, so I would really
really suggest to go for the best readable code, which imo is the
original code.
Greetings,
Arjan van de Ven
next prev parent reply other threads:[~2006-12-28 18:53 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 [this message]
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
[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=1167331995.3281.4374.camel@laptopd505.fenrus.org \
--to=arjan@infradead.org \
--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®