[PATCH v1 1/1] nvme: fix FDP configuration log parsing

Keith Busch kbusch at kernel.org
Tue May 26 07:41:03 PDT 2026


On Tue, May 26, 2026 at 03:52:38PM +0800, liuxixin wrote:
> @@ -2262,10 +2263,10 @@ static int nvme_query_fdp_granularity(struct nvme_ctrl *ctrl,
>  		goto out;
>  	}
>  
> -	n = le16_to_cpu(h->numfdpc) + 1;
> -	if (fdp_idx > n) {
> +	numfdpc = le16_to_cpu(h->numfdpc);
> +	if (fdp_idx > numfdpc) {

Can't this be fixed with just a simpler one-line change:

+	if (fdp_idx >= n) {



More information about the Linux-nvme mailing list