summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-04-12 19:23:16 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-04-12 19:23:16 -0700
commitaf86cdc67311004c81894ac69e981abfd2d65a90 (patch)
treeaef97b0d93c8478d39944d12c5e7f0f2a6e47260 /include
parent467769abc79de002e75cdfb0d8f43695dfb4ffab (diff)
[PATCH] uninline seq_puts() and seq_putc()
Saves 3.4k from my vmlinux. Thanks to Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua> for performing the analysis.
Diffstat (limited to 'include')
-rw-r--r--include/linux/seq_file.h23
1 files changed, 2 insertions, 21 deletions
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index e0d0e74ba4c2..28141af6a19a 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -35,27 +35,8 @@ ssize_t seq_read(struct file *, char __user *, size_t, loff_t *);
loff_t seq_lseek(struct file *, loff_t, int);
int seq_release(struct inode *, struct file *);
int seq_escape(struct seq_file *, const char *, const char *);
-
-static inline int seq_putc(struct seq_file *m, char c)
-{
- if (m->count < m->size) {
- m->buf[m->count++] = c;
- return 0;
- }
- return -1;
-}
-
-static inline int seq_puts(struct seq_file *m, const char *s)
-{
- int len = strlen(s);
- if (m->count + len < m->size) {
- memcpy(m->buf + m->count, s, len);
- m->count += len;
- return 0;
- }
- m->count = m->size;
- return -1;
-}
+int seq_putc(struct seq_file *m, char c);
+int seq_puts(struct seq_file *m, const char *s);
int seq_printf(struct seq_file *, const char *, ...)
__attribute__ ((format (printf,2,3)));