diff mbox series

[v3] cxl/mbox: Use local cxl_device_state variable

Message ID 20230222140419.17750-1-Jonathan.Cameron@huawei.com
State New, archived
Headers show
Series [v3] cxl/mbox: Use local cxl_device_state variable | expand

Commit Message

Jonathan Cameron Feb. 22, 2023, 2:04 p.m. UTC
Given we have cxlds as a local variable, use that rather than
getting it again from cxlmd.

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

--

v3: Separated from the series CXL: Standalone switch CCI driver
after Dave and Ira both pointed out we might as well send this
tidy up separately.
---
 drivers/cxl/core/mbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
index f2addb457172..830e4714ffd1 100644
--- a/drivers/cxl/core/mbox.c
+++ b/drivers/cxl/core/mbox.c
@@ -548,7 +548,7 @@  int cxl_send_cmd(struct cxl_memdev *cxlmd, struct cxl_send_command __user *s)
 	if (copy_from_user(&send, s, sizeof(send)))
 		return -EFAULT;
 
-	rc = cxl_validate_cmd_from_user(&mbox_cmd, cxlmd->cxlds, &send);
+	rc = cxl_validate_cmd_from_user(&mbox_cmd, cxlds, &send);
 	if (rc)
 		return rc;