netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] scripts/coccinelle: Symbolic error names script
@ 2025-09-18 10:43 Tariq Toukan
  2025-09-18 10:43 ` [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates Tariq Toukan
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Tariq Toukan @ 2025-09-18 10:43 UTC (permalink / raw)
  To: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
	David S. Miller
  Cc: Saeed Mahameed, Leon Romanovsky, Tariq Toukan, Mark Bloch,
	Julia Lawall, Nicolas Palix, Richard Cochran, linux-kernel,
	netdev, linux-rdma, cocci, Gal Pressman

Hi,

This small series by Gal adds a new coccinelle script that spots
potential transitions to symbolic error names in print functions, and
then uses it in mlx5 driver.

Regards,
Tariq

Gal Pressman (2):
  scripts/coccinelle: Find PTR_ERR() to %pe candidates
  net/mlx5: Use %pe format specifier for error pointers

 .../mellanox/mlx5/core/diag/reporter_vnic.c   |  4 +-
 .../mellanox/mlx5/core/en/hv_vhca_stats.c     |  4 +-
 .../mellanox/mlx5/core/en/rep/bridge.c        |  7 +--
 .../mellanox/mlx5/core/en/reporter_rx.c       |  4 +-
 .../mellanox/mlx5/core/en/reporter_tx.c       |  4 +-
 .../mellanox/mlx5/core/en/tc/ct_fs_hmfs.c     |  4 +-
 .../mellanox/mlx5/core/en/tc/ct_fs_smfs.c     |  4 +-
 .../mellanox/mlx5/core/en/tc/int_port.c       |  8 ++--
 .../mellanox/mlx5/core/en/tc_tun_encap.c      |  8 ++--
 .../mellanox/mlx5/core/en_accel/fs_tcp.c      |  2 +-
 .../mellanox/mlx5/core/en_accel/ipsec_fs.c    |  4 +-
 .../ethernet/mellanox/mlx5/core/en_common.c   |  4 +-
 .../net/ethernet/mellanox/mlx5/core/en_rep.c  |  4 +-
 .../mellanox/mlx5/core/esw/acl/egress_lgcy.c  |  4 +-
 .../ethernet/mellanox/mlx5/core/esw/bridge.c  | 47 ++++++++++---------
 .../mellanox/mlx5/core/esw/vporttbl.c         |  4 +-
 .../net/ethernet/mellanox/mlx5/core/eswitch.c |  4 +-
 .../mellanox/mlx5/core/eswitch_offloads.c     | 16 ++++---
 .../net/ethernet/mellanox/mlx5/core/health.c  |  8 ++--
 .../mellanox/mlx5/core/irq_affinity.c         |  4 +-
 .../ethernet/mellanox/mlx5/core/lib/clock.c   |  4 +-
 .../net/ethernet/mellanox/mlx5/core/main.c    |  4 +-
 scripts/coccinelle/misc/ptr_err_to_pe.cocci   | 34 ++++++++++++++
 23 files changed, 114 insertions(+), 76 deletions(-)
 create mode 100644 scripts/coccinelle/misc/ptr_err_to_pe.cocci


base-commit: 152ba35c04ade1a164c774d6fccbf8e8cf4652cf
-- 
2.31.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates
  2025-09-18 10:43 [PATCH net-next 0/2] scripts/coccinelle: Symbolic error names script Tariq Toukan
@ 2025-09-18 10:43 ` Tariq Toukan
  2025-09-19 16:54   ` Simon Horman
                     ` (2 more replies)
  2025-09-18 10:43 ` [PATCH net-next 2/2] net/mlx5: Use %pe format specifier for error pointers Tariq Toukan
  2025-09-26 19:50 ` [PATCH net-next 0/2] scripts/coccinelle: Symbolic error names script patchwork-bot+netdevbpf
  2 siblings, 3 replies; 16+ messages in thread
From: Tariq Toukan @ 2025-09-18 10:43 UTC (permalink / raw)
  To: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
	David S. Miller
  Cc: Saeed Mahameed, Leon Romanovsky, Tariq Toukan, Mark Bloch,
	Julia Lawall, Nicolas Palix, Richard Cochran, linux-kernel,
	netdev, linux-rdma, cocci, Gal Pressman

From: Gal Pressman <gal@nvidia.com>

Add a new Coccinelle script to identify places where PTR_ERR() is used
in print functions and suggest using the %pe format specifier instead.

For printing error pointers (i.e., a pointer for which IS_ERR() is true)
%pe will print a symbolic error name (e.g,. -EINVAL), opposed to the raw
errno (e.g,. -22) produced by PTR_ERR().
It also makes the code cleaner by saving a redundant call to PTR_ERR().

The script supports context, report, and org modes.

Example transformation:
    printk("Error: %ld\n", PTR_ERR(ptr));  // Before
    printk("Error: %pe\n", ptr);          // After

Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Alexei Lazar <alazar@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 scripts/coccinelle/misc/ptr_err_to_pe.cocci | 34 +++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 scripts/coccinelle/misc/ptr_err_to_pe.cocci

diff --git a/scripts/coccinelle/misc/ptr_err_to_pe.cocci b/scripts/coccinelle/misc/ptr_err_to_pe.cocci
new file mode 100644
index 000000000000..0494c7709245
--- /dev/null
+++ b/scripts/coccinelle/misc/ptr_err_to_pe.cocci
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/// Use %pe format specifier instead of PTR_ERR() for printing error pointers.
+///
+/// For printing error pointers (i.e., a pointer for which IS_ERR() is true)
+/// %pe will print a symbolic error name (e.g., -EINVAL), opposed to the raw
+/// errno (e.g., -22) produced by PTR_ERR().
+/// It also makes the code cleaner by saving a redundant call to PTR_ERR().
+///
+// Confidence: High
+// Copyright: (C) 2025 NVIDIA CORPORATION & AFFILIATES.
+// URL: https://coccinelle.gitlabpages.inria.fr/website
+// Options: --no-includes --include-headers
+
+virtual context
+virtual org
+virtual report
+
+@r@
+expression ptr;
+constant fmt;
+position p;
+identifier print_func;
+@@
+* print_func(..., fmt, ..., PTR_ERR@p(ptr), ...)
+
+@script:python depends on r && report@
+p << r.p;
+@@
+coccilib.report.print_report(p[0], "WARNING: Consider using %pe to print PTR_ERR()")
+
+@script:python depends on r && org@
+p << r.p;
+@@
+coccilib.org.print_todo(p[0], "WARNING: Consider using %pe to print PTR_ERR()")
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH net-next 2/2] net/mlx5: Use %pe format specifier for error pointers
  2025-09-18 10:43 [PATCH net-next 0/2] scripts/coccinelle: Symbolic error names script Tariq Toukan
  2025-09-18 10:43 ` [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates Tariq Toukan
@ 2025-09-18 10:43 ` Tariq Toukan
  2025-09-19 16:55   ` Simon Horman
  2025-09-26 19:50 ` [PATCH net-next 0/2] scripts/coccinelle: Symbolic error names script patchwork-bot+netdevbpf
  2 siblings, 1 reply; 16+ messages in thread
From: Tariq Toukan @ 2025-09-18 10:43 UTC (permalink / raw)
  To: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
	David S. Miller
  Cc: Saeed Mahameed, Leon Romanovsky, Tariq Toukan, Mark Bloch,
	Julia Lawall, Nicolas Palix, Richard Cochran, linux-kernel,
	netdev, linux-rdma, cocci, Gal Pressman

From: Gal Pressman <gal@nvidia.com>

