diff options
author | Bart Van Assche <bvanassche@acm.org> | 2022-04-20 00:57:57 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-04-26 05:23:03 +0200 |
commit | c906e8328de83b27f27af07cf79afb799e69838a (patch) | |
tree | 59d85a718058282f4b7f8d53151c12fcc05aa724 /drivers/scsi/ufs/ufs-qcom.c | |
parent | scsi: ufs: Switch to aggregate initialization (diff) | |
download | linux-c906e8328de83b27f27af07cf79afb799e69838a.tar.xz linux-c906e8328de83b27f27af07cf79afb799e69838a.zip |
scsi: ufs: Make the config_scaling_param calls type safe
Pass the actual type to config_scaling_param callback as the third argment
instead of a void pointer. Remove a superfluous NULL pointer check from
ufs_qcom_config_scaling_param().
Link: https://lore.kernel.org/r/20220419225811.4127248-15-bvanassche@acm.org
Tested-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufs-qcom.c')
-rw-r--r-- | drivers/scsi/ufs/ufs-qcom.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c index 46b24b926860..851caef04a60 100644 --- a/drivers/scsi/ufs/ufs-qcom.c +++ b/drivers/scsi/ufs/ufs-qcom.c @@ -1448,23 +1448,17 @@ static int ufs_qcom_device_reset(struct ufs_hba *hba) #if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND) static void ufs_qcom_config_scaling_param(struct ufs_hba *hba, - struct devfreq_dev_profile *p, - void *data) + struct devfreq_dev_profile *p, + struct devfreq_simple_ondemand_data *d) { - static struct devfreq_simple_ondemand_data *d; - - if (!data) - return; - - d = (struct devfreq_simple_ondemand_data *)data; p->polling_ms = 60; d->upthreshold = 70; d->downdifferential = 5; } #else static void ufs_qcom_config_scaling_param(struct ufs_hba *hba, - struct devfreq_dev_profile *p, - void *data) + struct devfreq_dev_profile *p, + struct devfreq_simple_ondemand_data *data) { } #endif |