From: Peng Tao <bergwolf@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, Peng Tao <bergwolf@gmail.com>,
Andreas Dilger <andreas.dilger@intel.com>
Subject: [PATCH 2/9] staging/lustre/obdclass: lprocfs_{alloc_stats,register} always defined
Date: Tue, 3 Dec 2013 22:41:59 +0800 [thread overview]
Message-ID: <1386081729-9481-3-git-send-email-bergwolf@gmail.com> (raw)
In-Reply-To: <1386081729-9481-1-git-send-email-bergwolf@gmail.com>
No need to surround them with #ifdef LPROCFS.
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
---
drivers/staging/lustre/lustre/obdclass/class_obd.c | 4 ++--
drivers/staging/lustre/lustre/obdclass/genops.c | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c b/drivers/staging/lustre/lustre/obdclass/class_obd.c
index 4afd962..4fb1ecd 100644
--- a/drivers/staging/lustre/lustre/obdclass/class_obd.c
+++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c
@@ -516,7 +516,7 @@ static int __init init_obdclass(void)
spin_lock_init(&obd_types_lock);
obd_zombie_impexp_init();
-#ifdef LPROCFS
+
obd_memory = lprocfs_alloc_stats(OBD_STATS_NUM,
LPROCFS_STATS_FLAG_NONE |
LPROCFS_STATS_FLAG_IRQ_SAFE);
@@ -531,7 +531,7 @@ static int __init init_obdclass(void)
lprocfs_counter_init(obd_memory, OBD_MEMORY_PAGES_STAT,
LPROCFS_CNTR_AVGMINMAX,
"pagesused", "pages");
-#endif
+
err = obd_init_checks();
if (err == -EOVERFLOW)
return err;
diff --git a/drivers/staging/lustre/lustre/obdclass/genops.c b/drivers/staging/lustre/lustre/obdclass/genops.c
index f6fae16..d9f750d 100644
--- a/drivers/staging/lustre/lustre/obdclass/genops.c
+++ b/drivers/staging/lustre/lustre/obdclass/genops.c
@@ -193,7 +193,6 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
strcpy(type->typ_name, name);
spin_lock_init(&type->obd_type_lock);
-#ifdef LPROCFS
type->typ_procroot = lprocfs_register(type->typ_name, proc_lustre_root,
vars, type);
if (IS_ERR(type->typ_procroot)) {
@@ -201,7 +200,7 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
type->typ_procroot = NULL;
GOTO (failed, rc);
}
-#endif
+
if (ldt != NULL) {
type->typ_lu = ldt;
rc = lu_device_type_init(ldt);
--
1.7.9.5
next prev parent reply other threads:[~2013-12-03 14:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 14:41 [PATCH 0/9] staging/lustre: minor cleanups and CONFIG_PROC_FS fix up Peng Tao
2013-12-03 14:41 ` [PATCH 1/9] staging/lustre/obdclass: fix false used uninitialized warning Peng Tao
2013-12-03 14:41 ` Peng Tao [this message]
2013-12-03 14:42 ` [PATCH 2/9] staging/lustre/obdclass: lprocfs_{alloc_stats,register} always defined Peng Tao
2013-12-03 14:42 ` [PATCH 3/9] staging/lustre/ldlm: inline ldlm_proc_setup Peng Tao
2013-12-03 14:42 ` [PATCH 4/9] staging/lustre/obdclass: move obd_sysctl_init out of class_procfs_init Peng Tao
2013-12-03 14:42 ` Peng Tao
2013-12-03 14:42 ` [PATCH 5/9] staging/lustre: fix defined not used warning Peng Tao
2013-12-03 14:42 ` [PATCH 6/9] staging/lustre/llite: fix used uninitialized warning Peng Tao
2013-12-03 14:42 ` [PATCH 7/9] staging/lustre/llite: remove ll_file_get_iov_count Peng Tao
2013-12-03 17:00 ` Greg Kroah-Hartman
2013-12-03 17:26 ` Peng Tao
2013-12-03 14:42 ` [PATCH 8/9] staging/lustre: fix undefined reference if CONFIG_PROC_FS is off Peng Tao
2013-12-03 14:42 ` Peng Tao
2013-12-03 14:42 ` [PATCH 9/9] staging/lustre: don't compile procfs code when " Peng Tao
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=1386081729-9481-3-git-send-email-bergwolf@gmail.com \
--to=bergwolf@gmail.com \
--cc=andreas.dilger@intel.com \
--cc=gregkh@linuxfoundation.org \
--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