[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa2a3a8041b9d814654f0dae4607e1a2f20d333d.camel@perches.com>
Date: Wed, 25 May 2022 08:18:22 -0700
From: Joe Perches <joe@...ches.com>
To: Yu Zhe <yuzhe@...china.com>, tytso@....edu,
adilger.kernel@...ger.ca
Cc: linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org,
liqiong@...china.com
Subject: Re: [PATCH] ext4: add KERN_<LEVEL> for printk()
On Wed, 2022-05-25 at 05:48 -0700, Yu Zhe wrote:
> printk() should include KERN_<LEVEL> facility level, add them.
NACK.
checkpatch is just a guide.
You have to inspect the code to determine if what checkpatch emits
should be followed or ignored.
> diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
[]
> @@ -628,7 +628,7 @@ static struct stats dx_show_leaf(struct inode *dir,
> char *base = (char *) de;
> struct dx_hash_info h = *hinfo;
>
> - printk("names: ");
> + printk(KERN_WARNING "names: ");
> while ((char *) de < base + size)
> {
> if (de->inode)
> @@ -648,7 +648,7 @@ static struct stats dx_show_leaf(struct inode *dir,
> /* Directory is not encrypted */
> ext4fs_dirhash(dir, de->name,
> de->name_len, &h);
> - printk("%*.s:(U)%x.%u ", len,
> + printk(KERN_WARNING "%*.s:(U)%x.%u ", len,
_might_ use KERN_CONT,
> name, h.hash,
> (unsigned) ((char *) de
> - base));
> @@ -683,7 +683,7 @@ static struct stats dx_show_leaf(struct inode *dir,
> else
> ext4fs_dirhash(dir, de->name,
> de->name_len, &h);
> - printk("%*.s:(E)%x.%u ", len, name,
> + printk(KERN_WARNING "%*.s:(E)%x.%u ", len, name,
and here, etc...
[]
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
[]
> @@ -941,9 +941,9 @@ void __ext4_msg(struct super_block *sb,
> vaf.fmt = fmt;
> vaf.va = &args;
> if (sb)
> - printk("%sEXT4-fs (%s): %pV\n", prefix, sb->s_id, &vaf);
> + printk(KERN_WARNING "%sEXT4-fs (%s): %pV\n", prefix, sb->s_id, &vaf);
You broke the logging here.
Did you check what prefix is and how it is used in ext4_msg ?
> else
> - printk("%sEXT4-fs: %pV\n", prefix, &vaf);
> + printk(KERN_WARNING "%sEXT4-fs: %pV\n", prefix, &vaf);
> va_end(args);
> }
>
Powered by blists - more mailing lists