linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hch@infradead.org (Christoph Hellwig)
Subject: [PATCH V2] nvme-core: add async event trace helper
Date: Fri, 14 Sep 2018 03:03:08 -0700	[thread overview]
Message-ID: <20180914100308.GA8892@infradead.org> (raw)
In-Reply-To: <BYAPR04MB4502ED2C1C2691C07DF7485D861B0@BYAPR04MB4502.namprd04.prod.outlook.com>

On Wed, Sep 12, 2018@05:51:23AM +0000, Chaitanya Kulkarni wrote:
>         switch ((result & 0xff00) >> 8) {
>         case NVME_AER_NOTICE_NS_CHANGED:
> +               trace_nvme_async_event(ctrl, (result & 0xff00) >> 8);
>                 set_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events);
>                 nvme_queue_scan(ctrl);
>                 break;
>         case NVME_AER_NOTICE_FW_ACT_STARTING:
> +               trace_nvme_async_event(ctrl, (result & 0xff00) >> 8);
>                 queue_work(nvme_wq, &ctrl->fw_act_work);
>                 break;
>  #ifdef CONFIG_NVME_MULTIPATH
>         case NVME_AER_NOTICE_ANA:
> +               trace_nvme_async_event(ctrl, (result & 0xff00) >> 8);

I think we want a local variable so that we only do the mask and shift
once.

> +#ifdef CONFIG_NVME_MULTIPATH
> +                       aer_name(NVME_AER_NOTICE_ANA)
> +#endif

I don't think we need the ifdef as the symbol is always defined.

Otherwise this looks good to me.

      reply	other threads:[~2018-09-14 10:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29 22:19 [PATCH V2] nvme-core: add async event trace helper Chaitanya Kulkarni
2018-09-11  7:19 ` Christoph Hellwig
2018-09-12  5:51   ` Chaitanya Kulkarni
2018-09-14 10:03     ` Christoph Hellwig [this message]

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=20180914100308.GA8892@infradead.org \
    --to=hch@infradead.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;
as well as URLs for NNTP newsgroup(s).