Using the coccinelle test introduced in previous commit
(scripts/coccinelle/misc/ptr_err_to_pe.cocci), convert error logging
throughout the mlx5 driver to use the %pe format specifier instead of
PTR_ERR() with integer format specifiers.

Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Alexei Lazar <alazar@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 .../mellanox/mlx5/core/diag/reporter_vnic.c   |  4 +-
 .../mellanox/mlx5/core/en/hv_vhca_stats.c     |  4 +-
 .../mellanox/mlx5/core/en/rep/bridge.c        |  7 +--
 .../mellanox/mlx5/core/en/reporter_rx.c       |  4 +-
 .../mellanox/mlx5/core/en/reporter_tx.c       |  4 +-
 .../mellanox/mlx5/core/en/tc/ct_fs_hmfs.c     |  4 +-
 .../mellanox/mlx5/core/en/tc/ct_fs_smfs.c     |  4 +-
 .../mellanox/mlx5/core/en/tc/int_port.c       |  8 ++--
 .../mellanox/mlx5/core/en/tc_tun_encap.c      |  8 ++--
 .../mellanox/mlx5/core/en_accel/fs_tcp.c      |  2 +-
 .../mellanox/mlx5/core/en_accel/ipsec_fs.c    |  4 +-
 .../ethernet/mellanox/mlx5/core/en_common.c   |  4 +-
 .../net/ethernet/mellanox/mlx5/core/en_rep.c  |  4 +-
 .../mellanox/mlx5/core/esw/acl/egress_lgcy.c  |  4 +-
 .../ethernet/mellanox/mlx5/core/esw/bridge.c  | 47 ++++++++++---------
 .../mellanox/mlx5/core/esw/vporttbl.c         |  4 +-
 .../net/ethernet/mellanox/mlx5/core/eswitch.c |  4 +-
 .../mellanox/mlx5/core/eswitch_offloads.c     | 16 ++++---
 .../net/ethernet/mellanox/mlx5/core/health.c  |  8 ++--
 .../mellanox/mlx5/core/irq_affinity.c         |  4 +-
 .../ethernet/mellanox/mlx5/core/lib/clock.c   |  4 +-
 .../net/ethernet/mellanox/mlx5/core/main.c    |  4 +-
 22 files changed, 80 insertions(+), 76 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/reporter_vnic.c b/drivers/net/ethernet/mellanox/mlx5/core/diag/reporter_vnic.c
index 73f5b62b8c7f..a17f82321c25 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/diag/reporter_vnic.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/reporter_vnic.c
@@ -138,8 +138,8 @@ void mlx5_reporter_vnic_create(struct mlx5_core_dev *dev)
 					       dev);
 	if (IS_ERR(health->vnic_reporter))
 		mlx5_core_warn(dev,
-			       "Failed to create vnic reporter, err = %ld\n",
-			       PTR_ERR(health->vnic_reporter));
+			       "Failed to create vnic reporter, err = %pe\n",
+			       health->vnic_reporter);
 }
 
 void mlx5_reporter_vnic_destroy(struct mlx5_core_dev *dev)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c b/drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
index b4f3bd7d346e..195863b2c013 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
@@ -138,8 +138,8 @@ void mlx5e_hv_vhca_stats_create(struct mlx5e_priv *priv)
 	if (IS_ERR_OR_NULL(agent)) {
 		if (IS_ERR(agent))
 			netdev_warn(priv->netdev,
-				    "Failed to create hv vhca stats agent, err = %ld\n",
-				    PTR_ERR(agent));
+				    "Failed to create hv vhca stats agent, err = %pe\n",
+				    agent);
 
 		kvfree(priv->stats_agent.buf);
 		return;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c b/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c
index 0f5d7ea8956f..9d1c677814e0 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c
@@ -488,8 +488,8 @@ static int mlx5_esw_bridge_switchdev_event(struct notifier_block *nb,
 							       fdb_info,
 							       br_offloads);
 		if (IS_ERR(work)) {
-			WARN_ONCE(1, "Failed to init switchdev work, err=%ld",
-				  PTR_ERR(work));
+			WARN_ONCE(1, "Failed to init switchdev work, err=%pe",
+				  work);
 			return notifier_from_errno(PTR_ERR(work));
 		}
 
@@ -527,7 +527,8 @@ void mlx5e_rep_bridge_init(struct mlx5e_priv *priv)
 	br_offloads = mlx5_esw_bridge_init(esw);
 	rtnl_unlock();
 	if (IS_ERR(br_offloads)) {
-		esw_warn(mdev, "Failed to init esw bridge (err=%ld)\n", PTR_ERR(br_offloads));
+		esw_warn(mdev, "Failed to init esw bridge (err=%pe)\n",
+			 br_offloads);
 		return;
 	}
 
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c
index eb1cace5910c..b1415992ffa2 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c
@@ -672,8 +672,8 @@ void mlx5e_reporter_rx_create(struct mlx5e_priv *priv)
 						       &mlx5_rx_reporter_ops,
 						       priv);
 	if (IS_ERR(reporter)) {
-		netdev_warn(priv->netdev, "Failed to create rx reporter, err = %ld\n",
-			    PTR_ERR(reporter));
+		netdev_warn(priv->netdev, "Failed to create rx reporter, err = %pe\n",
+			    reporter);
 		return;
 	}
 	priv->rx_reporter = reporter;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
index 5a4fe8403a21..9e2cf191ed30 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
@@ -561,8 +561,8 @@ void mlx5e_reporter_tx_create(struct mlx5e_priv *priv)
 						       priv);
 	if (IS_ERR(reporter)) {
 		netdev_warn(priv->netdev,
-			    "Failed to create tx reporter, err = %ld\n",
-			    PTR_ERR(reporter));
+			    "Failed to create tx reporter, err = %pe\n",
+			    reporter);
 		return;
 	}
 	priv->tx_reporter = reporter;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_hmfs.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_hmfs.c
