Commit 52478f62 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'add-missing-netlink-error-message-macros-to-coccinelle-test'

Gal Pressman says:

====================
Add missing netlink error message macros to coccinelle test

The newline_in_nl_msg.cocci test is missing some variants in the list of
checked macros, add them and fix all reported issues.
====================

Link: https://patch.msgid.link/20250226093904.6632-1-gal@nvidia.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 38d41cf5 e0c032d2
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ ice_dpll_pin_freq_set(struct ice_pf *pf, struct ice_dpll_pin *pin,
	}
	if (ret) {
		NL_SET_ERR_MSG_FMT(extack,
				   "err:%d %s failed to set pin freq:%u on pin:%u\n",
				   "err:%d %s failed to set pin freq:%u on pin:%u",
				   ret,
				   ice_aq_str(pf->hw.adminq.sq_last_status),
				   freq, pin->idx);
@@ -322,7 +322,7 @@ ice_dpll_pin_enable(struct ice_hw *hw, struct ice_dpll_pin *pin,
	}
	if (ret)
		NL_SET_ERR_MSG_FMT(extack,
				   "err:%d %s failed to enable %s pin:%u\n",
				   "err:%d %s failed to enable %s pin:%u",
				   ret, ice_aq_str(hw->adminq.sq_last_status),
				   pin_type_name[pin_type], pin->idx);

@@ -367,7 +367,7 @@ ice_dpll_pin_disable(struct ice_hw *hw, struct ice_dpll_pin *pin,
	}
	if (ret)
		NL_SET_ERR_MSG_FMT(extack,
				   "err:%d %s failed to disable %s pin:%u\n",
				   "err:%d %s failed to disable %s pin:%u",
				   ret, ice_aq_str(hw->adminq.sq_last_status),
				   pin_type_name[pin_type], pin->idx);

@@ -479,7 +479,7 @@ ice_dpll_pin_state_update(struct ice_pf *pf, struct ice_dpll_pin *pin,
err:
	if (extack)
		NL_SET_ERR_MSG_FMT(extack,
				   "err:%d %s failed to update %s pin:%u\n",
				   "err:%d %s failed to update %s pin:%u",
				   ret,
				   ice_aq_str(pf->hw.adminq.sq_last_status),
				   pin_type_name[pin_type], pin->idx);
@@ -518,7 +518,7 @@ ice_dpll_hw_input_prio_set(struct ice_pf *pf, struct ice_dpll *dpll,
				      (u8)prio);
	if (ret)
		NL_SET_ERR_MSG_FMT(extack,
				   "err:%d %s failed to set pin prio:%u on pin:%u\n",
				   "err:%d %s failed to set pin prio:%u on pin:%u",
				   ret,
				   ice_aq_str(pf->hw.adminq.sq_last_status),
				   prio, pin->idx);
@@ -1004,7 +1004,7 @@ ice_dpll_pin_phase_adjust_set(const struct dpll_pin *pin, void *pin_priv,
	mutex_unlock(&pf->dplls.lock);
	if (ret)
		NL_SET_ERR_MSG_FMT(extack,
				   "err:%d %s failed to set pin phase_adjust:%d for pin:%u on dpll:%u\n",
				   "err:%d %s failed to set pin phase_adjust:%d for pin:%u on dpll:%u",
				   ret,
				   ice_aq_str(pf->hw.adminq.sq_last_status),
				   phase_adjust, p->idx, d->dpll_idx);
@@ -1362,7 +1362,7 @@ ice_dpll_rclk_state_on_pin_set(const struct dpll_pin *pin, void *pin_priv,
					 &p->freq);
	if (ret)
		NL_SET_ERR_MSG_FMT(extack,
				   "err:%d %s failed to set pin state:%u for pin:%u on parent:%u\n",
				   "err:%d %s failed to set pin state:%u for pin:%u on parent:%u",
				   ret,
				   ice_aq_str(pf->hw.adminq.sq_last_status),
				   state, p->idx, parent->idx);
+1 −1
Original line number Diff line number Diff line
@@ -242,7 +242,7 @@ static int mlx5_dpll_clock_quality_level_get(const struct dpll_device *dpll,
		return 0;
	}
errout:
	NL_SET_ERR_MSG_MOD(extack, "Invalid clock quality level obtained from firmware\n");
	NL_SET_ERR_MSG_MOD(extack, "Invalid clock quality level obtained from firmware");
	return -EINVAL;
}

+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ static int mlx5e_tc_tun_parse_vxlan_gbp_option(struct mlx5e_priv *priv,
	gbp_mask = (u32 *)&enc_opts.mask->data[0];

	if (*gbp_mask & ~VXLAN_GBP_MASK) {
		NL_SET_ERR_MSG_FMT_MOD(extack, "Wrong VxLAN GBP mask(0x%08X)\n", *gbp_mask);
		NL_SET_ERR_MSG_FMT_MOD(extack, "Wrong VxLAN GBP mask(0x%08X)", *gbp_mask);
		return -EINVAL;
	}

+1 −1
Original line number Diff line number Diff line
@@ -2026,7 +2026,7 @@ static int mlx5e_get_module_eeprom_by_page(struct net_device *netdev,
		if (size_read < 0) {
			NL_SET_ERR_MSG_FMT_MOD(
				extack,
				"Query module eeprom by page failed, read %u bytes, err %d\n",
				"Query module eeprom by page failed, read %u bytes, err %d",
				i, size_read);
			return i;
		}
+3 −3
Original line number Diff line number Diff line
@@ -1863,7 +1863,7 @@ int mlx5_esw_bridge_port_mdb_add(struct net_device *dev, u16 vport_num, u16 esw_
			 "Failed to lookup bridge port to add MDB (MAC=%pM,vport=%u)\n",
			 addr, vport_num);
		NL_SET_ERR_MSG_FMT_MOD(extack,
				       "Failed to lookup bridge port to add MDB (MAC=%pM,vport=%u)\n",
				       "Failed to lookup bridge port to add MDB (MAC=%pM,vport=%u)",
				       addr, vport_num);
		return -EINVAL;
	}
@@ -1876,7 +1876,7 @@ int mlx5_esw_bridge_port_mdb_add(struct net_device *dev, u16 vport_num, u16 esw_
				 "Failed to lookup bridge port vlan metadata to create MDB (MAC=%pM,vid=%u,vport=%u)\n",
				 addr, vid, vport_num);
			NL_SET_ERR_MSG_FMT_MOD(extack,
					       "Failed to lookup vlan metadata for MDB (MAC=%pM,vid=%u,vport=%u)\n",
					       "Failed to lookup vlan metadata for MDB (MAC=%pM,vid=%u,vport=%u)",
					       addr, vid, vport_num);
			return -EINVAL;
		}
@@ -1884,7 +1884,7 @@ int mlx5_esw_bridge_port_mdb_add(struct net_device *dev, u16 vport_num, u16 esw_

	err = mlx5_esw_bridge_port_mdb_attach(dev, port, addr, vid);
	if (err) {
		NL_SET_ERR_MSG_FMT_MOD(extack, "Failed to add MDB (MAC=%pM,vid=%u,vport=%u)\n",
		NL_SET_ERR_MSG_FMT_MOD(extack, "Failed to add MDB (MAC=%pM,vid=%u,vport=%u)",
				       addr, vid, vport_num);
		return err;
	}
Loading