Message ID | 20221025104243.20836-2-Jonathan.Cameron@huawei.com |
---|---|
State | New, archived |
Headers | show |
Series | CXL: Standalone switch CCI driver | expand |
On 10/25/2022 3:42 AM, Jonathan Cameron wrote: > Given we have cxlds as a local variable, use that rather than > getting it again from cxlmd. > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> This patch can be split out and go upstream as a cleanup now right? > --- > drivers/cxl/core/mbox.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c > index 0c90f13870a4..dd9e0aac37ae 100644 > --- a/drivers/cxl/core/mbox.c > +++ b/drivers/cxl/core/mbox.c > @@ -539,7 +539,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; >
Jonathan Cameron wrote: > Given we have cxlds as a local variable, use that rather than > getting it again from cxlmd. > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Not sure if this ever got sent for real inclusion but it does not look like it landed. So FWIW: Reviewed-by: Ira Weiny <ira.weiny@intel.com> > --- > drivers/cxl/core/mbox.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c > index 0c90f13870a4..dd9e0aac37ae 100644 > --- a/drivers/cxl/core/mbox.c > +++ b/drivers/cxl/core/mbox.c > @@ -539,7 +539,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; > > -- > 2.37.2 >
diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c index 0c90f13870a4..dd9e0aac37ae 100644 --- a/drivers/cxl/core/mbox.c +++ b/drivers/cxl/core/mbox.c @@ -539,7 +539,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;
Given we have cxlds as a local variable, use that rather than getting it again from cxlmd. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> --- drivers/cxl/core/mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)