index 01d522b02947..d3db6146fcad 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_hmfs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_hmfs.c
@@ -136,8 +136,8 @@ mlx5_ct_fs_hmfs_matcher_get(struct mlx5_ct_fs *fs, struct mlx5_flow_spec *spec,
 	hws_bwc_matcher = mlx5_ct_fs_hmfs_matcher_create(fs, tbl, spec, ipv4, tcp, gre);
 	if (IS_ERR(hws_bwc_matcher)) {
 		netdev_warn(fs->netdev,
-			    "ct_fs_hmfs: failed to create bwc matcher (nat %d, ipv4 %d, tcp %d, gre %d), err: %ld\n",
-			    nat, ipv4, tcp, gre, PTR_ERR(hws_bwc_matcher));
+			    "ct_fs_hmfs: failed to create bwc matcher (nat %d, ipv4 %d, tcp %d, gre %d), err: %pe\n",
+			    nat, ipv4, tcp, gre, hws_bwc_matcher);
 
 		hmfs_matcher = ERR_CAST(hws_bwc_matcher);
 		goto out_unlock;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c
index 0c97c5899904..4d6924b644c9 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c
@@ -148,8 +148,8 @@ mlx5_ct_fs_smfs_matcher_get(struct mlx5_ct_fs *fs, bool nat, bool ipv4, bool tcp
 	dr_matcher = mlx5_ct_fs_smfs_matcher_create(fs, tbl, ipv4, tcp, gre, prio);
 	if (IS_ERR(dr_matcher)) {
 		netdev_warn(fs->netdev,
-			    "ct_fs_smfs: failed to create matcher (nat %d, ipv4 %d, tcp %d, gre %d), err: %ld\n",
-			    nat, ipv4, tcp, gre, PTR_ERR(dr_matcher));
+			    "ct_fs_smfs: failed to create matcher (nat %d, ipv4 %d, tcp %d, gre %d), err: %pe\n",
+			    nat, ipv4, tcp, gre, dr_matcher);
 
 		smfs_matcher = ERR_CAST(dr_matcher);
 		goto out_unlock;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/int_port.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/int_port.c
index 8afcec0c5d3c..896f718483c3 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/int_port.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/int_port.c
@@ -93,8 +93,8 @@ mlx5e_int_port_create_rx_rule(struct mlx5_eswitch *esw,
 	flow_rule = mlx5_add_flow_rules(esw->offloads.ft_offloads, spec,
 					&flow_act, dest, 1);
 	if (IS_ERR(flow_rule))
-		mlx5_core_warn(esw->dev, "ft offloads: Failed to add internal vport rx rule err %ld\n",
-			       PTR_ERR(flow_rule));
+		mlx5_core_warn(esw->dev, "ft offloads: Failed to add internal vport rx rule err %pe\n",
+			       flow_rule);
 
 	kvfree(spec);
 
@@ -322,8 +322,8 @@ mlx5e_tc_int_port_init(struct mlx5e_priv *priv)
 								sizeof(u32) * 2,
 								(1 << ESW_VPORT_BITS) - 1, true);
 	if (IS_ERR(int_port_priv->metadata_mapping)) {
-		mlx5_core_warn(priv->mdev, "Can't allocate metadata mapping of int port offload, err=%ld\n",
-			       PTR_ERR(int_port_priv->metadata_mapping));
+		mlx5_core_warn(priv->mdev, "Can't allocate metadata mapping of int port offload, err=%pe\n",
+			       int_port_priv->metadata_mapping);
 		goto err_mapping;
 	}
 
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c
index a0fc76a1bc08..0735d10f2bac 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c
@@ -172,8 +172,8 @@ void mlx5e_tc_encap_flows_add(struct mlx5e_priv *priv,
 						     &reformat_params,
 						     MLX5_FLOW_NAMESPACE_FDB);
 	if (IS_ERR(e->pkt_reformat)) {
-		mlx5_core_warn(priv->mdev, "Failed to offload cached encapsulation header, %lu\n",
-			       PTR_ERR(e->pkt_reformat));
+		mlx5_core_warn(priv->mdev, "Failed to offload cached encapsulation header, %pe\n",
+			       e->pkt_reformat);
 		return;
 	}
 	e->flags |= MLX5_ENCAP_ENTRY_VALID;
@@ -1845,8 +1845,8 @@ static int mlx5e_tc_tun_fib_event(struct notifier_block *nb, unsigned long event
 			queue_work(priv->wq, &fib_work->work);
 		} else if (IS_ERR(fib_work)) {
 			NL_SET_ERR_MSG_MOD(info->extack, "Failed to init fib work");
-			mlx5_core_warn(priv->mdev, "Failed to init fib work, %ld\n",
-				       PTR_ERR(fib_work));
+			mlx5_core_warn(priv->mdev, "Failed to init fib work, %pe\n",
+				       fib_work);
 		}
 
 		break;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
index 4f83e3172767..1febdc5b81f9 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
@@ -138,7 +138,7 @@ struct mlx5_flow_handle *mlx5e_accel_fs_add_sk(struct mlx5e_flow_steering *fs,
 	flow = mlx5_add_flow_rules(ft->t, spec, &flow_act, &dest, 1);
 
 	if (IS_ERR(flow))
-		fs_err(fs, "mlx5_add_flow_rules() failed, flow is %ld\n", PTR_ERR(flow));
+		fs_err(fs, "mlx5_add_flow_rules() failed, flow is %pe\n", flow);
 
 out:
 	kvfree(spec);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
index 98b6a3a623f9..cc067a0a3151 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
@@ -1704,8 +1704,8 @@ static int setup_modify_header(struct mlx5e_ipsec *ipsec, int type, u32 val, u8
 
 	modify_hdr = mlx5_modify_header_alloc(mdev, ns_type, num_of_actions, action);
 	if (IS_ERR(modify_hdr)) {
-		mlx5_core_err(mdev, "Failed to allocate modify_header %ld\n",
-			      PTR_ERR(modify_hdr));
+		mlx5_core_err(mdev, "Failed to allocate modify_header %pe\n",
+			      modify_hdr);
 		return PTR_ERR(modify_hdr);
 	}
 
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_common.c b/drivers/net/ethernet/mellanox/mlx5/core/en_common.c
index 96b744ceaf13..30424ccad584 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_common.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_common.c
@@ -210,8 +210,8 @@ int mlx5e_create_mdev_resources(struct mlx5_core_dev *mdev, bool create_tises)
 
 	mdev->mlx5e_res.dek_priv = mlx5_crypto_dek_init(mdev);
 	if (IS_ERR(mdev->mlx5e_res.dek_priv)) {
-		mlx5_core_err(mdev, "crypto dek init failed, %ld\n",
-			      PTR_ERR(mdev->mlx5e_res.dek_priv));
+		mlx5_core_err(mdev, "crypto dek init failed, %pe\n",
+			      mdev->mlx5e_res.dek_priv);
 		mdev->mlx5e_res.dek_priv = NULL;
 	}
 
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index b231e7855bca..d91db3c8c1b7 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -1450,8 +1450,8 @@ static void mlx5e_rep_vnic_reporter_create(struct mlx5e_priv *priv,
 						    rpriv);
 	if (IS_ERR(reporter)) {
 		mlx5_core_err(priv->mdev,
-			      "Failed to create representor vnic reporter, err = %ld\n",
-			      PTR_ERR(reporter));
+			      "Failed to create representor vnic reporter, err = %pe\n",
+			      reporter);
 		return;
 	}
 
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/acl/egress_lgcy.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/acl/egress_lgcy.c
index 7dd1dc3f77c7..c9a1654d83a2 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/esw/acl/egress_lgcy.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/acl/egress_lgcy.c
@@ -87,8 +87,8 @@ int esw_acl_egress_lgcy_setup(struct mlx5_eswitch *esw,
 		drop_counter = mlx5_fc_create(esw->dev, false);
 		if (IS_ERR(drop_counter)) {
 			esw_warn(esw->dev,
-				 "vport[%d] configure egress drop rule counter err(%ld)\n",
-				 vport->vport, PTR_ERR(drop_counter));
+				 "vport[%d] configure egress drop rule counter err(%pe)\n",
+				 vport->vport, drop_counter);
 			drop_counter = NULL;
 		}
 		vport->egress.legacy.drop_counter = drop_counter;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c
index 76e35c827da0..60e10047770f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c
@@ -81,7 +81,8 @@ mlx5_esw_bridge_table_create(int max_fte, u32 level, struct mlx5_eswitch *esw)
 	ft_attr.prio = FDB_BR_OFFLOAD;
 	fdb = mlx5_create_flow_table(ns, &ft_attr);
 	if (IS_ERR(fdb))
-		esw_warn(dev, "Failed to create bridge FDB Table (err=%ld)\n", PTR_ERR(fdb));
+		esw_warn(dev, "Failed to create bridge FDB Table (err=%pe)\n",
+			 fdb);
 
 	return fdb;
 }
@@ -121,8 +122,8 @@ mlx5_esw_bridge_ingress_vlan_proto_fg_create(unsigned int from, unsigned int to,
 	kvfree(in);
 	if (IS_ERR(fg))
 		esw_warn(esw->dev,
-			 "Failed to create VLAN(proto=%x) flow group for bridge ingress table (err=%ld)\n",
-			 vlan_proto, PTR_ERR(fg));
+			 "Failed to create VLAN(proto=%x) flow group for bridge ingress table (err=%pe)\n",
+			 vlan_proto, fg);
 
 	return fg;
 }
@@ -180,8 +181,8 @@ mlx5_esw_bridge_ingress_vlan_proto_filter_fg_create(unsigned int from, unsigned
 	fg = mlx5_create_flow_group(ingress_ft, in);
 	if (IS_ERR(fg))
 		esw_warn(esw->dev,
-			 "Failed to create bridge ingress table VLAN filter flow group (err=%ld)\n",
-			 PTR_ERR(fg));
+			 "Failed to create bridge ingress table VLAN filter flow group (err=%pe)\n",
+			 fg);
 	kvfree(in);
 	return fg;
 }
