devlink: collect flash notify params into a struct

The dev flash status notify function parameter lists are getting
rather long, so add a struct to be filled and passed rather than
continuously changing the function signatures.

Signed-off-by: Shannon Nelson <snelson@pensando.io>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Shannon Nelson
2020-09-17 18:13:24 -07:00
committed by David S. Miller
parent f92970c694
commit 6700acc5f1
2 changed files with 50 additions and 23 deletions

View File

@@ -391,6 +391,25 @@ struct devlink_param_gset_ctx {
enum devlink_param_cmode cmode;
};
/**
* struct devlink_flash_notify - devlink dev flash notify data
* @status_msg: current status string
* @component: firmware component being updated
* @done: amount of work completed of total amount
* @total: amount of work expected to be done
* @timeout: expected max timeout in seconds
*
* These are values to be given to userland to be displayed in order
* to show current activity in a firmware update process.
*/
struct devlink_flash_notify {
const char *status_msg;
const char *component;
unsigned long done;
unsigned long total;
unsigned long timeout;
};
/**
* struct devlink_param - devlink configuration parameter data
* @name: name of the parameter