Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@linux.intel.com (Keith Busch)
Subject: [PATCHv4 2/4] nvme: use hw qid in trace events
Date: Mon, 2 Jul 2018 08:49:01 -0600	[thread overview]
Message-ID: <20180702144900.GA22806@localhost.localdomain> (raw)
In-Reply-To: <20180702131107.GB4624@lst.de>

On Mon, Jul 02, 2018@03:11:08PM +0200, Christoph Hellwig wrote:
> > 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.

Sure, I can respin these as inline functions.

  reply	other threads:[~2018-07-02 14:49 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
2018-07-02 14:49     ` Keith Busch [this message]
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=20180702144900.GA22806@localhost.localdomain \
    --to=keith.busch@linux.intel.com \
    /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