[PATCH] fix arch/ppc64/kernel/rtc.c warnings
Amos Waterland
apw at us.ibm.com
Sat Sep 17 07:31:57 EST 2005
If CONFIG_PROC_FS is not asserted, the compiler emits:
arch/ppc64/kernel/rtc.c:257: warning: `rtc_read_proc' defined but not used
Here is a patch to fix that. It can provide a decent space savings:
text data bss dec hex filename
- 2956 728 0 3684 e64 arch/ppc64/kernel/rtc.o
+ 2500 664 0 3164 c5c arch/ppc64/kernel/rtc.o
Signed-off-by: Amos Waterland <apw at us.ibm.com>
---
arch/ppc64/kernel/rtc.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
d0406aebf5994722b82afaf82561e2e969420a71
diff --git a/arch/ppc64/kernel/rtc.c b/arch/ppc64/kernel/rtc.c
--- a/arch/ppc64/kernel/rtc.c
+++ b/arch/ppc64/kernel/rtc.c
@@ -60,8 +60,10 @@ static ssize_t rtc_read(struct file *fil
static int rtc_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg);
+#ifdef CONFIG_PROC_FS
static int rtc_read_proc(char *page, char **start, off_t off,
int count, int *eof, void *data);
+#endif
/*
* If this driver ever becomes modularised, it will be really nice
@@ -219,6 +221,8 @@ static void __exit rtc_exit (void)
module_init(rtc_init);
module_exit(rtc_exit);
+#ifdef CONFIG_PROC_FS
+
/*
* Info exported via "/proc/driver/rtc".
*/
@@ -263,6 +267,7 @@ static int rtc_read_proc(char *page, cha
if (len<0) len = 0;
return len;
}
+#endif /* CONFIG_PROC_FS */
#ifdef CONFIG_PPC_ISERIES
/*
More information about the Linuxppc64-dev
mailing list