printk: Make printk_emit() local function.
printk_emit() is called from only devkmsg_write() in the same file. Save object size by making it a local function. Link: http://lkml.kernel.org/r/5cc99d2c-c408-34f7-d1fc-e1cd2a9e31da@i-love.sakura.ne.jp Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Petr Mladek <pmladek@suse.com>
This commit is contained in:
parent
c7c3f05e34
commit
9adcfaffc3
|
@ -166,11 +166,6 @@ int vprintk_emit(int facility, int level,
|
|||
asmlinkage __printf(1, 0)
|
||||
int vprintk(const char *fmt, va_list args);
|
||||
|
||||
asmlinkage __printf(5, 6) __cold
|
||||
int printk_emit(int facility, int level,
|
||||
const char *dict, size_t dictlen,
|
||||
const char *fmt, ...);
|
||||
|
||||
asmlinkage __printf(1, 2) __cold
|
||||
int printk(const char *fmt, ...);
|
||||
|
||||
|
|
|
@ -753,6 +753,19 @@ struct devkmsg_user {
|
|||
char buf[CONSOLE_EXT_LOG_MAX];
|
||||
};
|
||||
|
||||
static __printf(3, 4) __cold
|
||||
int devkmsg_emit(int facility, int level, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
int r;
|
||||
|
||||
va_start(args, fmt);
|
||||
r = vprintk_emit(facility, level, NULL, 0, fmt, args);
|
||||
va_end(args);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static ssize_t devkmsg_write(struct kiocb *iocb, struct iov_iter *from)
|
||||
{
|
||||
char *buf, *line;
|
||||
|
@ -811,7 +824,7 @@ static ssize_t devkmsg_write(struct kiocb *iocb, struct iov_iter *from)
|
|||
}
|
||||
}
|
||||
|
||||
printk_emit(facility, level, NULL, 0, "%s", line);
|
||||
devkmsg_emit(facility, level, "%s", line);
|
||||
kfree(buf);
|
||||
return ret;
|
||||
}
|
||||
|
@ -1936,21 +1949,6 @@ asmlinkage int vprintk(const char *fmt, va_list args)
|
|||
}
|
||||
EXPORT_SYMBOL(vprintk);
|
||||
|
||||
asmlinkage int printk_emit(int facility, int level,
|
||||
const char *dict, size_t dictlen,
|
||||
const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
int r;
|
||||
|
||||
va_start(args, fmt);
|
||||
r = vprintk_emit(facility, level, dict, dictlen, fmt, args);
|
||||
va_end(args);
|
||||
|
||||
return r;
|
||||
}
|
||||
EXPORT_SYMBOL(printk_emit);
|
||||
|
||||
int vprintk_default(const char *fmt, va_list args)
|
||||
{
|
||||
int r;
|
||||
|
|
Loading…
Reference in New Issue