From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jorgyano Vieira <jorgyano@gmail.com>
Cc: gregkh@linuxfoundation.org, devel@linuxdriverproject.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: crystalhd: crystalhd_misc: improved debug macros
Date: Wed, 15 Feb 2012 09:40:59 +0300 [thread overview]
Message-ID: <20120215064059.GO4141@mwanda> (raw)
In-Reply-To: <1329272406-26198-1-git-send-email-jorgyano@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1148 bytes --]
On Wed, Feb 15, 2012 at 12:20:06AM -0200, Jorgyano Vieira wrote:
> Improvement of debug macros to ensure safe use on if/else statements.
>
How are the originals unsafe? The changelog should say how this is
an improvement. Something like "I put do { ... } while(0) around
the macros so it matches the rest of the kernel."
Really we want to get rid of these. It would be easy to delete
BCMLOG_ENTER and BCMLOG_LEAVE right now. They're only used for five
functions. BCMLOG() is slightly complicated. BCMLOG_ERR() could
be sed replaced with pr_err().
So could you do that instead? Send a patch to remove BCMLOG_ENTER
and BCMLOG_LEAVE? Then send another patch to replace BCMLOG_ERR()
with pr_err(). Take a look at how the pr_fmt macro is used for
this. Don't actually do it with sed. Take the time and review each
printk() and notice bugs as you go along. You could replace them
file by file if you wanted or all at once, which ever is easier for
you. Then send a third patch to add the do {} while(0) block to
BCMLOG() until someone works up enough motivation to fix it
properly?
regards,
dan carpenter
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-02-15 6:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-15 2:20 [PATCH] Staging: crystalhd: crystalhd_misc: improved debug macros Jorgyano Vieira
2012-02-15 6:40 ` Dan Carpenter [this message]
2012-02-15 11:26 ` Jorgyano vieira
2012-02-15 13:35 ` Dan Carpenter
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=20120215064059.GO4141@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jorgyano@gmail.com \
--cc=linux-kernel@vger.kernel.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