From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Thomas Winischhofer <thomas@winischhofer.net>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/video/fbdev/sis/sis_main.c: avoid repeated strlen() calls
Date: Fri, 12 Jun 2015 09:36:22 +0000 [thread overview]
Message-ID: <557AA816.4060102@ti.com> (raw)
In-Reply-To: <1433855066-20260-1-git-send-email-linux@rasmusvillemoes.dk>
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
On 09/06/15 16:04, Rasmus Villemoes wrote:
> gcc is not smart enough to realize that strlen(strbuf1) cannot be
> changed by the loop body, so it is forced to recompute it, at least in
> the branch containing the assignment. Avoid this by using an
> equivalent stopping condition.
Does it matter? Is sisfb calling sisfb_search_mode thousands of times?
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Thomas Winischhofer <thomas@winischhofer.net>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: <linux-fbdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drivers/video/fbdev/sis/sis_main.c: avoid repeated strlen() calls
Date: Fri, 12 Jun 2015 12:36:22 +0300 [thread overview]
Message-ID: <557AA816.4060102@ti.com> (raw)
In-Reply-To: <1433855066-20260-1-git-send-email-linux@rasmusvillemoes.dk>
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
On 09/06/15 16:04, Rasmus Villemoes wrote:
> gcc is not smart enough to realize that strlen(strbuf1) cannot be
> changed by the loop body, so it is forced to recompute it, at least in
> the branch containing the assignment. Avoid this by using an
> equivalent stopping condition.
Does it matter? Is sisfb calling sisfb_search_mode thousands of times?
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-06-12 9:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 13:04 [PATCH] drivers/video/fbdev/sis/sis_main.c: avoid repeated strlen() calls Rasmus Villemoes
2015-06-09 13:04 ` Rasmus Villemoes
2015-06-12 9:36 ` Tomi Valkeinen [this message]
2015-06-12 9:36 ` Tomi Valkeinen
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=557AA816.4060102@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=plagnioj@jcrosoft.com \
--cc=thomas@winischhofer.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.