From mboxrd@z Thu Jan 1 00:00:00 1970 From: bvanassche@acm.org (Bart Van Assche) Date: Mon, 29 Apr 2019 16:27:04 -0700 Subject: [PATCH V2 1/3] nvme: introduce nvme-ctrl state name string array In-Reply-To: References: <20190429032442.5923-1-chaitanya.kulkarni@wdc.com> <20190429032442.5923-2-chaitanya.kulkarni@wdc.com> <067b8ef5-abea-2bc8-9da5-a39ac3b54a1b@intel.com> Message-ID: <1556580424.161891.170.camel@acm.org> On Mon, 2019-04-29@22:12 +0000, Chaitanya Kulkarni wrote: > On 04/29/2019 10:41 AM, Heitke, Kenneth wrote: > > > > > > On 4/28/2019 9:24 PM, Chaitanya Kulkarni wrote: > > > From: Hannes Reinecke > > > > > > This patch intoduces nvme-ctrl state name array which is used inthe the > > > > s/intoduces /introduces/ > > s/inthe/in the/ > > > > > later patch to improve the logging of the ctrl state. > > > > > > Signed-off-by: Hannes Reinecke > > > Signed-off-by: Chaitanya Kulkarni > > > --- > > > drivers/nvme/host/nvme.h | 10 ++++++++++ > > > 1 file changed, 10 insertions(+) > > > > > > diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h > > > index 527d64545023..01a36bbafed6 100644 > > > --- a/drivers/nvme/host/nvme.h > > > +++ b/drivers/nvme/host/nvme.h > > > @@ -146,6 +146,16 @@ enum nvme_ctrl_state { > > > NVME_CTRL_DEAD, > > > }; > > > > > > +static const char *const nvme_ctrl_state_name[] = { > > > + [NVME_CTRL_NEW] = "new", > > > + [NVME_CTRL_LIVE] = "live", > > > + [NVME_CTRL_ADMIN_ONLY] = "only-admin", > > > + [NVME_CTRL_RESETTING] = "resetting", > > > + [NVME_CTRL_CONNECTING] = "connecting", > > > + [NVME_CTRL_DELETING] = "deleting", > > > + [NVME_CTRL_DEAD] = "dead", > > > +}; > > > > I haven't been paying attention if this was bought up before but won't > > this create multiple copies of this data for every source file the > > includes the header file? > > Yes, we did discuss this. Hi Chaitanya, In an e-mail from Christoph I found the following recommendation with regard to the nvme_ctrl_state_name[] array: "Just keep it near the top of multipath.c." and you replied "Okay, that works too." Did I perhaps miss something? Thanks, Bart.