[PATCH] nvme: tuning pr code by using defined structs and macros
Christoph Hellwig
hch at lst.de
Tue Nov 19 08:21:12 PST 2024
On Tue, Nov 19, 2024 at 06:29:25PM +0800, Guixin Liu wrote:
> All the modifications are simply to make the code more readable,
> and this patch does not include any functional changes.
>
> Signed-off-by: Guixin Liu <kanie at linux.alibaba.com>
> ---
> drivers/nvme/host/pr.c | 125 +++++++++++++++++++++++++----------------
> 1 file changed, 78 insertions(+), 47 deletions(-)
>
> diff --git a/drivers/nvme/host/pr.c b/drivers/nvme/host/pr.c
> index dc7922f22600..3fd292badd42 100644
> --- a/drivers/nvme/host/pr.c
> +++ b/drivers/nvme/host/pr.c
> @@ -9,6 +9,9 @@
>
> #include "nvme.h"
>
> +#define NVME_PR_SET_PTPL_TO_PERSIST ((1 << 30) | (1 << 31))
> +#define NVME_PR_IGNORE_KEY (1 << 3)
Normally definitions should go into linux/nvme.h. I'd also
normally expect the different CPTPL bits to be defined separately.
More information about the Linux-nvme
mailing list