public inbox for linux-cxl@vger.kernel.org
 help / color / mirror / Atom feed
From: Ira Weiny <ira.weiny@intel.com>
To: Anisa Su <anisa.su887@gmail.com>, <dave.jiang@intel.com>,
	<gourry@gourry.net>
Cc: <dave@stgolabs.net>, <jonathan.cameron@huawei.com>,
	<alison.schofield@intel.com>, <ira.weiny@intel.com>,
	<dan.j.williams@intel.com>, <linux-cxl@vger.kernel.org>,
	Anisa Su <anisa.su@samsung.com>
Subject: Re: [PATCH] cxl/core/region_dax.c: fix missing assignment in cxl_dax_region_alloc()
Date: Thu, 16 Apr 2026 19:23:58 -0500	[thread overview]
Message-ID: <69e17d9ee2924_52a121009@iweiny-mobl.notmuch> (raw)
In-Reply-To: <20260411011137.43545-1-anisa.su@samsung.com>

Anisa Su wrote:
> cxlr->cxlr_dax assignment was dropped during refactor.
> 
> Fixes: d747cf98f091 cxl/core/region: move dax region device logic into
> region_dax.c

I don't believe this is a valid fixes tag.

Looking only at commit d747cf98f091, this line does not appear in the
original function...

-static struct cxl_dax_region *cxl_dax_region_alloc(struct cxl_region *cxlr)
-{
-       struct cxl_region_params *p = &cxlr->params;
-       struct cxl_dax_region *cxlr_dax;
-       struct device *dev;
-
-       guard(rwsem_read)(&cxl_rwsem.region);
-       if (p->state != CXL_CONFIG_COMMIT)
-               return ERR_PTR(-ENXIO);
-
-       cxlr_dax = kzalloc_obj(*cxlr_dax);
-       if (!cxlr_dax)
-               return ERR_PTR(-ENOMEM);
-
-       cxlr_dax->hpa_range.start = p->res->start;
-       cxlr_dax->hpa_range.end = p->res->end;
-
-       dev = &cxlr_dax->dev;
-       cxlr_dax->cxlr = cxlr;
-       device_initialize(dev);
-       lockdep_set_class(&dev->mutex, &cxl_dax_region_key);
-       device_set_pm_not_required(dev);
-       dev->parent = &cxlr->dev;
-       dev->bus = &cxl_bus_type;
-       dev->type = &cxl_dax_region_type;
-
-       return cxlr_dax;
-}


Furthermore, I don't see where this line ever appeared in
cxl_dax_region_alloc() prior to commit d747cf98f091.

So what is the purpose of this change?

Ira


> Signed-off-by: Anisa Su <anisa.su@samsung.com>
> ---
>  drivers/cxl/core/region_dax.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cxl/core/region_dax.c b/drivers/cxl/core/region_dax.c
> index de04f78f6ad8..068690d02c8c 100644
> --- a/drivers/cxl/core/region_dax.c
> +++ b/drivers/cxl/core/region_dax.c
> @@ -62,6 +62,7 @@ static struct cxl_dax_region *cxl_dax_region_alloc(struct cxl_region *cxlr)
>  
>  	dev = &cxlr_dax->dev;
>  	cxlr_dax->cxlr = cxlr;
> +	cxlr->cxlr_dax = cxlr_dax;
>  	device_initialize(dev);
>  	lockdep_set_class(&dev->mutex, &cxl_dax_region_key);
>  	device_set_pm_not_required(dev);
> -- 
> 2.43.0
> 



  reply	other threads:[~2026-04-17  0:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-11  1:11 [PATCH] cxl/core/region_dax.c: fix missing assignment in cxl_dax_region_alloc() Anisa Su
2026-04-17  0:23 ` Ira Weiny [this message]
2026-04-17 17:17   ` Anisa Su
2026-04-17 20:38     ` Ira Weiny
2026-04-17 20:39     ` Ira Weiny
2026-04-17 20:35 ` kernel test robot
2026-04-18  4:09 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69e17d9ee2924_52a121009@iweiny-mobl.notmuch \
    --to=ira.weiny@intel.com \
    --cc=alison.schofield@intel.com \
    --cc=anisa.su887@gmail.com \
    --cc=anisa.su@samsung.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=gourry@gourry.net \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-cxl@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox