Commit 64ea88e3 authored by Li Haoran's avatar Li Haoran Committed by Keith Busch
Browse files

nvmet: replace max(a, min(b, c)) by clamp(val, lo, hi)



This patch replaces max(a, min(b, c)) by clamp(val, lo, hi) in the nvme
driver. The clamp() macro explicitly expresses the intent of constraining
a value within bounds, improving code readability.

Signed-off-by: default avatarLi Haoran <li.haoran7@zte.com.cn>
Signed-off-by: default avatarShao Mingyin <shao.mingyin@zte.com.cn>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent 1be52169
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment