All of lore.kernel.org
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCHv4 2/4] nvme: use hw qid in trace events
Date: Mon, 2 Jul 2018 15:11:08 +0200	[thread overview]
Message-ID: <20180702131107.GB4624@lst.de> (raw)
In-Reply-To: <20180629225003.16567-3-keith.busch@intel.com>

> diff --git a/drivers/nvme/host/trace.h b/drivers/nvme/host/trace.h
> index 01390f0e1671..6f9ee5fe5e09 100644
> --- a/drivers/nvme/host/trace.h
> +++ b/drivers/nvme/host/trace.h
> @@ -24,6 +24,15 @@
>  
>  #include "nvme.h"
>  
> +#define __assign_nvme_qid(req, qid)					\
> +	do {								\
> +		if (req->rq_disk)					\
> +			qid = 1 + blk_mq_unique_tag_to_hwq(		\
> +					blk_mq_unique_tag(req));	\
> +		else							\
> +			qid = 0;					\
> +	} while (0)

Why can't we use an inline function for this?

Relying on assining to macro paramters is a good way to generate
unreadable code.

  parent reply	other threads:[~2018-07-02 13:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-29 22:49 [PATCHv4 0/4] nvme trace updates Keith Busch
2018-06-29 22:50 ` [PATCHv4 1/4] nvme: cache struct nvme_ctrl reference to struct nvme_request Keith Busch
2018-06-29 22:50 ` [PATCHv4 2/4] nvme: use hw qid in trace events Keith Busch
2018-07-02  7:16   ` Johannes Thumshirn
2018-07-02 13:11   ` Christoph Hellwig [this message]
2018-07-02 14:49     ` Keith Busch
2018-07-02 15:10       ` Christoph Hellwig
2018-07-02 15:24         ` Keith Busch
2018-06-29 22:50 ` [PATCHv4 3/4] nvme: add controller name to " Keith Busch
2018-07-02  7:16   ` Johannes Thumshirn
2018-06-29 22:50 ` [PATCHv4 4/4] nvme: add disk " Keith Busch
2018-07-02  7:17   ` Johannes Thumshirn
2018-07-02 13:12   ` Christoph Hellwig
2018-07-01  8:35 ` [PATCHv4 0/4] nvme trace updates Sagi Grimberg

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=20180702131107.GB4624@lst.de \
    --to=hch@lst.de \
    /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.