[PATCH] nvme-pci: Make nvme_pci_npages_prp() __always_inline

Keith Busch kbusch at kernel.org
Wed May 7 09:00:42 PDT 2025


On Wed, May 07, 2025 at 08:53:06AM -0700, Kees Cook wrote:
> 
> So, the solution for the "accidentally depending on a function to be
> inlined by the compiler" is to mark it as _required_ to be inlined,
> which given its singular use in BUILD_BUG_ON(), looks like the correct
> solution.

That sounds fine to me. Or maybe this should be a #define instead. It
looks like this nvme function evolved from a very different purpose when
it wasn't an integer constant expression, and the comment above it is
outdated.



More information about the Linux-nvme mailing list