From af86cdc67311004c81894ac69e981abfd2d65a90 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 12 Apr 2004 19:23:16 -0700 Subject: [PATCH] uninline seq_puts() and seq_putc() Saves 3.4k from my vmlinux. Thanks to Denis Vlasenko for performing the analysis. --- include/linux/seq_file.h | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'include/linux') 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))); -- cgit v1.2.3