public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Chaitanya Kulkarni <chaitanyak@nvidia.com>,
	"hare@suse.de" <hare@suse.de>
Cc: "kbusch@kernel.org" <kbusch@kernel.org>,
	"hch@lst.de" <hch@lst.de>, "sagi@grimberg.me" <sagi@grimberg.me>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [RFC COMPILE ONLY PATCH 0/2] nvme-core: dhchap_secret code cleanup
Date: Tue, 2 May 2023 02:38:26 +0000	[thread overview]
Message-ID: <12e4fa7b-eaf8-5cbc-f0ad-5bb2a251a00f@nvidia.com> (raw)
In-Reply-To: <20230427080207.17249-1-kch@nvidia.com>

Hannes,

On 4/27/23 01:02, Chaitanya Kulkarni wrote:
> Hi,
>
> Marking it compile only RFC since blktests are failing on current
> nvme-6.4 so I was not able to complete the testing.
>
> Bunch of code is repeated all over when defining nvme_ctrl_dhchap_secret
> and nvme_ctrl_dhchap_ctrl_secret. Factor out a common function for
> nvme_ctrl_secret_dhchap_store() and nvme_ctrl_secret_dhchap_ctrl_store()
> into common function nvme_dhchap_secret_store_common().
>
> Add a macro to define device attr in order to remove code duplication
> for above mentioned attributes.
>
> No functional changes in this patch-series.
>
> -ck
>
> Chaitanya Kulkarni (2):
>    nvme-core: factor out common code into helper
>    nvme-core: use macro defination to define dev attr
>
>   drivers/nvme/host/core.c | 128 ++++++++++++++-------------------------
>   1 file changed, 44 insertions(+), 84 deletions(-)
>

it will be great if you can provide some feedback, it removes a lot of
duplicated code and potential bugs that are also duplicated,
so we can add this to next PR ...

-ck



      parent reply	other threads:[~2023-05-02  2:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-27  8:02 [RFC COMPILE ONLY PATCH 0/2] nvme-core: dhchap_secret code cleanup Chaitanya Kulkarni
2023-04-27  8:02 ` [RFC PATCH 1/2] nvme-core: factor out common code into helper Chaitanya Kulkarni
2023-05-02  6:11   ` Hannes Reinecke
2023-05-02  6:48     ` Chaitanya Kulkarni
2023-04-27  8:02 ` [RFC PATCH 2/2] nvme-core: use macro defination to define dev attr Chaitanya Kulkarni
2023-05-02  6:12   ` Hannes Reinecke
2023-05-02  2:38 ` Chaitanya Kulkarni [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=12e4fa7b-eaf8-5cbc-f0ad-5bb2a251a00f@nvidia.com \
    --to=chaitanyak@nvidia.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --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