Re: [PATCH V2] SYSV: logging update

From: Fabian Frederick
Date: Wed Jul 23 2014 - 11:30:55 EST




> On 23 July 2014 at 17:07 Joe Perches <joe@xxxxxxxxxxx> wrote:
>
>
> On Wed, 2014-07-23 at 16:50 +0200, Fabian Frederick wrote:
> > -use current logging functions
> > -replace no level printk by pr_err
> > -add debug.c / sysv_err function to include sb->s_id
> > -standardize prefix: "sysv (sb id): " and remove sb id from various logging
> > at different places.
> > -use __func__
> > -coalesce formats
>
> Seems fine but:
>
> > diff --git a/fs/sysv/debug.c b/fs/sysv/debug.c
> []
> > @@ -0,0 +1,15 @@
> > +#define pr_fmt(fmt) KBUILD_MODNAME " " fmt
>
> Please use KBUILD_MODNAME ": " fmt

fs logging is generally like the following:

"sysv(sb->s_id): "

with KBUILD_MODNAME ": " :

"sysv: (sb->s_id)"


>
> > +
> > +#include "sysv.h"
> > +
> > +void sysv_err(struct super_block *sb, const char *fmt, ...)
> > +{
> > +Â Âstruct va_format vaf;
> > +Â Âva_list args;
> > +
> > +Â Âva_start(args, fmt);
> > +Â Âvaf.fmt = fmt;
> > +Â Âvaf.va = &args;
> > +Â Âpr_err("(%s): %pV\n", sb->s_id, &vaf);
>
> This trailing \n is not necessary and causes
> blank lines in the log.
>
> All callers already use it.

I could remove it from all callers instead ?
Thanks,
Fabian
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/