public inbox for linux-cxl@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: Alison Schofield <alison.schofield@intel.com>
Cc: linux-cxl@vger.kernel.org, alejandro.lucero-palau@amd.com,
	dan.j.williams@intel.com, ira.weiny@intel.com,
	vishal.l.verma@intel.com, Jonathan.Cameron@huawei.com,
	dave@stgolabs.net, fan.ni@samsung.com,
	Alejandro Lucero <alucerop@amd.com>
Subject: Re: [PATCH v3 1/3] cxl: Move mailbox related bits to the same context
Date: Wed, 4 Sep 2024 09:49:28 -0700	[thread overview]
Message-ID: <b7d13c8d-dc80-4a1c-baac-d27db35c8a16@intel.com> (raw)
In-Reply-To: <ZtiLQblMnSAoHfu3@aschofie-mobl2.lan>



On 9/4/24 9:30 AM, Alison Schofield wrote:
> On Tue, Sep 03, 2024 at 04:59:08PM -0700, Dave Jiang wrote:
>> Create a new 'struct cxl_mailbox' and move all mailbox related bits to
>> it. This allows isolation of all CXL mailbox data in order to export
>> some of the calls to external kernel callers and avoid exporting of CXL
>> driver specific bits such has device states. The allocation of
>> 'struct cxl_mailbox' is also split out with cxl_mailbox_create() so the
>> mailbox can be created independently.
>>
>> Reviewed-by: Fan Ni <fan.ni@samsung.com>
>> Reviewed-by: Alejandro Lucero <alucerop@amd.com>
>> Reviewed-by: Alison Schofield <alison.schofield@intel.com>
>> Link: https://patch.msgid.link/20240724185649.2574627-2-dave.jiang@intel.com
>> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
>>
> 
> snip
> 
> 
>> @@ -1408,6 +1421,19 @@ int cxl_poison_state_init(struct cxl_memdev_state *mds)
>>  }
>>  EXPORT_SYMBOL_NS_GPL(cxl_poison_state_init, CXL);
>>  
>> +int cxl_mailbox_init(struct cxl_mailbox *cxl_mbox, struct device *host)
>> +{
>> +	if (!cxl_mbox && !host)

Oh yeah this needs to be || for it to make sense

>> +		return -EINVAL;
>> +
>> +	cxl_mbox->host = host;
> 
> drivers/cxl/core/mbox.c:1431 cxl_mailbox_init() error: we previously assumed 'cxl_mbox' could be null (see line 1428)
> 
> caught by smatch_scripts/kchecker
> 
> 
> 
>> +	mutex_init(&cxl_mbox->mbox_mutex);
>> +	rcuwait_init(&cxl_mbox->mbox_wait);
>> +
>> +	return 0;
>> +}
>> +EXPORT_SYMBOL_NS_GPL(cxl_mailbox_init, CXL);
>> +
>>
>>

  reply	other threads:[~2024-09-04 16:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-03 23:59 [PATCH 0/3 v3] cxl: Pull out mailbox bits to be independent of cxl_dev_state Dave Jiang
2024-09-03 23:59 ` [PATCH v3 1/3] cxl: Move mailbox related bits to the same context Dave Jiang
2024-09-04 16:30   ` Alison Schofield
2024-09-04 16:49     ` Dave Jiang [this message]
2024-09-03 23:59 ` [PATCH v3 2/3] cxl: Convert cxl_internal_send_cmd() to use 'struct cxl_mailbox' as input Dave Jiang
2024-09-03 23:59 ` [PATCH v3 3/3] cxl: move cxl headers to new linux/cxl/ directory Dave Jiang
2024-09-04  6:52   ` Alejandro Lucero Palau
2024-09-04 15:35     ` Dave Jiang
2024-09-05  2:55     ` Dan Williams
2024-09-05  6:51       ` Alejandro Lucero Palau
2024-09-05 20:21         ` Dave Jiang

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=b7d13c8d-dc80-4a1c-baac-d27db35c8a16@intel.com \
    --to=dave.jiang@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=alejandro.lucero-palau@amd.com \
    --cc=alison.schofield@intel.com \
    --cc=alucerop@amd.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave@stgolabs.net \
    --cc=fan.ni@samsung.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=vishal.l.verma@intel.com \
    /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