From: David Howells <dhowells@redhat.com>
To: Joe Perches <joe@perches.com>
Cc: Amit Kumar Salecha <amit.salecha@qlogic.com>,
linux-fbdev@vger.kernel.org, linux-usb@vger.kernel.org,
Karsten Keil <isdn@linux-pingi.de>,
James Smart <james.smart@emulex.com>,
linux-mips@linux-mips.org, "VMware, Inc." <pv-drivers@vmware.com>,
Bruce Allan <bruce.w.allan@intel.com>,
PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>,
Shreyas Bhatewara <sbhatewara@vmware.com>,
alsa-devel@alsa-project.org, Jaroslav Kysela <perex@perex.cz>,
dhowells@redhat.com,
"James E.J. Bottomley" <James.Bottomley@suse.de>,
Paul Mackerras <paulus@samba.org>,
linux-i2c@vger.kernel.org, Brett Rudley <brudley@broadcom.com>,
sparclinux@vger.kernel.org, devel@driverdev.osuosl.org,
linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org,
Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
e1000-devel@lists.sourceforge.net,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
linux-acpi@vger.kernel.org
Subject: (unknown)
Date: Tue, 14 Sep 2010 10:14:45 +0100 [thread overview]
Message-ID: <28081.1284455685@redhat.com> (raw)
In-Reply-To: <cover.1284406638.git.joe@perches.com>
Joe Perches <joe@perches.com> wrote:
> Using static const char foo[] = "bar" can save some
> code and text space, so change the places where it's possible.
That's reasonable.
> Also change the places that use
> char foo[] = "barX";
> ...
> foo[3] = value + '0';
> where X is typically changed
> char foo[sizeof("barX")];
> ...
> sprintf(foo, "bar%c", value + '0');
You haven't said what this gains. I can see what it may cost, though
(depending on how gcc loads foo[]).
David
next prev parent reply other threads:[~2010-09-14 9:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-13 19:47 [PATCH 00/25] treewide-next: Use static const char arrays Joe Perches
2010-09-13 19:48 ` [PATCH 24/25] sound: " Joe Perches
2010-09-13 20:30 ` Takashi Iwai
2010-09-13 20:47 ` Joe Perches
2010-09-13 21:33 ` Takashi Iwai
2010-09-14 9:14 ` David Howells [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-04-25 6:54 (unknown), Sangbeom Kim
2013-11-01 7:04 (unknown), Xiubo Li
2017-01-13 10:46 [PATCH v3 1/8] arm: put types.h in uapi Nicolas Dichtel
2017-01-09 11:33 ` [PATCH v2 0/7] uapi: export all headers under uapi directories Arnd Bergmann
2017-01-13 10:46 ` [PATCH v3 0/8] " Nicolas Dichtel
2017-01-13 15:36 ` (unknown) David Howells
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=28081.1284455685@redhat.com \
--to=dhowells@redhat.com \
--cc=FlorianSchandinat@gmx.de \
--cc=James.Bottomley@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=amit.salecha@qlogic.com \
--cc=bruce.w.allan@intel.com \
--cc=brudley@broadcom.com \
--cc=devel@driverdev.osuosl.org \
--cc=e1000-devel@lists.sourceforge.net \
--cc=isdn@linux-pingi.de \
--cc=james.smart@emulex.com \
--cc=jesse.brandeburg@intel.com \
--cc=joe@perches.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=paulus@samba.org \
--cc=perex@perex.cz \
--cc=peter.p.waskiewicz.jr@intel.com \
--cc=pv-drivers@vmware.com \
--cc=sbhatewara@vmware.com \
--cc=sparclinux@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).