Skip to contentSkip to conversation

cxl: Fix comment regarding cxl_query_cmd() return data

PATCH In review Dave Jiang 2 participants 2 messages Sep 13, 2024 – Sep 17, 2024 CXL

lore
Share & tools
lore

Dave Jiang

author maintainer
#0 lore raw

PATCH 1/1 cxl: Fix comment regarding cxl_query_cmd() return data

The code indicates that the min of n_commands and total commands is returned. The comment incorrectly says it's the max(). Correct comment to min().

---
 drivers/cxl/core/mbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cxl/core/mbox.c +1 -1
index 2626f3fff201..8598199efa09 100644
@@ -542,7 +542,7 @@ int cxl_query_cmd(struct cxl_memdev *cxlmd,
 		return put_user(ARRAY_SIZE(cxl_mem_commands), &q->n_commands);
 
 	/*
-	 * otherwise, return max(n_commands, total commands) cxl_command_info
+	 * otherwise, return min(n_commands, total commands) cxl_command_info
 	 * structures.
 	 */
 	cxl_for_each_cmd(cmd) {
Signature · 1 line
2.46.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Dave Jiang

The code indicates that the min of n_commands and total commands is returned. The comment incorrectly says it's the max(). Correct comment to min().

Quoted 23 lines
---
 drivers/cxl/core/mbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cxl/core/mbox.c +1 -1
index 2626f3fff201..8598199efa09 100644
@@ -542,7 +542,7 @@ int cxl_query_cmd(struct cxl_memdev *cxlmd,
 		return put_user(ARRAY_SIZE(cxl_mem_commands), &q->n_commands);
 
 	/*
-	 * otherwise, return max(n_commands, total commands) cxl_command_info
+	 * otherwise, return min(n_commands, total commands) cxl_command_info
 	 * structures.
 	 */
 	cxl_for_each_cmd(cmd) {
Signature · 1 line
2.46.0