From: Tejun Heo <htejun@gmail.com>
To: Borislav Petkov <bbpetkov@yahoo.de>
Cc: linux-ide <linux-ide@vger.kernel.org>, Jeff Garzik <jgarzik@pobox.com>
Subject: Re: [PATCH 1/9] libata: change debugging macros/adjust dbg levels
Date: Fri, 30 Jun 2006 06:22:09 +0900 [thread overview]
Message-ID: <44A44481.10001@gmail.com> (raw)
In-Reply-To: <44A443FE.9090607@gmail.com>
Tejun Heo wrote:
> Borislav Petkov wrote:
>> On Fri, Jun 30, 2006 at 03:09:16AM +0900, Tejun Heo wrote:
>>> Please make
>>>
>>> + ATA_MSG_ERR = 0,
>>> + ATA_MSG_WARN = 1,
>>> + ATA_MSG_DRV = 2,
>>> + ATA_MSG_INFO = 3, /* revalidation messages, EH progress */
>>> + ATA_MSG_VDEBUG = 4, /* verbose hot path */
>>> + ATA_MSG_CMD = 5, /* issue / completion */
>>> + ATA_MSG_SG = 6, /* SG map/unmap handling */
>>> + ATA_MSG_TRACE = 7, /* function tracing, e.g. enter/exit */
>>>
>>> And test for msg_enable & (1 << (lv)). Otherwise the array will be
>>> unnecessarily large.
>> Yeah, but this won't work:
>> imagine default level is:
>> msg_enable = ATA_MSG_INFO;
>
> You can do "msg_enable |= (1 << ATA_MSG_INFO)" or keep ATA_MSG_*'s as
> bit masks and use fls() to index into level array. Just make sure that
> the level array isn't 512 entries long.
>
Oh, one more thing, in libata, when specifying bit mask, we use
ATA_MSG_WARN = (1 << 1), instead of ATA_MSG_ERR = 0x02. Just a style
thing. :-)
--
tejun
next prev parent reply other threads:[~2006-06-29 21:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-29 16:09 [PATCH 1/9] libata: change debugging macros/adjust dbg levels Borislav Petkov
2006-06-29 16:27 ` Tejun Heo
2006-06-29 17:27 ` Borislav Petkov
2006-06-29 18:09 ` Tejun Heo
2006-06-29 20:53 ` Borislav Petkov
2006-06-29 21:19 ` Tejun Heo
2006-06-29 21:22 ` Tejun Heo [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-06-30 6:45 Borislav Petkov
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=44A44481.10001@gmail.com \
--to=htejun@gmail.com \
--cc=bbpetkov@yahoo.de \
--cc=jgarzik@pobox.com \
--cc=linux-ide@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.