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

On Thu, Apr 16, 2026 at 07:23:58PM -0500, Ira Weiny wrote:
>> 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...
> 
yeah it's not, sorry :((( the assignment was added in the dcd patches and I
dropped it while resolving the conflicts during the rebase cuz I was just in a
rush to finish it

I realized the error and said "pls ignore it I was wrong" in the original thread here:
https://lore.kernel.org/linux-cxl/ad0hJ1q5Lp5mckt1@4470NRD-ASU.ssi.samsung.com/T/#u

but I definitely should have mentioned it here too. anyway sorry, just pretend
I never said anything

- Anisa
> -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 17:17 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
2026-04-17 17:17   ` Anisa Su [this message]
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=aeJrI1S5omou28MQ@4470NRD-ASU.ssi.samsung.com \
    --to=anisa.su887@gmail.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=gourry@gourry.net \
    --cc=ira.weiny@intel.com \
    --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