Re: [PATCH v1 1/1] nvme: fix FDP configuration log parsing
From: Keith Busch
Date: Tue May 26 2026 - 10:51:50 EST
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) {