cxl: Use %pe to print error pointers

Use the %pe printk format specifier to report error pointers directly
instead of printing PTR_ERR() as a long value.  A failed dport addition
then reports -EBUSY rather than -16, which is easier to follow when
tracing port and region setup with dynamic debug enabled.

Convert the five affected sites in drivers/cxl/core/port.c and
drivers/cxl/core/region.c.  PTR_ERR() uses in return statements are
unaffected and left unchanged.

drivers/cxl was scanned in full; these are the only conversion
candidates.

Found by: make coccicheck MODE=report M=drivers/cxl/
No functional change intended.

Signed-off-by: Shaikh Kamaluddin <shaikhkamal2012@gmail.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Richard Cheng <icheng@nvidia.com>
Link: https://patch.msgid.link/20260802112029.28767-1-shaikhkamal2012@gmail.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
This commit is contained in:
Shaikh Kamaluddin 2026-08-02 16:50:29 +05:30 • committed by Dave Jiang
commit 4ee7514066
2 changed files with 10 additions and 11 deletions