public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>,
	Chaitanya Kulkarni <chaitanyak@nvidia.com>,
	Gerd Bayer <gbayer@linux.ibm.com>,
	"asahi@lists.linux.dev" <asahi@lists.linux.dev>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH 02/12] nvme: move OPAL setup from PCIe to core
Date: Wed, 9 Nov 2022 23:22:27 +0000	[thread overview]
Message-ID: <576b8902-0cba-3250-620b-fb5ef21ea6de@nvidia.com> (raw)
In-Reply-To: <Y2wRHHdAGHqJA/7Q@kbusch-mbp.dhcp.thefacebook.com>

On 11/9/22 12:44, Keith Busch wrote:
> On Tue, Nov 08, 2022 at 04:02:42PM +0100, Christoph Hellwig wrote:
>> -#ifdef CONFIG_BLK_SED_OPAL
>> -int nvme_sec_submit(void *data, u16 spsp, u8 secp, void *buffer, size_t len,
>> +static int nvme_sec_submit(void *data, u16 spsp, u8 secp, void *buffer, size_t len,
>>   		bool send)
>>   {
>>   	struct nvme_ctrl *ctrl = data;
>> @@ -2198,8 +2197,21 @@ int nvme_sec_submit(void *data, u16 spsp, u8 secp, void *buffer, size_t len,
>>   	return __nvme_submit_sync_cmd(ctrl->admin_q, &cmd, NULL, buffer, len,
>>   			NVME_QID_ANY, 1, 0);
>>   }
>> -EXPORT_SYMBOL_GPL(nvme_sec_submit);
>> -#endif /* CONFIG_BLK_SED_OPAL */
> 
> It looks like you need to keep the #ifdef. The compiler knows it's not
> used without it:
> 
>    drivers/nvme/host/core.c:2183:12: warning: 'nvme_sec_submit' defined but not used [-Wunused-function]
>     static int nvme_sec_submit(void *data, u16 spsp, u8 secp, void *buffer, size_t len,
> 

why not move the sed-opal-code into its own file ?
and remove that #ifdefs altogether and conditionally compile the
file like zns?

-ck


  reply	other threads:[~2022-11-09 23:22 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 15:02 RFC: nvme-pci: split the probe and reset handlers Christoph Hellwig
2022-11-08 15:02 ` [PATCH 01/12] nvme-pci: don't call nvme_init_ctrl_finish from nvme_passthru_end Christoph Hellwig
2022-11-09  2:55   ` Sagi Grimberg
2022-11-09  6:26     ` Christoph Hellwig
2022-11-08 15:02 ` [PATCH 02/12] nvme: move OPAL setup from PCIe to core Christoph Hellwig
2022-11-09  2:55   ` Sagi Grimberg
2022-11-09 20:44   ` Keith Busch
2022-11-09 23:22     ` Chaitanya Kulkarni [this message]
2022-11-13 16:15       ` Christoph Hellwig
2022-11-08 15:02 ` [PATCH 03/12] nvme: simplify transport specific device attribute handling Christoph Hellwig
2022-11-09  2:57   ` Sagi Grimberg
2022-11-08 15:02 ` [PATCH 04/12] nvme-pci: put the admin queue in nvme_dev_remove_admin Christoph Hellwig
2022-11-09  2:58   ` Sagi Grimberg
2022-11-09  6:28     ` Christoph Hellwig
2022-11-08 15:02 ` [PATCH 05/12] nvme-pci: move more teardown work to nvme_remove Christoph Hellwig
2022-11-09  3:00   ` Sagi Grimberg
2022-11-08 15:02 ` [PATCH 06/12] nvme-pci: factor the iod mempool creation into a helper Christoph Hellwig
2022-11-09  3:00   ` Sagi Grimberg
2022-11-08 15:02 ` [PATCH 07/12] nvme-pci: factor out a nvme_pci_alloc_ctrl helper Christoph Hellwig
2022-11-09  3:03   ` Sagi Grimberg
2022-11-09  6:28     ` Christoph Hellwig
2022-11-08 15:02 ` [PATCH 08/12] nvme-pci: set constant paramters in nvme_pci_alloc_ctrl Christoph Hellwig
2022-11-09  3:03   ` Sagi Grimberg
2022-11-08 15:02 ` [PATCH 09/12] nvme-pci: call nvme_pci_configure_admin_queue from nvme_pci_enable Christoph Hellwig
2022-11-09  3:04   ` Sagi Grimberg
2022-11-08 15:02 ` [PATCH 10/12] nvme-pci: split nvme_dbbuf_dma_alloc Christoph Hellwig
2022-11-09  3:05   ` Sagi Grimberg
2022-11-08 15:02 ` [PATCH 11/12] nvme-pci: split the initial probe from the rest path Christoph Hellwig
2022-11-09  3:14   ` Sagi Grimberg
2022-11-09  6:31     ` Christoph Hellwig
2022-11-09 17:00       ` Keith Busch
2022-11-09 15:18   ` Gerd Bayer
2022-11-09 15:51   ` Keith Busch
2022-11-09 15:56   ` Keith Busch
2022-11-10  3:17   ` Chao Leng
2022-11-13 16:19     ` Christoph Hellwig
2022-11-08 15:02 ` [PATCH 12/12] nvme-pci: don't unbind the driver on reset failure Christoph Hellwig
2022-11-09  3:15   ` Sagi Grimberg
2022-11-09 17:10   ` Keith Busch
2022-11-09 17:12 ` RFC: nvme-pci: split the probe and reset handlers Keith Busch

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=576b8902-0cba-3250-620b-fb5ef21ea6de@nvidia.com \
    --to=chaitanyak@nvidia.com \
    --cc=asahi@lists.linux.dev \
    --cc=gbayer@linux.ibm.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.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