From: Dave Jiang <dave.jiang@intel.com>
To: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
Cc: <linux-cxl@vger.kernel.org>, Robert Richter <rrichter@amd.com>,
<dan.j.williams@intel.com>, <ira.weiny@intel.com>,
<vishal.l.verma@intel.com>, <alison.schofield@intel.com>,
<dave@stgolabs.net>
Subject: Re: [PATCH 2/3] cxl: Cleanup unnecessary uages of cxl_port local vars from cxl_root
Date: Tue, 9 Jan 2024 08:38:32 -0700 [thread overview]
Message-ID: <c2a9b434-0aee-4860-aa56-cfcbe66978e0@intel.com> (raw)
In-Reply-To: <20240109152953.00006d96@Huawei.com>
On 1/9/24 08:29, Jonathan Cameron wrote:
> On Mon, 08 Jan 2024 18:07:14 -0700
> Dave Jiang <dave.jiang@intel.com> wrote:
>
>> Remove the local vars that points to the 'struct cxl_port' withint 'struct
>> cxl_root' and refer to the port directly.
>>
>> Suggested-by: Robert Richter <rrichter@amd.com>
>> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> A comment on existing code inline. Otherwise LGTM
>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
>> ---
>> drivers/cxl/core/cdat.c | 13 +++++--------
>> drivers/cxl/port.c | 5 +----
>> 2 files changed, 6 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/cxl/core/cdat.c b/drivers/cxl/core/cdat.c
>> index f7ba7bd2e459..140935511bab 100644
>> --- a/drivers/cxl/core/cdat.c
>> +++ b/drivers/cxl/core/cdat.c
>> @@ -290,7 +290,7 @@ static int match_cxlrd_qos_class(struct device *dev, void *data)
>> return 0;
>> }
>>
>> -static void cxl_qos_match(struct cxl_port *root_port,
>> +static void cxl_qos_match(struct cxl_root *cxl_root,
>> struct list_head *work_list,
>> struct list_head *discard_list)
>> {
>> @@ -302,7 +302,7 @@ static void cxl_qos_match(struct cxl_port *root_port,
>> if (dpa_perf->qos_class == CXL_QOS_CLASS_INVALID)
>> return;
>>
>> - rc = device_for_each_child(&root_port->dev,
>> + rc = device_for_each_child(&cxl_root->port.dev,
>> (void *)&dpa_perf->qos_class,
>
> Whilst we are here: Why is the (void *) needed or useful?
It's not. We can remove it.
>
>> match_cxlrd_qos_class);
>> if (!rc)
>
>>
>
>
next prev parent reply other threads:[~2024-01-09 15:38 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 22:07 [PATCH v6 0/5] cxl: find_cxl_root() related cleanups Dave Jiang
2024-01-05 22:07 ` [PATCH v6 1/5] cxl: Introduce put_cxl_root() helper Dave Jiang
2024-01-05 22:14 ` Robert Richter
2024-01-05 22:07 ` [PATCH v6 2/5] cxl: Convert find_cxl_root() to return a 'struct cxl_root *' Dave Jiang
2024-01-05 22:51 ` Robert Richter
2024-01-05 23:08 ` Dave Jiang
2024-01-05 23:34 ` Dave Jiang
2024-01-08 20:43 ` Dan Williams
2024-01-08 22:30 ` Robert Richter
2024-01-05 22:07 ` [PATCH v6 3/5] cxl: Fix device reference leak in cxl_port_perf_data_calculate() Dave Jiang
2024-01-05 22:56 ` Robert Richter
2024-01-05 23:59 ` Dave Jiang
2024-01-08 21:03 ` Dan Williams
2024-01-05 22:07 ` [PATCH v6 4/5] cxl: Refactor to use __free() for cxl_root allocation in cxl_find_nvdimm_bridge() Dave Jiang
2024-01-05 23:06 ` Robert Richter
2024-01-05 22:07 ` [PATCH v6 5/5] cxl: Refactor to use __free() for cxl_root allocation in cxl_endpoint_port_probe() Dave Jiang
2024-01-05 23:09 ` Robert Richter
2024-01-05 22:35 ` [PATCH v6 0/5] cxl: find_cxl_root() related cleanups Dan Williams
2024-01-08 11:53 ` Jonathan Cameron
2024-01-08 21:05 ` Dan Williams
2024-01-09 1:07 ` [PATCH 1/3] cxl: Remove cxl_root check after find_cxl_root Dave Jiang
2024-01-09 1:16 ` Dan Williams
2024-01-09 1:07 ` [PATCH 2/3] cxl: Cleanup unnecessary uages of cxl_port local vars from cxl_root Dave Jiang
2024-01-09 1:17 ` Dan Williams
2024-01-09 15:29 ` Jonathan Cameron
2024-01-09 15:38 ` Dave Jiang [this message]
2024-01-09 1:07 ` [PATCH 3/3] cxl: Make calling of find_cxl_root() declaration uniform Dave Jiang
2024-01-09 1:37 ` Dan Williams
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=c2a9b434-0aee-4860-aa56-cfcbe66978e0@intel.com \
--to=dave.jiang@intel.com \
--cc=Jonathan.Cameron@Huawei.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=rrichter@amd.com \
--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