[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_30DA5E4827F37333AE881122DCE054DC9008@qq.com>
Date: Mon, 7 Apr 2025 11:41:09 +0800
From: xiaopeitux@...mail.com
To: dave@...olabs.net,
jonathan.cameron@...wei.com,
dave.jiang@...el.com,
alison.schofield@...el.com,
vishal.l.verma@...el.com,
ira.weiny@...el.com,
dan.j.williams@...el.com,
linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Pei Xiao <xiaopei01@...inos.cn>
Subject: [PATCH] cxl : fix cxlctl_validate_hw_command() warn: always true condition
From: Pei Xiao <xiaopei01@...inos.cn>
smatch warnings:
drivers/cxl/core/features.c:441 cxlctl_validate_hw_command()
warn: always true condition '(scope >= 0) => (0-u32max >= 0)'
remove always true condition.
Signed-off-by: Pei Xiao <xiaopei01@...inos.cn>
---
drivers/cxl/core/features.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/cxl/core/features.c b/drivers/cxl/core/features.c
index f4daefe3180e..fdca93c984ce 100644
--- a/drivers/cxl/core/features.c
+++ b/drivers/cxl/core/features.c
@@ -616,9 +616,8 @@ static bool cxlctl_validate_hw_command(struct cxl_features_state *cxlfs,
case CXL_MBOX_OP_GET_FEATURE:
if (cxl_mbox->feat_cap < CXL_FEATURES_RO)
return false;
- if (scope >= FWCTL_RPC_CONFIGURATION)
+ else
return true;
- return false;
case CXL_MBOX_OP_SET_FEATURE:
if (cxl_mbox->feat_cap < CXL_FEATURES_RW)
return false;
--
2.25.1
Powered by blists - more mailing lists