Re: [PATCH 03/15] cxl: Unify debug messages when calling devm_cxl_add_port()

From: Robert Richter
Date: Wed Sep 28 2022 - 06:32:57 EST


On 07.09.22 22:53:12, Dan Williams wrote:
> Robert Richter wrote:

> > + parent_port = parent_dport ? parent_dport->port : NULL;
> > +
> > port = cxl_port_alloc(uport, component_reg_phys, parent_dport);
> > - if (IS_ERR(port))
> > - return port;
> > + if (IS_ERR(port)) {
> > + rc = PTR_ERR(port);
> > + goto err_out;
>
> While I agree this unifies the error messaging I am not a fan of what
> this does to the readability of the error exits. What about a compromise
> of renaming devm_cxl_add_port to __devm_cxl_add_port() and add back a
> new devm_cxl_add_port that does the unified debug messaging?

Ok, will add a wrapper.

Thanks,

-Robert