@@ -237,8 +238,8 @@ mlx5_esw_bridge_ingress_mac_fg_create(struct mlx5_eswitch *esw, struct mlx5_flow
 	fg = mlx5_create_flow_group(ingress_ft, in);
 	if (IS_ERR(fg))
 		esw_warn(esw->dev,
-			 "Failed to create MAC flow group for bridge ingress table (err=%ld)\n",
-			 PTR_ERR(fg));
+			 "Failed to create MAC flow group for bridge ingress table (err=%pe)\n",
+			 fg);
 
 	kvfree(in);
 	return fg;
@@ -274,8 +275,8 @@ mlx5_esw_bridge_egress_vlan_proto_fg_create(unsigned int from, unsigned int to,
 	fg = mlx5_create_flow_group(egress_ft, in);
 	if (IS_ERR(fg))
 		esw_warn(esw->dev,
-			 "Failed to create VLAN flow group for bridge egress table (err=%ld)\n",
-			 PTR_ERR(fg));
+			 "Failed to create VLAN flow group for bridge egress table (err=%pe)\n",
+			 fg);
 	kvfree(in);
 	return fg;
 }
@@ -324,8 +325,8 @@ mlx5_esw_bridge_egress_mac_fg_create(struct mlx5_eswitch *esw, struct mlx5_flow_
 	fg = mlx5_create_flow_group(egress_ft, in);
 	if (IS_ERR(fg))
 		esw_warn(esw->dev,
-			 "Failed to create bridge egress table MAC flow group (err=%ld)\n",
-			 PTR_ERR(fg));
+			 "Failed to create bridge egress table MAC flow group (err=%pe)\n",
+			 fg);
 	kvfree(in);
 	return fg;
 }
@@ -354,8 +355,8 @@ mlx5_esw_bridge_egress_miss_fg_create(struct mlx5_eswitch *esw, struct mlx5_flow
 	fg = mlx5_create_flow_group(egress_ft, in);
 	if (IS_ERR(fg))
 		esw_warn(esw->dev,
-			 "Failed to create bridge egress table miss flow group (err=%ld)\n",
-			 PTR_ERR(fg));
+			 "Failed to create bridge egress table miss flow group (err=%pe)\n",
+			 fg);
 	kvfree(in);
 	return fg;
 }
