net: devlink: clean-up empty devlink_ops::info_get()
authorVincent Mailhol <mailhol.vincent@wanadoo.fr>
Tue, 29 Nov 2022 09:51:40 +0000 (18:51 +0900)
committerJakub Kicinski <kuba@kernel.org>
Thu, 1 Dec 2022 05:49:39 +0000 (21:49 -0800)
devlink_ops::info_get() is now optional and devlink will continue to
report information even if that callback gets removed.

Remove all the empty devlink_ops::info_get() callbacks from the
drivers.

Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/fungible/funeth/funeth_devlink.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.c

index 6668375edff6c7dd1b253316d9c22f1c35118a0e..4fbeb3fd71a8ae2438d489f0a6cf9c5966feb78b 100644 (file)
@@ -3,14 +3,7 @@
 #include "funeth.h"
 #include "funeth_devlink.h"
 
-static int fun_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
-                          struct netlink_ext_ack *extack)
-{
-       return 0;
-}
-
 static const struct devlink_ops fun_dl_ops = {
-       .info_get = fun_dl_info_get,
 };
 
 struct devlink *fun_devlink_alloc(struct device *dev)
index f15439d26d21a2da304edfaeee52bf7c9ea45507..bda1a6fa2ec43cd98cf52ab62600bf968c0252c8 100644 (file)
@@ -1547,14 +1547,7 @@ static int rvu_devlink_eswitch_mode_set(struct devlink *devlink, u16 mode,
        return 0;
 }
 
-static int rvu_devlink_info_get(struct devlink *devlink, struct devlink_info_req *req,
-                               struct netlink_ext_ack *extack)
-{
-       return 0;
-}
-
 static const struct devlink_ops rvu_devlink_ops = {
-       .info_get = rvu_devlink_info_get,
        .eswitch_mode_get = rvu_devlink_eswitch_mode_get,
        .eswitch_mode_set = rvu_devlink_eswitch_mode_set,
 };
index 5cc6416cf1a68c37f0d219b31dc7d133928aa980..63ef7c41d18d1c6e0453b60bffcdfdb22d9b8326 100644 (file)
@@ -77,15 +77,7 @@ static const struct devlink_param otx2_dl_params[] = {
                             otx2_dl_mcam_count_validate),
 };
 
-static int otx2_devlink_info_get(struct devlink *devlink,
-                                struct devlink_info_req *req,
-                                struct netlink_ext_ack *extack)
-{
-       return 0;
-}
-
 static const struct devlink_ops otx2_devlink_ops = {
-       .info_get = otx2_devlink_info_get,
 };
 
 int otx2_register_dl(struct otx2_nic *pfvf)