Re: nvme: report capacity 0 for non supported ZNS SSDs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02.11.2020 16:30, Niklas Cassel wrote:
On Mon, Nov 02, 2020 at 04:15:01PM +0000, Javier Gonzalez wrote:

From: Keith Busch <kbusch@xxxxxxxxxx>
Sent: Nov 2, 2020 16:45
To: Javier González <javier@xxxxxxxxxxx>
Cc: linux-nvme@xxxxxxxxxxxxxxxxxxx; linux-block@xxxxxxxxxxxxxxx; hch@xxxxxx; sagi@xxxxxxxxxxx; axboe@xxxxxxxxx; joshi.k@xxxxxxxxxxx; "Klaus B. Jensen" <k.jensen@xxxxxxxxxxx>; Niklas.Cassel@xxxxxxx; Javier Gonzalez <javier.gonz@xxxxxxxxxxx>
Subject: Re: [PATCH V2] nvme: report capacity 0 for non supported ZNS SSDs

On Mon, Nov 02, 2020 at 02:22:14PM +0100, Javier González wrote:
> Changes since V1:
>    - Apply feedback from Niklas:
>        - Use IS_ENABLED() for checking config option

Your v1 was correct. Using IS_ENBALED() attempts to use an undefined
symbol when the CONFIG is not enabled:

Oh. Ok. Will return to that.

Keith is correct, sorry for that.

https://www.kernel.org/doc/html/latest/process/coding-style.html#conditional-compilation

"Thus, you still have to use an #ifdef if the code inside the block
references symbols that will not exist if the condition is not met."


No worries. Thanks for pointing this out - I had seen code with
IS_ENABLED(), but I had not done the necessary reading to determine if
it was something I should use or not. Now I know :)



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux