diff options
author | Li Haoran <li.haoran7@zte.com.cn> | 2025-03-31 15:55:11 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2025-04-03 10:54:31 -0400 |
commit | a63b69f05f999acae91b0b50d7c5fe4fb241dbaf (patch) | |
tree | 19a06ef97994f595654000707723c871eee2d3fa /rust/helpers/helpers.c | |
parent | 1fd2e77b889761d9bde0c580518689d1d8e83117 (diff) | |
download | linux-stable-a63b69f05f999acae91b0b50d7c5fe4fb241dbaf.tar.gz linux-stable-a63b69f05f999acae91b0b50d7c5fe4fb241dbaf.tar.bz2 linux-stable-a63b69f05f999acae91b0b50d7c5fe4fb241dbaf.zip |
scsi: scsi_transport_srp: Replace min/max nesting with clamp()
This patch replaces min(a, max(b, c)) by clamp(val, lo, hi) in the SRP
transport layer. The clamp() macro explicitly expresses the intent of
constraining a value within bounds, improving code readability.
Signed-off-by: Li Haoran <li.haoran7@zte.com.cn>
Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
Link: https://lore.kernel.org/r/202503311555115618U8Md16mKpRYOIy2TOmB6@zte.com.cn
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions