From: Andrew Morton <akpm@linux-foundation.org>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: <linux-kernel@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: [PATCH 3/3] V4L: stk11xx, add static to tables
Date: Fri, 31 Aug 2007 11:40:47 -0700 [thread overview]
Message-ID: <20070831114047.4679330b.akpm@linux-foundation.org> (raw)
In-Reply-To: <2680630254888919558@pripojeni.net>
On Tue, 28 Aug 2007 01:18:34 -0700
Jiri Slaby <jirislaby@gmail.com> wrote:
> stk11xx, add static to tables
>
> ensure, that the compiler will put all the tables in static storage
>
> Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
>
> ...
>
> diff --git a/drivers/media/video/stk1125.c b/drivers/media/video/stk1125.c
> index f12030d..d79c196 100644
> --- a/drivers/media/video/stk1125.c
> +++ b/drivers/media/video/stk1125.c
> @@ -26,7 +26,7 @@ static int stk1125_load_microcode(struct stk11xx *dev)
> int retok;
>
> /* From 80x60 to 640x480 */
> - const u8 values_1_204[] = {
> + static const u8 values_1_204[] = {
> 0x12, 0x11, 0x3b, 0x6a, 0x13, 0x10, 0x00, 0x01, 0x02, 0x13,
> 0x39, 0x38, 0x37, 0x35, 0x0e, 0x12, 0x04, 0x0c, 0x0d, 0x17,
I think you'll find that the compiler is already putting this array into
static storage. But yes, I think the change is useful for commentary and
peace-of-mind reasons.
prev parent reply other threads:[~2007-08-31 18:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-28 8:17 [PATCH 1/3] V4L: stk11xx, use ARRAY_SIZE in another 2 cases Jiri Slaby
2007-08-28 8:17 ` [PATCH 2/3] V4L: stk11xx, use retval from stk11xx_check_device Jiri Slaby
2007-08-28 8:18 ` [PATCH 3/3] V4L: stk11xx, add static to tables Jiri Slaby
2007-08-29 10:42 ` Satyam Sharma
2007-08-31 18:40 ` Andrew Morton [this message]
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=20070831114047.4679330b.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.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