Re: [PATCH 01/13] seq_file: rewrite seq_puts() in terms of seq_write()

From: Alexey Dobriyan
Date: Mon Sep 03 2018 - 10:18:06 EST


Joe Perches wrote:

> > If execution speed is really an issue, as
> > almost all of the uses are for const strings,
> > why not use a #define and avoid the runtime
> > cost of strlen where possible.
>
> fyi: an x86-64 defconfig increases < .5 kb and
> presumably is faster for most all seq_puts uses

> -void seq_puts(struct seq_file *m, const char *s);
> +#define seq_puts(m, s) seq_write(m, s, strlen(s))

I don't know, seq_puts() patch was last minute observation.
It is independent of _print_integer() stuff.

Your version should be "static inline" of course.