]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ice: drop ice_pf_fwlog_update_module()
authorMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tue, 12 Aug 2025 04:23:24 +0000 (06:23 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 11 Sep 2025 19:09:29 +0000 (12:09 -0700)
Any other access to fwlog_cfg isn't done through a function. Follow
scheme that is used to access other fwlog_cfg elements from debugfs and
write to the log_level directly.

ice_pf_fwlog_update_module() is called only twice (from one function).
Remove it.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_debugfs.c
drivers/net/ethernet/intel/ice/ice_main.c

index e952d67388bf948408074799a4e036c8b1c69243..a6803b3445407a0db378df8a18d6455519deac10 100644 (file)
@@ -912,7 +912,6 @@ void ice_debugfs_fwlog_init(struct ice_pf *pf);
 void ice_debugfs_pf_deinit(struct ice_pf *pf);
 void ice_debugfs_init(void);
 void ice_debugfs_exit(void);
-void ice_pf_fwlog_update_module(struct ice_pf *pf, int log_level, int module);
 
 bool netif_is_ice(const struct net_device *dev);
 int ice_vsi_setup_tx_rings(struct ice_vsi *vsi);
index cb71eca6a85bf623f2aa18c80b3b3edd4311232b..170050548e747aa602e866ea8700eea87d3d1ff0 100644 (file)
@@ -164,6 +164,7 @@ ice_debugfs_module_write(struct file *filp, const char __user *buf,
        struct ice_pf *pf = file_inode(filp)->i_private;
        struct dentry *dentry = file_dentry(filp);
        struct device *dev = ice_pf_to_dev(pf);
+       struct ice_hw *hw = &pf->hw;
        char user_val[16], *cmd_buf;
        int module, log_level, cnt;
 
@@ -192,7 +193,7 @@ ice_debugfs_module_write(struct file *filp, const char __user *buf,
        }
 
        if (module != ICE_AQC_FW_LOG_ID_MAX) {
-               ice_pf_fwlog_update_module(pf, log_level, module);
+               hw->fwlog_cfg.module_entries[module].log_level = log_level;
        } else {
                /* the module 'all' is a shortcut so that we can set
                 * all of the modules to the same level quickly
@@ -200,7 +201,7 @@ ice_debugfs_module_write(struct file *filp, const char __user *buf,
                int i;
 
                for (i = 0; i < ICE_AQC_FW_LOG_ID_MAX; i++)
-                       ice_pf_fwlog_update_module(pf, log_level, i);
+                       hw->fwlog_cfg.module_entries[i].log_level = log_level;
        }
 
        return count;
index dcb8e752047176efe10a3ab1b5f1e88033c52edc..47e2fab3432eef30ff64dfa24bfbf3a3a8b788f3 100644 (file)
@@ -4628,19 +4628,6 @@ static void ice_print_wake_reason(struct ice_pf *pf)
        dev_info(ice_pf_to_dev(pf), "Wake reason: %s", wake_str);
 }
 
-/**
- * ice_pf_fwlog_update_module - update 1 module
- * @pf: pointer to the PF struct
- * @log_level: log_level to use for the @module
- * @module: module to update
- */
-void ice_pf_fwlog_update_module(struct ice_pf *pf, int log_level, int module)
-{
-       struct ice_hw *hw = &pf->hw;
-
-       hw->fwlog_cfg.module_entries[module].log_level = log_level;
-}
-
 /**
  * ice_register_netdev - register netdev
  * @vsi: pointer to the VSI struct