[PATCH v4 5/6] nvme: Add Support for Opal: Unlock from S3 & Opal Allocation/Ioctls
Keith Busch
keith.busch at intel.com
Wed Jan 18 10:45:05 PST 2017
On Sun, Jan 08, 2017 at 06:20:20AM -0800, Christoph Hellwig wrote:
> > +config BLK_DEV_SED_OPAL
> > + bool "Enable support for Opal Enabled NVMe Device"
> > + depends on BLK_SED_OPAL
> > + default n
> > + ---help---
> > + This enables support for an Opal enabled NVMe device.
>
> I'd like to hear an opinion from Keith as well, but I personally would
> drop this confif option and just enable NVMe OPAL support if core block
> OPAL is supported.
Yes, I'd agree to just dropping this and tying it to BLK_SED_OPAL rather
than having this longer chain of config dependencies.
> > +#ifdef CONFIG_BLK_DEV_SED_OPAL
> > + if (is_sed_ioctl(cmd))
> > + return sed_ioctl(&ns->sed_ctx, cmd, arg);
> > +#endif
>
> To avoid these ifdefs I would suggest to provide an always false
> inline version of is_sed_ioctl and a no-op inline of sed_ioctl
> in the header.
Yeah, see section 20 of the Linux kernel coding-style in
Documentation/process/coding-style.rst on the recommended way of
conditional code depending on config options.
More information about the Linux-nvme
mailing list