From: Artem Bityutskiy <dedekind1@gmail.com>
To: linux-mtd@lists.infradead.org
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Subject: [PATCH 1/5] UBI: mark few variables as __initdata
Date: Wed, 27 Jan 2010 17:18:56 +0200 [thread overview]
Message-ID: <1264605540-13144-2-git-send-email-dedekind1@gmail.com> (raw)
In-Reply-To: <1264605540-13144-1-git-send-email-dedekind1@gmail.com>
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
The @mtd_devs and @mtd_dev_param variables are used only during the
initialization, and all functions that use the variables have
the __init prefix. This means we can safely mark the variables
as __initdata, which is a tiny optimization.
Impact: tiny RAM consumption optimization when UBI is used as a kernel
module.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
drivers/mtd/ubi/build.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 14cec04..eb8f19f 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -59,10 +59,10 @@ struct mtd_dev_param {
};
/* Numbers of elements set in the @mtd_dev_param array */
-static int mtd_devs;
+static int __initdata mtd_devs;
/* MTD devices specification parameters */
-static struct mtd_dev_param mtd_dev_param[UBI_MAX_DEVICES];
+static struct mtd_dev_param __initdata mtd_dev_param[UBI_MAX_DEVICES];
/* Root UBI "class" object (corresponds to '/<sysfs>/class/ubi/') */
struct class *ubi_class;
--
1.6.6
next prev parent reply other threads:[~2010-01-27 15:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-27 15:18 [PATCH 0/9] UBI patches for the next merge window Artem Bityutskiy
2010-01-27 15:18 ` Artem Bityutskiy [this message]
2010-01-27 15:18 ` [PATCH 2/5] UBI: support attaching by MTD character device name Artem Bityutskiy
2010-01-27 15:18 ` [PATCH 3/5] UBI: fix attaching error path Artem Bityutskiy
2010-01-27 15:18 ` [PATCH 4/5] UBI: simplify debugging return codes Artem Bityutskiy
2010-01-27 15:19 ` [PATCH 5/5] UBI: add write checking Artem Bityutskiy
2010-01-27 17:11 ` [PATCH 0/9] UBI patches for the next merge window Artem Bityutskiy
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=1264605540-13144-2-git-send-email-dedekind1@gmail.com \
--to=dedekind1@gmail.com \
--cc=Artem.Bityutskiy@nokia.com \
--cc=linux-mtd@lists.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