@@ -501,8 +502,8 @@ mlx5_esw_bridge_egress_table_init(struct mlx5_esw_bridge_offloads *br_offloads,
 	if (mlx5_esw_bridge_pkt_reformat_vlan_pop_supported(esw)) {
 		miss_fg = mlx5_esw_bridge_egress_miss_fg_create(esw, egress_ft);
 		if (IS_ERR(miss_fg)) {
-			esw_warn(esw->dev, "Failed to create miss flow group (err=%ld)\n",
-				 PTR_ERR(miss_fg));
+			esw_warn(esw->dev, "Failed to create miss flow group (err=%pe)\n",
+				 miss_fg);
 			miss_fg = NULL;
 			goto skip_miss_flow;
 		}
@@ -510,8 +511,8 @@ mlx5_esw_bridge_egress_table_init(struct mlx5_esw_bridge_offloads *br_offloads,
 		miss_pkt_reformat = mlx5_esw_bridge_pkt_reformat_vlan_pop_create(esw);
 		if (IS_ERR(miss_pkt_reformat)) {
 			esw_warn(esw->dev,
-				 "Failed to alloc packet reformat REMOVE_HEADER (err=%ld)\n",
-				 PTR_ERR(miss_pkt_reformat));
+				 "Failed to alloc packet reformat REMOVE_HEADER (err=%pe)\n",
+				 miss_pkt_reformat);
 			miss_pkt_reformat = NULL;
 			mlx5_destroy_flow_group(miss_fg);
 			miss_fg = NULL;
@@ -522,8 +523,8 @@ mlx5_esw_bridge_egress_table_init(struct mlx5_esw_bridge_offloads *br_offloads,
 								      br_offloads->skip_ft,
 								      miss_pkt_reformat);
 		if (IS_ERR(miss_handle)) {
-			esw_warn(esw->dev, "Failed to create miss flow (err=%ld)\n",
-				 PTR_ERR(miss_handle));
+			esw_warn(esw->dev, "Failed to create miss flow (err=%pe)\n",
+				 miss_handle);
 			miss_handle = NULL;
 			mlx5_packet_reformat_dealloc(esw->dev, miss_pkt_reformat);
 			miss_pkt_reformat = NULL;
@@ -1048,8 +1049,8 @@ mlx5_esw_bridge_vlan_push_create(u16 vlan_proto, struct mlx5_esw_bridge_vlan *vl
 						  &reformat_params,
 						  MLX5_FLOW_NAMESPACE_FDB);
 	if (IS_ERR(pkt_reformat)) {
-		esw_warn(esw->dev, "Failed to alloc packet reformat INSERT_HEADER (err=%ld)\n",
-			 PTR_ERR(pkt_reformat));
+		esw_warn(esw->dev, "Failed to alloc packet reformat INSERT_HEADER (err=%pe)\n",
+			 pkt_reformat);
 		return PTR_ERR(pkt_reformat);
 	}
 
@@ -1076,8 +1077,8 @@ mlx5_esw_bridge_vlan_pop_create(struct mlx5_esw_bridge_vlan *vlan, struct mlx5_e
 
 	pkt_reformat = mlx5_esw_bridge_pkt_reformat_vlan_pop_create(esw);
 	if (IS_ERR(pkt_reformat)) {
-		esw_warn(esw->dev, "Failed to alloc packet reformat REMOVE_HEADER (err=%ld)\n",
-			 PTR_ERR(pkt_reformat));
+		esw_warn(esw->dev, "Failed to alloc packet reformat REMOVE_HEADER (err=%pe)\n",
+			 pkt_reformat);
 		return PTR_ERR(pkt_reformat);
 	}
 
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/vporttbl.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/vporttbl.c
index 749c3957a128..407062096a82 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/esw/vporttbl.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/vporttbl.c
@@ -45,8 +45,8 @@ esw_vport_tbl_create(struct mlx5_eswitch *esw, struct mlx5_flow_namespace *ns,
 	ft_attr.flags = vport_ns->flags;
 	fdb = mlx5_create_auto_grouped_flow_table(ns, &ft_attr);
 	if (IS_ERR(fdb)) {
-		esw_warn(esw->dev, "Failed to create per vport FDB Table err %ld\n",
-			 PTR_ERR(fdb));
+		esw_warn(esw->dev, "Failed to create per vport FDB Table err %pe\n",
+			 fdb);
 	}
 
 	return fdb;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
index 10eca910a2db..e2ffb87b94cb 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
@@ -257,8 +257,8 @@ __esw_fdb_set_vport_rule(struct mlx5_eswitch *esw, u16 vport, bool rx_rule,
 				    &flow_act, &dest, 1);
 	if (IS_ERR(flow_rule)) {
 		esw_warn(esw->dev,
-			 "FDB: Failed to add flow rule: dmac_v(%pM) dmac_c(%pM) -> vport(%d), err(%ld)\n",
-			 dmac_v, dmac_c, vport, PTR_ERR(flow_rule));
+			 "FDB: Failed to add flow rule: dmac_v(%pM) dmac_c(%pM) -> vport(%d), err(%pe)\n",
+			 dmac_v, dmac_c, vport, flow_rule);
 		flow_rule = NULL;
 	}
 
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index bc9838dc5bf8..b8ec55929ab1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -1016,8 +1016,8 @@ mlx5_eswitch_add_send_to_vport_rule(struct mlx5_eswitch *on_esw,
 	flow_rule = mlx5_add_flow_rules(mlx5_eswitch_get_slow_fdb(on_esw),
 					spec, &flow_act, &dest, 1);
 	if (IS_ERR(flow_rule))
-		esw_warn(on_esw->dev, "FDB: Failed to add send to vport rule err %ld\n",
-			 PTR_ERR(flow_rule));
+		esw_warn(on_esw->dev, "FDB: Failed to add send to vport rule err %pe\n",
+			 flow_rule);
 out:
 	kvfree(spec);
 	return flow_rule;
@@ -1065,8 +1065,8 @@ mlx5_eswitch_add_send_to_vport_meta_rule(struct mlx5_eswitch *esw, u16 vport_num
 	flow_rule = mlx5_add_flow_rules(mlx5_eswitch_get_slow_fdb(esw),
 					spec, &flow_act, &dest, 1);
 	if (IS_ERR(flow_rule))
-		esw_warn(esw->dev, "FDB: Failed to add send to vport meta rule vport %d, err %ld\n",
-			 vport_num, PTR_ERR(flow_rule));
+		esw_warn(esw->dev, "FDB: Failed to add send to vport meta rule vport %d, err %pe\n",
+			 vport_num, flow_rule);
 
 	kvfree(spec);
 	return flow_rule;
@@ -2159,7 +2159,9 @@ mlx5_eswitch_create_vport_rx_rule(struct mlx5_eswitch *esw, u16 vport,
 	flow_rule = mlx5_add_flow_rules(esw->offloads.ft_offloads, spec,
 					&flow_act, dest, 1);
 	if (IS_ERR(flow_rule)) {
-		esw_warn(esw->dev, "fs offloads: Failed to add vport rx rule err %ld\n", PTR_ERR(flow_rule));
+		esw_warn(esw->dev,
+			 "fs offloads: Failed to add vport rx rule err %pe\n",
+			 flow_rule);
 		goto out;
 	}
 
@@ -2178,8 +2180,8 @@ static int esw_create_vport_rx_drop_rule(struct mlx5_eswitch *esw)
 					&flow_act, NULL, 0);
 	if (IS_ERR(flow_rule)) {
 		esw_warn(esw->dev,
-			 "fs offloads: Failed to add vport rx drop rule err %ld\n",
-			 PTR_ERR(flow_rule));
+			 "fs offloads: Failed to add vport rx drop rule err %pe\n",
+			 flow_rule);
 		return PTR_ERR(flow_rule);
 	}
 
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c
index b63c5a221eb9..aeeb136f5ebc 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
@@ -718,15 +718,15 @@ void mlx5_fw_reporters_create(struct mlx5_core_dev *dev)
 
 	health->fw_reporter = devl_health_reporter_create(devlink, fw_ops, dev);
 	if (IS_ERR(health->fw_reporter))
-		mlx5_core_warn(dev, "Failed to create fw reporter, err = %ld\n",
-			       PTR_ERR(health->fw_reporter));
+		mlx5_core_warn(dev, "Failed to create fw reporter, err = %pe\n",
+			       health->fw_reporter);
 
 	health->fw_fatal_reporter = devl_health_reporter_create(devlink,
 								fw_fatal_ops,
 								dev);
 	if (IS_ERR(health->fw_fatal_reporter))
-		mlx5_core_warn(dev, "Failed to create fw fatal reporter, err = %ld\n",
-			       PTR_ERR(health->fw_fatal_reporter));
+		mlx5_core_warn(dev, "Failed to create fw fatal reporter, err = %pe\n",
+			       health->fw_fatal_reporter);
 }
 
 static void mlx5_fw_reporters_destroy(struct mlx5_core_dev *dev)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c b/drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c
index 82d3c2568244..14d339eceb92 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c
@@ -150,8 +150,8 @@ mlx5_irq_affinity_request(struct mlx5_core_dev *dev, struct mlx5_irq_pool *pool,
 	if (IS_ERR(new_irq)) {
 		if (!least_loaded_irq) {
 			/* We failed to create an IRQ and we didn't find an IRQ */
-			mlx5_core_err(pool->dev, "Didn't find a matching IRQ. err = %ld\n",
-				      PTR_ERR(new_irq));
+			mlx5_core_err(pool->dev, "Didn't find a matching IRQ. err = %pe\n",
+				      new_irq);
 			mutex_unlock(&pool->lock);
 			return new_irq;
 		}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
index 8f2ad45bec9f..d0ba83d77cd1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
@@ -1365,9 +1365,9 @@ static void mlx5_init_clock_dev(struct mlx5_core_dev *mdev)
 	clock->ptp = ptp_clock_register(&clock->ptp_info,
 					clock->shared ? NULL : &mdev->pdev->dev);
 	if (IS_ERR(clock->ptp)) {
-		mlx5_core_warn(mdev, "%sptp_clock_register failed %ld\n",
+		mlx5_core_warn(mdev, "%sptp_clock_register failed %pe\n",
 			       clock->shared ? "shared clock " : "",
-			       PTR_ERR(clock->ptp));
+			       clock->ptp);
 		clock->ptp = NULL;
 	}
 
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index 6b6d6b05b893..df93625c9dfa 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -979,8 +979,8 @@ static int mlx5_init_once(struct mlx5_core_dev *dev)
 
 	dev->priv.devc = mlx5_devcom_register_device(dev);
 	if (IS_ERR(dev->priv.devc))
-		mlx5_core_warn(dev, "failed to register devcom device %ld\n",
-			       PTR_ERR(dev->priv.devc));
+		mlx5_core_warn(dev, "failed to register devcom device %pe\n",
+			       dev->priv.devc);
 
 	err = mlx5_query_board_id(dev);
 	if (err) {
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates
  2025-09-18 10:43 ` [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates Tariq Toukan
@ 2025-09-19 16:54   ` Simon Horman
  2025-09-22 23:36   ` Jakub Kicinski
  2025-09-25 15:07   ` [cocci] " Markus Elfring
  2 siblings, 0 replies; 16+ messages in thread
From: Simon Horman @ 2025-09-19 16:54 UTC (permalink / raw)
  To: Tariq Toukan
  Cc: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
	David S. Miller, Saeed Mahameed, Leon Romanovsky, Mark Bloch,
	Julia Lawall, Nicolas Palix, Richard Cochran, linux-kernel,
	netdev, linux-rdma, cocci, Gal Pressman

On Thu, Sep 18, 2025 at 01:43:46PM +0300, Tariq Toukan wrote:
> From: Gal Pressman <gal@nvidia.com>
> 
> Add a new Coccinelle script to identify places where PTR_ERR() is used
> in print functions and suggest using the %pe format specifier instead.
> 
> For printing error pointers (i.e., a pointer for which IS_ERR() is true)
> %pe will print a symbolic error name (e.g,. -EINVAL), opposed to the raw
> errno (e.g,. -22) produced by PTR_ERR().
> It also makes the code cleaner by saving a redundant call to PTR_ERR().
> 
> The script supports context, report, and org modes.
> 
> Example transformation:
>     printk("Error: %ld\n", PTR_ERR(ptr));  // Before
>     printk("Error: %pe\n", ptr);          // After
> 
> Signed-off-by: Gal Pressman <gal@nvidia.com>
> Reviewed-by: Alexei Lazar <alazar@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>

Thanks, having this check seems very nice to me.

Reviewed-by: Simon Horman <horms@kernel.org>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 2/2] net/mlx5: Use %pe format specifier for error pointers
  2025-09-18 10:43 ` [PATCH net-next 2/2] net/mlx5: Use %pe format specifier for error pointers Tariq Toukan
@ 2025-09-19 16:55   ` Simon Horman
  0 siblings, 0 replies; 16+ messages in thread
From: Simon Horman @ 2025-09-19 16:55 UTC (permalink / raw)
  To: Tariq Toukan
  Cc: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
	David S. Miller, Saeed Mahameed, Leon Romanovsky, Mark Bloch,
	Julia Lawall, Nicolas Palix, Richard Cochran, linux-kernel,
	netdev, linux-rdma, cocci, Gal Pressman

On Thu, Sep 18, 2025 at 01:43:47PM +0300, Tariq Toukan wrote:
> From: Gal Pressman <gal@nvidia.com>
> 
> Using the coccinelle test introduced in previous commit
> (scripts/coccinelle/misc/ptr_err_to_pe.cocci), convert error logging
> throughout the mlx5 driver to use the %pe format specifier instead of
> PTR_ERR() with integer format specifiers.
> 
> Signed-off-by: Gal Pressman <gal@nvidia.com>
> Reviewed-by: Alexei Lazar <alazar@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>

Simple, mechanical change that improves readability.
Looks good to me.

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates
  2025-09-18 10:43 ` [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates Tariq Toukan
  2025-09-19 16:54   ` Simon Horman
@ 2025-09-22 23:36   ` Jakub Kicinski
  2025-09-25 15:07   ` [cocci] " Markus Elfring
  2 siblings, 0 replies; 16+ messages in thread
From: Jakub Kicinski @ 2025-09-22 23:36 UTC (permalink / raw)
  To: Julia Lawall, Nicolas Palix
  Cc: Tariq Toukan, Eric Dumazet, Paolo Abeni, Andrew Lunn,
	David S. Miller, Saeed Mahameed, Leon Romanovsky, Mark Bloch,
	Richard Cochran, linux-kernel, netdev, linux-rdma, cocci,
	Gal Pressman

On Thu, 18 Sep 2025 13:43:46 +0300 Tariq Toukan wrote:
> Add a new Coccinelle script to identify places where PTR_ERR() is used
> in print functions and suggest using the %pe format specifier instead.
> 
> For printing error pointers (i.e., a pointer for which IS_ERR() is true)
> %pe will print a symbolic error name (e.g,. -EINVAL), opposed to the raw
> errno (e.g,. -22) produced by PTR_ERR().
> It also makes the code cleaner by saving a redundant call to PTR_ERR().
> 
> The script supports context, report, and org modes.
> 
> Example transformation:
>     printk("Error: %ld\n", PTR_ERR(ptr));  // Before
>     printk("Error: %pe\n", ptr);          // After

Hi Julia, Nicolas,

would you be willing to give us a review tag for this script?
Would you prefer to take the script via your tree?

https://lore.kernel.org/all/1758192227-701925-2-git-send-email-tariqt@nvidia.com/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates
  2025-09-18 10:43 ` [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates Tariq Toukan
  2025-09-19 16:54   ` Simon Horman
  2025-09-22 23:36   ` Jakub Kicinski
@ 2025-09-25 15:07   ` Markus Elfring
  2025-09-28 11:40     ` Gal Pressman
  2 siblings, 1 reply; 16+ messages in thread
From: Markus Elfring @ 2025-09-25 15:07 UTC (permalink / raw)
  To: Gal Pressman, Tariq Toukan, cocci, Alexei Lazar, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Julia Lawall,
	Paolo Abeni, Simon Horman
  Cc: LKML, netdev, linux-rdma, Leon Romanovsky, Mark Bloch,
	Nicolas Palix, Richard Cochran, Saeed Mahameed

…> The script supports context, report, and org modes.

I suggest to omit this sentence from the description.


Will the hint “scripts/” be omitted from the patch prefix?


…> +++ b/scripts/coccinelle/misc/ptr_err_to_pe.cocci
…> +// URL: https://coccinelle.gitlabpages.inria.fr/website

I suggest to omit this comment line.


…> +virtual context
> +virtual org
> +virtual report

The restriction on the support for three operation modes will need further development considerations.


> +@r@
> +expression ptr;
> +constant fmt;
> +position p;
> +identifier print_func;
> +@@
> +* print_func(..., fmt, ..., PTR_ERR@p(ptr), ...)

How do you think about to use the metavariable type “format list”?

Would it matter to restrict expressions to pointer expressions?


> +@script:python depends on r && org@

I guess that such an SmPL dependency specification can be simplified a bit.


> +p << r.p;
> +@@
> +coccilib.org.print_todo(p[0], "WARNING: Consider using %pe to print PTR_ERR()")

I suggest to reconsider the implementation detail once more
if the SmPL asterisk functionality fits really to the operation modes “org” and “report”.

The operation mode “context” can usually work also without an extra position variable,
can't it?

Regards,
Markus

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 0/2] scripts/coccinelle: Symbolic error names script
  2025-09-18 10:43 [PATCH net-next 0/2] scripts/coccinelle: Symbolic error names script Tariq Toukan
  2025-09-18 10:43 ` [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates Tariq Toukan
  2025-09-18 10:43 ` [PATCH net-next 2/2] net/mlx5: Use %pe format specifier for error pointers Tariq Toukan
@ 2025-09-26 19:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 16+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-09-26 19:50 UTC (permalink / raw)
  To: Tariq Toukan
  Cc: edumazet, kuba, pabeni, andrew+netdev, davem, saeedm, leon,
	mbloch, Julia.Lawall, nicolas.palix, richardcochran, linux-kernel,
	netdev, linux-rdma, cocci, gal

Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 18 Sep 2025 13:43:45 +0300 you wrote:
> Hi,
> 
> This small series by Gal adds a new coccinelle script that spots
> potential transitions to symbolic error names in print functions, and
> then uses it in mlx5 driver.
> 
> Regards,
> Tariq
> 
> [...]

Here is the summary with links:
  - [net-next,1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates
    https://git.kernel.org/netdev/net-next/c/57c49d235572
  - [net-next,2/2] net/mlx5: Use %pe format specifier for error pointers
    https://git.kernel.org/netdev/net-next/c/b89cd87b77d4

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates
  2025-09-25 15:07   ` [cocci] " Markus Elfring
@ 2025-09-28 11:40     ` Gal Pressman
  2025-09-28 12:00       ` Markus Elfring
  2025-09-28 12:23       ` [cocci] [PATCH net-next 1/2] " Julia Lawall
  0 siblings, 2 replies; 16+ messages in thread
From: Gal Pressman @ 2025-09-28 11:40 UTC (permalink / raw)
  To: Markus Elfring, Tariq Toukan, cocci, Alexei Lazar, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Julia Lawall,
	Paolo Abeni, Simon Horman
  Cc: LKML, netdev, linux-rdma, Leon Romanovsky, Mark Bloch,
	Nicolas Palix, Richard Cochran, Saeed Mahameed

Hi Markus!

Thanks for the review, forgive for being a total noob at coccinelle,
hence the many questions.

On 25/09/2025 18:07, Markus Elfring wrote:
> …> The script supports context, report, and org modes.
> 
> I suggest to omit this sentence from the description.
> 
> 
> Will the hint “scripts/” be omitted from the patch prefix?

The patch was merged already, so I'm skipping to comments that can be
fixed in a followup patch.

> 
> 
> …> +++ b/scripts/coccinelle/misc/ptr_err_to_pe.cocci
> …> +// URL: https://coccinelle.gitlabpages.inria.fr/website
> 
> I suggest to omit this comment line.

Sure.

> 
> 
> …> +virtual context
>> +virtual org
>> +virtual report
> 
> The restriction on the support for three operation modes will need further development considerations.

I don't understand what you mean?

> 
> 
>> +@r@
>> +expression ptr;
>> +constant fmt;
>> +position p;
>> +identifier print_func;
>> +@@
>> +* print_func(..., fmt, ..., PTR_ERR@p(ptr), ...)
> 
> How do you think about to use the metavariable type “format list”?

I did find "format list" in the documentation, but spatch fails when I
try to use it.

> 
> Would it matter to restrict expressions to pointer expressions?

I tried changing 'expression ptr;' -> 'expression *ptr;', but then it
didn't find anything. Am I doing it wrong?

> 
> 
>> +@script:python depends on r && org@
> 
> I guess that such an SmPL dependency specification can be simplified a bit.

You mean drop the depends on r?

> 
> 
>> +p << r.p;
>> +@@
>> +coccilib.org.print_todo(p[0], "WARNING: Consider using %pe to print PTR_ERR()")
> 
> I suggest to reconsider the implementation detail once more
> if the SmPL asterisk functionality fits really to the operation modes “org” and “report”.
> 
> The operation mode “context” can usually work also without an extra position variable,
> can't it?

Can you please explain?

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates
  2025-09-28 11:40     ` Gal Pressman
@ 2025-09-28 12:00       ` Markus Elfring
  2025-09-28 13:24         ` Gal Pressman
  2025-09-28 12:23       ` [cocci] [PATCH net-next 1/2] " Julia Lawall
  1 sibling, 1 reply; 16+ messages in thread
From: Markus Elfring @ 2025-09-28 12:00 UTC (permalink / raw)
  To: Gal Pressman, Tariq Toukan, cocci, Alexei Lazar, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Julia Lawall,
	Paolo Abeni, Simon Horman
  Cc: LKML, netdev, linux-rdma, Leon Romanovsky, Mark Bloch,
	Nicolas Palix, Richard Cochran, Saeed Mahameed

>>> +virtual context
>>> +virtual org
>>> +virtual report
>>
>> The restriction on the support for three operation modes will need further development considerations.
> 
> I don't understand what you mean?

The development status might be unclear for the handling of a varying number of operation modes
by coccicheck rules, isn't it?


> I did find "format list" in the documentation, but spatch fails when I
> try to use it.

Which SmPL code variations did you try out?


>> Would it matter to restrict expressions to pointer expressions?
> 
> I tried changing 'expression ptr;' -> 'expression *ptr;', but then it
> didn't find anything. Am I doing it wrong?

Further software improvements can be reconsidered accordingly.


>>> +@script:python depends on r && org@
>>
>> I guess that such an SmPL dependency specification can be simplified a bit.
> 
> You mean drop the depends on r?

You may omit “r &&” (because the rule is referenced by an SmPL variable declaration),
can't you?


>>> +p << r.p;
>>> +@@
>>> +coccilib.org.print_todo(p[0], "WARNING: Consider using %pe to print PTR_ERR()")
>>
>> I suggest to reconsider the implementation detail once more
>> if the SmPL asterisk functionality fits really to the operation modes “org” and “report”.
>>
>> The operation mode “context” can usually work also without an extra position variable,
>> can't it?
> 
> Can you please explain?

Are you aware of data format requirements here?

Regards,
Markus


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates
  2025-09-28 11:40     ` Gal Pressman
  2025-09-28 12:00       ` Markus Elfring
@ 2025-09-28 12:23       ` Julia Lawall
  2025-09-28 13:17         ` Gal Pressman
  1 sibling, 1 reply; 16+ messages in thread
From: Julia Lawall @ 2025-09-28 12:23 UTC (permalink / raw)
  To: Gal Pressman
  Cc: Markus Elfring, Tariq Toukan, cocci, Alexei Lazar, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, LKML, netdev, linux-rdma, Leon Romanovsky,
	Mark Bloch, Nicolas Palix, Richard Cochran, Saeed Mahameed

[-- Attachment #1: Type: text/plain, Size: 2001 bytes --]

> >> +@r@
> >> +expression ptr;
> >> +constant fmt;
> >> +position p;
> >> +identifier print_func;
> >> +@@
> >> +* print_func(..., fmt, ..., PTR_ERR@p(ptr), ...)
> >
> > How do you think about to use the metavariable type “format list”?
>
> I did find "format list" in the documentation, but spatch fails when I
> try to use it.

I would suggest constant char[] fmt.

format is for the case where you want to specify something about the %d
%s, etc in the string.

> > Would it matter to restrict expressions to pointer expressions?
>
> I tried changing 'expression ptr;' -> 'expression *ptr;', but then it
> didn't find anything. Am I doing it wrong?

expression *ptr should be a valid metavariable declaration.  But
Coccinelle needs to have enough information to know that something is a
pointer.  If you have code like a->b and you don't have the definition of
the structure type of a, then it won't know the type of a->b.  More
information about types is available if you use options like
--recursive-includes, but then treatment of every C file will entail
parsing lots of header files, which could make things very slow.  So you
have to consider whether the information that the thing is a pointer is
really necessary to what you are trying to do.

> >> +@script:python depends on r && org@
> >
> > I guess that such an SmPL dependency specification can be simplified a bit.
>
> You mean drop the depends on r?
>
> >
> >
> >> +p << r.p;

Since you have r.p, the rule will only be applied if r has succeeded and
furthermore if p has a value.  So depends on r is not necessary.

julia

> >> +@@
> >> +coccilib.org.print_todo(p[0], "WARNING: Consider using %pe to print PTR_ERR()")
> >
> > I suggest to reconsider the implementation detail once more
> > if the SmPL asterisk functionality fits really to the operation modes “org” and “report”.
> >
> > The operation mode “context” can usually work also without an extra position variable,
> > can't it?
>
> Can you please explain?
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates
  2025-09-28 12:23       ` [cocci] [PATCH net-next 1/2] " Julia Lawall
@ 2025-09-28 13:17         ` Gal Pressman
  0 siblings, 0 replies; 16+ messages in thread
From: Gal Pressman @ 2025-09-28 13:17 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Markus Elfring, Tariq Toukan, cocci, Alexei Lazar, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, LKML, netdev, linux-rdma, Leon Romanovsky,
	Mark Bloch, Nicolas Palix, Richard Cochran, Saeed Mahameed

Thanks for the review Julia!

On 28/09/2025 15:23, Julia Lawall wrote:
>>>> +@r@
>>>> +expression ptr;
>>>> +constant fmt;
>>>> +position p;
>>>> +identifier print_func;
>>>> +@@
>>>> +* print_func(..., fmt, ..., PTR_ERR@p(ptr), ...)
>>>
>>> How do you think about to use the metavariable type “format list”?
>>
>> I did find "format list" in the documentation, but spatch fails when I
>> try to use it.
> 
> I would suggest constant char[] fmt.

That works, thanks!

> 
> format is for the case where you want to specify something about the %d
> %s, etc in the string.
> 
>>> Would it matter to restrict expressions to pointer expressions?
>>
>> I tried changing 'expression ptr;' -> 'expression *ptr;', but then it
>> didn't find anything. Am I doing it wrong?
> 
> expression *ptr should be a valid metavariable declaration.  But
> Coccinelle needs to have enough information to know that something is a
> pointer.  If you have code like a->b and you don't have the definition of
> the structure type of a, then it won't know the type of a->b.  More
> information about types is available if you use options like
> --recursive-includes, but then treatment of every C file will entail
> parsing lots of header files, which could make things very slow.  So you
> have to consider whether the information that the thing is a pointer is
> really necessary to what you are trying to do.

Makes sense, indeed the pointer is embedded in another struct.

I'll keep it as is, if the code calls PTR_ERR() on something that is not
a pointer it has bigger problems than using %pe.

> 
>>>> +@script:python depends on r && org@
>>>
>>> I guess that such an SmPL dependency specification can be simplified a bit.
>>
>> You mean drop the depends on r?
>>
>>>
>>>
>>>> +p << r.p;
> 
> Since you have r.p, the rule will only be applied if r has succeeded and
> furthermore if p has a value.  So depends on r is not necessary.

Got it.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates
  2025-09-28 12:00       ` Markus Elfring
@ 2025-09-28 13:24         ` Gal Pressman
  2025-09-28 14:16           ` Markus Elfring
  0 siblings, 1 reply; 16+ messages in thread
From: Gal Pressman @ 2025-09-28 13:24 UTC (permalink / raw)
  To: Markus Elfring, Tariq Toukan, cocci, Alexei Lazar, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Julia Lawall,
	Paolo Abeni, Simon Horman
  Cc: LKML, netdev, linux-rdma, Leon Romanovsky, Mark Bloch,
	Nicolas Palix, Richard Cochran, Saeed Mahameed

On 28/09/2025 15:00, Markus Elfring wrote:
>>>> +virtual context
>>>> +virtual org
>>>> +virtual report
>>>
>>> The restriction on the support for three operation modes will need further development considerations.
>>
>> I don't understand what you mean?
> 
> The development status might be unclear for the handling of a varying number of operation modes
> by coccicheck rules, isn't it?

I'm sorry, I still don't understand what you mean (the problem is likely
on my side).
Do you want me to change anything?

> 
> 
>> I did find "format list" in the documentation, but spatch fails when I
>> try to use it.
> 
> Which SmPL code variations did you try out?

Ended up with Julia's suggestion.

> 
> 
>>> Would it matter to restrict expressions to pointer expressions?
>>
>> I tried changing 'expression ptr;' -> 'expression *ptr;', but then it
>> didn't find anything. Am I doing it wrong?
> 
> Further software improvements can be reconsidered accordingly.
> 
> 
>>>> +@script:python depends on r && org@
>>>
>>> I guess that such an SmPL dependency specification can be simplified a bit.
>>
>> You mean drop the depends on r?
> 
> You may omit “r &&” (because the rule is referenced by an SmPL variable declaration),
> can't you?

Yes, thanks.

> 
> 
>>>> +p << r.p;
>>>> +@@
>>>> +coccilib.org.print_todo(p[0], "WARNING: Consider using %pe to print PTR_ERR()")
>>>
>>> I suggest to reconsider the implementation detail once more
>>> if the SmPL asterisk functionality fits really to the operation modes “org” and “report”.
>>>
>>> The operation mode “context” can usually work also without an extra position variable,
>>> can't it?
>>
>> Can you please explain?
> 
> Are you aware of data format requirements here?

Apparently not, I'll be glad to learn.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates
  2025-09-28 13:24         ` Gal Pressman
@ 2025-09-28 14:16           ` Markus Elfring
  2025-09-28 16:40             ` Gal Pressman
  0 siblings, 1 reply; 16+ messages in thread
From: Markus Elfring @ 2025-09-28 14:16 UTC (permalink / raw)
  To: Gal Pressman, Tariq Toukan, cocci, Alexei Lazar, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Julia Lawall,
	Paolo Abeni, Simon Horman
  Cc: LKML, netdev, linux-rdma, Leon Romanovsky, Mark Bloch,
	Nicolas Palix, Richard Cochran, Saeed Mahameed

>>>>> +virtual context
>>>>> +virtual org
>>>>> +virtual report
>>>>
>>>> The restriction on the support for three operation modes will need further development considerations.
>>>
>>> I don't understand what you mean?
>>
>> The development status might be unclear for the handling of a varying number of operation modes
>> by coccicheck rules, isn't it?
> 
> I'm sorry, I still don't understand what you mean (the problem is likely
> on my side).

The development status is evolving somehow.


> Do you want me to change anything?

You would like to achieve further software refinements.
Did you notice remaining open issues from public information sources?


>>>>> +p << r.p;
>>>>> +@@
>>>>> +coccilib.org.print_todo(p[0], "WARNING: Consider using %pe to print PTR_ERR()")
>>>>
>>>> I suggest to reconsider the implementation detail once more
>>>> if the SmPL asterisk functionality fits really to the operation modes “org” and “report”.
>>>>
>>>> The operation mode “context” can usually work also without an extra position variable,
>>>> can't it?
>>>
>>> Can you please explain?
>>
>> Are you aware of data format requirements here?
> 
> Apparently not, I'll be glad to learn.

Each “operation mode” is connected with a known data format.
The corresponding software documentation is probably still improvable.
Can you determine data format distinctions from published coccicheck scripts
(and related development discussions)?

Regards,
Markus

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates
  2025-09-28 14:16           ` Markus Elfring
@ 2025-09-28 16:40             ` Gal Pressman
  2025-09-28 17:51               ` [cocci] [1/2] " Markus Elfring
  0 siblings, 1 reply; 16+ messages in thread
From: Gal Pressman @ 2025-09-28 16:40 UTC (permalink / raw)
  To: Markus Elfring, Tariq Toukan, cocci, Alexei Lazar, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Julia Lawall,
	Paolo Abeni, Simon Horman
  Cc: LKML, netdev, linux-rdma, Leon Romanovsky, Mark Bloch,
	Nicolas Palix, Richard Cochran, Saeed Mahameed

On 28/09/2025 17:16, Markus Elfring wrote:
>>>>>> +virtual context
>>>>>> +virtual org
>>>>>> +virtual report
>>>>>
>>>>> The restriction on the support for three operation modes will need further development considerations.
>>>>
>>>> I don't understand what you mean?
>>>
>>> The development status might be unclear for the handling of a varying number of operation modes
>>> by coccicheck rules, isn't it?
>>
>> I'm sorry, I still don't understand what you mean (the problem is likely
>> on my side).
> 
> The development status is evolving somehow.
> 
> 
>> Do you want me to change anything?
> 
> You would like to achieve further software refinements.
> Did you notice remaining open issues from public information sources?
> 
> 
>>>>>> +p << r.p;
>>>>>> +@@
>>>>>> +coccilib.org.print_todo(p[0], "WARNING: Consider using %pe to print PTR_ERR()")
>>>>>
>>>>> I suggest to reconsider the implementation detail once more
>>>>> if the SmPL asterisk functionality fits really to the operation modes “org” and “report”.
>>>>>
>>>>> The operation mode “context” can usually work also without an extra position variable,
>>>>> can't it?
>>>>
>>>> Can you please explain?
>>>
>>> Are you aware of data format requirements here?
>>
>> Apparently not, I'll be glad to learn.
> 
> Each “operation mode” is connected with a known data format.
> The corresponding software documentation is probably still improvable.
> Can you determine data format distinctions from published coccicheck scripts
> (and related development discussions)?
> 
> Regards,
> Markus

I'm not really sure if I'm speaking to a real person or some kind of
weird AI, so I'm going to respectfully ignore these comments..

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] [1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates
  2025-09-28 16:40             ` Gal Pressman
@ 2025-09-28 17:51               ` Markus Elfring
  0 siblings, 0 replies; 16+ messages in thread
From: Markus Elfring @ 2025-09-28 17:51 UTC (permalink / raw)
  To: Gal Pressman, Tariq Toukan, cocci, Alexei Lazar, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Julia Lawall,
	Paolo Abeni, Simon Horman
  Cc: LKML, netdev, linux-rdma, Leon Romanovsky, Mark Bloch,
	Nicolas Palix, Richard Cochran, Saeed Mahameed

> I'm not really sure if I'm speaking to a real person or some kind of
> weird AI, so I'm going to respectfully ignore these comments..

Can you get more development ideas from another information source
than from hints by known contributors (like me)?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/dev-tools/coccinelle.rst?h=v6.17-rc7#n71

I hope that the clarification can become more constructive again.

Regards,
Markus

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-09-28 17:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-18 10:43 [PATCH net-next 0/2] scripts/coccinelle: Symbolic error names script Tariq Toukan
2025-09-18 10:43 ` [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates Tariq Toukan
2025-09-19 16:54   ` Simon Horman
2025-09-22 23:36   ` Jakub Kicinski
2025-09-25 15:07   ` [cocci] " Markus Elfring
2025-09-28 11:40     ` Gal Pressman
2025-09-28 12:00       ` Markus Elfring
2025-09-28 13:24         ` Gal Pressman
2025-09-28 14:16           ` Markus Elfring
2025-09-28 16:40             ` Gal Pressman
2025-09-28 17:51               ` [cocci] [1/2] " Markus Elfring
2025-09-28 12:23       ` [cocci] [PATCH net-next 1/2] " Julia Lawall
2025-09-28 13:17         ` Gal Pressman
2025-09-18 10:43 ` [PATCH net-next 2/2] net/mlx5: Use %pe format specifier for error pointers Tariq Toukan
2025-09-19 16:55   ` Simon Horman
2025-09-26 19:50 ` [PATCH net-next 0/2] scripts/coccinelle: Symbolic error names script patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).