public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Chaitanya Kulkarni <kch@nvidia.com>
Cc: linux-nvme@lists.infradead.org, hch@lst.de, sagi@grimberg.me,
	kbusch@kernel.org
Subject: Re: [PATCH] nvme: add ctrl state machine pdf creator
Date: Thu, 28 Jul 2022 20:40:22 +0200	[thread overview]
Message-ID: <20220728184022.GB22439@lst.de> (raw)
In-Reply-To: <20220727215424.5252-1-kch@nvidia.com>

On Wed, Jul 27, 2022 at 02:54:24PM -0700, Chaitanya Kulkarni wrote:
> It is not always easy to read the NVMe Host controller state machine
> quickly written in C when debugging the code for various transports.
> 
> This adds a simple dot based state machine for the host controller that
> creates pdf. The resulting pdf is easier to understand and process.

So, the graph looks pretty, but I'm a little worried that having a
separate copy of the transitions somewhere out in Documentation/
just means it will become out of date very quickly.  Can we instead
come up with macros that allow to both generate the code and the
visualization?

e.g.

	switch (new_state) {
	FROM_STATE(NVME_CTRL_LIVE);
		TO_STATE(NVME_CTRL_NEW);
		TO_STATE(NVME_CTRL_RESETTING);
		TO_STATE(NVME_CTRL_CONNECTING);
		END_STATE();
	..



  reply	other threads:[~2022-07-28 18:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-27 21:54 [PATCH] nvme: add ctrl state machine pdf creator Chaitanya Kulkarni
2022-07-28 18:40 ` Christoph Hellwig [this message]
2022-07-28 23:07   ` Chaitanya Kulkarni

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=20220728184022.GB22439@lst.de \
    --to=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=kch@nvidia.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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