]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
cxl: Fix comment regarding cxl_query_cmd() return data
authorDave Jiang <dave.jiang@intel.com>
Fri, 13 Sep 2024 22:32:16 +0000 (15:32 -0700)
committerDave Jiang <dave.jiang@intel.com>
Wed, 18 Sep 2024 22:29:29 +0000 (15:29 -0700)
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().

Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/20240913223216.3234173-1-dave.jiang@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/mbox.c

index 915a93ced78fadf945d650c0875357b7302d491b..946f8e44455f79c6dc945e443d35bb75f9ab7ff8 100644 (file)
@@ -546,7 +546,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) {