From: Jeff Layton <jlayton@redhat.com>
To: Joe Perches <joe@perches.com>
Cc: Steve French <sfrench@samba.org>,
linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cifs: Rename cERROR and cifserror to cifs_vfs_err
Date: Wed, 13 Mar 2013 07:51:55 -0400 [thread overview]
Message-ID: <20130313075155.7464a34a@tlielax.poochiereds.net> (raw)
In-Reply-To: <1363174614.2031.9.camel@joe-AO722>
On Wed, 13 Mar 2013 04:36:54 -0700
Joe Perches <joe@perches.com> wrote:
> On Tue, 2013-03-12 at 15:44 -0700, Joe Perches wrote:
> > The cERROR macro is always used as cERROR(1, and cifserror
> > is just a printk(KERN_ERR "CIFS VFS: ".
> >
> > Make a cifs_vfs_err function that uses the vsprintf %pV
> > extension to avoid duplicating the "CIFS VFS: " prefix.
> >
> > Remove the cERROR macro and use cifs_vfs_err directly.
>
> Perhaps a better idea than this patch is to
> change both the cERROR and cFYI macros to
> a new use of cifs_dbg(type, fmt, ...)
>
> cERROR(set, fmt, ...) -> cifs_dbg(VFS, fmt, ...)
> cFYI(set, fmt, ...) -> cifs_dbg(FYI, fmt, ...)
>
> This conversion would mark both these macros
> as debug stataments as they are only enabled
> with CONFIG_CIFS_DEBUG.
>
> Also CONFIG_CIFS_DEBUG2 use of DBG could also
> be integrated with the same style.
>
> cFYI(DBG2, fmt, ...) -> cifs_dbg(NOISY, fmt, ...)
>
> The reduced object size would still apply.
>
> This would also enable an easier conversion to
> dynamic debugging of these debug macros.
>
> I'd prefer to move the newline from the macro
> to the format as that is more consistent with
> the rest of the kernel.
>
> Thoughts?
>
I like this change overall, but the size of the patch is pretty
daunting. If you could change the code that underlies cERROR() and
cFYI() without needing to touch all of their call sites, it might be
a simpler initial step.
OTOH, I would also prefer to move the newline into the format and
that's impossible without touching most of these call sites.
--
Jeff Layton <jlayton@redhat.com>
next prev parent reply other threads:[~2013-03-13 11:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 22:44 Joe Perches
2013-03-13 11:36 ` Joe Perches
2013-03-13 11:51 ` Jeff Layton [this message]
2013-03-13 12:40 ` Joe Perches
2013-03-14 19:24 ` [PATCH] cifs: Rename cERROR and cFYI to cifs_dbg Joe Perches
2013-03-15 18:56 ` Jeff Layton
2013-03-15 19:01 ` Jeff Layton
[not found] ` <CAH2r5mvW29FV+stH5CsjY5S2FdaHn48TfiSEk_beC=NzHC7-MQ@mail.gmail.com>
2013-03-15 20:43 ` Joe Perches
2013-03-25 4:44 ` Steve French
2013-03-15 21:46 ` Fwd: " Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130313075155.7464a34a@tlielax.poochiereds.net \
--to=jlayton@redhat.com \
--cc=joe@perches.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sfrench@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®