[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6351e8bac4623_4da3294d0@dwillia2-xfh.jf.intel.com.notmuch>
Date: Thu, 20 Oct 2022 17:32:58 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Robert Richter <rrichter@....com>,
Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
"Ira Weiny" <ira.weiny@...el.com>,
Ben Widawsky <bwidawsk@...nel.org>,
"Dan Williams" <dan.j.williams@...el.com>
CC: <linux-cxl@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
"Davidlohr Bueso" <dave@...olabs.net>,
Robert Richter <rrichter@....com>
Subject: RE: [PATCH v2 04/12] cxl: Unify debug messages when calling
devm_cxl_add_dport()
Robert Richter wrote:
> CXL dports are added in a couple of code paths using devm_cxl_add_
> dport(). Debug messages are individually generated, but are incomplete
> and inconsistent. Change this by moving its generation to devm_cxl_
> add_dport(). This unifies the messages and reduces code duplication.
> Also, generate messages on failure. Use a __devm_cxl_add_dport()
> wrapper to keep the readability of the error exits.
Looks good, I fixed up the wrapping of devm_cxl_add_dport() and one more
fixup below, but applied for v6.2.
>
> Signed-off-by: Robert Richter <rrichter@....com>
> ---
> drivers/cxl/acpi.c | 7 ++----
> drivers/cxl/core/pci.c | 2 --
> drivers/cxl/core/port.c | 48 +++++++++++++++++++++++++-----------
> tools/testing/cxl/test/cxl.c | 8 +-----
> 4 files changed, 37 insertions(+), 28 deletions(-)
>
[..]
> diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
> index a072b2d3e726..c610625e8261 100644
> --- a/tools/testing/cxl/test/cxl.c
> +++ b/tools/testing/cxl/test/cxl.c
> @@ -582,14 +582,8 @@ static int mock_cxl_port_enumerate_dports(struct cxl_port *port)
> dport = devm_cxl_add_dport(port, &pdev->dev, pdev->id,
> CXL_RESOURCE_NONE);
>
> - if (IS_ERR(dport)) {
> - dev_err(dev, "failed to add dport: %s (%ld)\n",
> - dev_name(&pdev->dev), PTR_ERR(dport));
> + if (IS_ERR(dport))
> return PTR_ERR(dport);
> - }
> -
> - dev_dbg(dev, "add dport%d: %s\n", pdev->id,
> - dev_name(&pdev->dev));
This hunk causes this new compile error:
tools/testing/cxl/test/cxl.c: In function ‘mock_cxl_port_enumerate_dports’:
tools/testing/cxl/test/cxl.c:559:24: error: unused variable ‘dev’ [-Werror=unused-variable]
559 | struct device *dev = &port->dev;
| ^~~
cc1: all warnings being treated as errors
I fixed it up locally, but just double check that you are building
cxl_test if you touch tools/testing/cxl/:
make M=tools/testing/cxl
Powered by blists - more mailing lists