aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-10-04 17:15:06 -0700
committerJakub Kicinski <kuba@kernel.org>2023-10-04 17:15:06 -0700
commitb4ac75a3bb5cdf5c8bfac3f0a92db53091faba35 (patch)
treecc39cc496b65c75c350bcc04e8cde456e8361fb2
parent78cac6f17133d503add9005e891e15637b2a1012 (diff)
parentf4ecb3d44a117b16029485325bda1bc98c26de36 (diff)
downloadnf-next-b4ac75a3bb5cdf5c8bfac3f0a92db53091faba35.tar.gz
Merge branch 'fix-a-couple-recent-instances-of-wincompatible-function-pointer-types-strict-from-mode_get-implementations'
Nathan Chancellor says: ==================== Fix a couple recent instances of -Wincompatible-function-pointer-types-strict from ->mode_get() implementations This series fixes a couple of instances of -Wincompatible-function-pointer-types-strict that were introduced by a recent series that added a new type of ops, struct dpll_device_ops, along with implementations of the callback ->mode_get() that had a mismatched mode type. This warning is not currently enabled for any build but I am planning on submitting a patch to add it to W=1 to prevent new instances of the warning from popping up while we try and fix the existing instances in other drivers. This series is based on current net-next but if they need to go into individual maintainer trees, please feel free to take the patches individually. ==================== Link: https://lore.kernel.org/r/20231002-net-wifpts-dpll_mode_get-v1-0-a356a16413cf@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/dpll.c4
-rw-r--r--drivers/ptp/ptp_ocp.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/dpll.c b/drivers/net/ethernet/mellanox/mlx5/core/dpll.c
index 74f0c78671201..2cd81bb32c66b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/dpll.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/dpll.c
@@ -121,8 +121,8 @@ static int mlx5_dpll_device_lock_status_get(const struct dpll_device *dpll,
}
static int mlx5_dpll_device_mode_get(const struct dpll_device *dpll,
- void *priv,
- u32 *mode, struct netlink_ext_ack *extack)
+ void *priv, enum dpll_mode *mode,
+ struct netlink_ext_ack *extack)
{
*mode = DPLL_MODE_MANUAL;
return 0;
diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index d39afe091a7bc..6835ffe88d43b 100644
--- a/drivers/ptp/ptp_ocp.c
+++ b/drivers/ptp/ptp_ocp.c
@@ -4255,7 +4255,7 @@ static int ptp_ocp_dpll_state_get(const struct dpll_pin *pin, void *pin_priv,
}
static int ptp_ocp_dpll_mode_get(const struct dpll_device *dpll, void *priv,
- u32 *mode, struct netlink_ext_ack *extack)
+ enum dpll_mode *mode, struct netlink_ext_ack *extack)
{
*mode = DPLL_MODE_AUTOMATIC;
return 0;