scsi: ufs: Constify the third pwr_change_notify() argument
Subsystems (8)
Bart Van Assche
reviewerPATCH 1/1 scsi: ufs: Constify the third pwr_change_notify() argument
The third pwr_change_notify() argument is an input parameter. Make this explicit by declaring it 'const'.
--- drivers/ufs/core/ufshcd-priv.h | 6 +++--- drivers/ufs/host/ufs-exynos.c | 10 +++++----- drivers/ufs/host/ufs-exynos.h | 2 +- drivers/ufs/host/ufs-hisi.c | 6 +++--- drivers/ufs/host/ufs-mediatek.c | 10 +++++----- drivers/ufs/host/ufs-qcom.c | 2 +- drivers/ufs/host/ufs-sprd.c | 6 +++--- drivers/ufs/host/ufshcd-pci.c | 2 +- include/ufs/ufshcd.h | 8 ++++---- 9 files changed, 26 insertions(+), 26 deletions(-)
drivers/ufs/core/ufshcd-priv.h +3 -3
@@ -159,9 +159,9 @@ static inline int ufshcd_vops_link_startup_notify(struct ufs_hba *hba, }static inline int ufshcd_vops_pwr_change_notify (struct ufs_hba *hba, -enum ufs_notify_change_status status, -struct ufs_pa_layer_attr *dev_max_params, -struct ufs_pa_layer_attr *dev_req_params) +enum ufs_notify_change_status status, +const struct ufs_pa_layer_attr *dev_max_params, +struct ufs_pa_layer_attr *dev_req_params) {if (hba->vops && hba->vops->pwr_change_notify) return hba->vops->pwr_change_notify(hba, status,
drivers/ufs/host/ufs-exynos.c +5 -5
@@ -321,7 +321,7 @@ static int exynosauto_ufs_pre_pwr_change(struct exynos_ufs *ufs, }static int exynosauto_ufs_post_pwr_change (struct exynos_ufs *ufs, -struct ufs_pa_layer_attr *pwr) +const struct ufs_pa_layer_attr *pwr) {struct ufs_hba *hba = ufs->hba;u32 enabled_vh;
@@ -396,7 +396,7 @@ static int exynos7_ufs_pre_pwr_change(struct exynos_ufs *ufs, }static int exynos7_ufs_post_pwr_change (struct exynos_ufs *ufs, -struct ufs_pa_layer_attr *pwr) +const struct ufs_pa_layer_attr *pwr) {struct ufs_hba *hba = ufs->hba;int lanes =max_t (u32, pwr->lane_rx, pwr->lane_tx);
@@ -813,7 +813,7 @@ static u32 exynos_ufs_get_hs_gear(struct ufs_hba *hba) }static int exynos_ufs_pre_pwr_mode (struct ufs_hba *hba, -struct ufs_pa_layer_attr *dev_max_params, +const struct ufs_pa_layer_attr *dev_max_params,struct ufs_pa_layer_attr *dev_req_params) {struct exynos_ufs *ufs =ufshcd_get_variant (hba);
@@ -865,7 +865,7 @@ static int exynos_ufs_pre_pwr_mode(struct ufs_hba *hba,#define PWR_MODE_STR_LEN 64static int exynos_ufs_post_pwr_mode (struct ufs_hba *hba, -struct ufs_pa_layer_attr *pwr_req) +const struct ufs_pa_layer_attr *pwr_req) {struct exynos_ufs *ufs =ufshcd_get_variant (hba);struct phy *generic_phy = ufs->phy;
@@ -1634,7 +1634,7 @@ static int exynos_ufs_link_startup_notify(struct ufs_hba *hba,static int exynos_ufs_pwr_change_notify (struct ufs_hba *hba,enum ufs_notify_change_status status, -struct ufs_pa_layer_attr *dev_max_params, +const struct ufs_pa_layer_attr *dev_max_params,struct ufs_pa_layer_attr *dev_req_params) {int ret =0 ;
drivers/ufs/host/ufs-exynos.h +1 -1
@@ -188,7 +188,7 @@ struct exynos_ufs_drv_data {int (*pre_pwr_change)(struct exynos_ufs *ufs,struct ufs_pa_layer_attr *pwr);int (*post_pwr_change)(struct exynos_ufs *ufs, -struct ufs_pa_layer_attr *pwr); +const struct ufs_pa_layer_attr *pwr);int (*pre_hce_enable)(struct exynos_ufs *ufs);int (*post_hce_enable)(struct exynos_ufs *ufs); };
drivers/ufs/host/ufs-hisi.c +3 -3
@@ -361,9 +361,9 @@ static void ufs_hisi_pwr_change_pre_change(struct ufs_hba *hba) }static int ufs_hisi_pwr_change_notify (struct ufs_hba *hba, -enum ufs_notify_change_status status, -struct ufs_pa_layer_attr *dev_max_params, -struct ufs_pa_layer_attr *dev_req_params) +enum ufs_notify_change_status status, +const struct ufs_pa_layer_attr *dev_max_params, +struct ufs_pa_layer_attr *dev_req_params) {struct ufs_host_params host_params;int ret =0 ;
drivers/ufs/host/ufs-mediatek.c +5 -5
@@ -1081,8 +1081,8 @@ static bool ufs_mtk_pmc_via_fastauto(struct ufs_hba *hba, }static int ufs_mtk_pre_pwr_change (struct ufs_hba *hba, -struct ufs_pa_layer_attr *dev_max_params, -struct ufs_pa_layer_attr *dev_req_params) +const struct ufs_pa_layer_attr *dev_max_params, +struct ufs_pa_layer_attr *dev_req_params) {struct ufs_mtk_host *host =ufshcd_get_variant (hba);struct ufs_host_params host_params;
@@ -1134,9 +1134,9 @@ static int ufs_mtk_pre_pwr_change(struct ufs_hba *hba, }static int ufs_mtk_pwr_change_notify (struct ufs_hba *hba, -enum ufs_notify_change_status stage, -struct ufs_pa_layer_attr *dev_max_params, -struct ufs_pa_layer_attr *dev_req_params) +enum ufs_notify_change_status stage, +const struct ufs_pa_layer_attr *dev_max_params, +struct ufs_pa_layer_attr *dev_req_params) {int ret =0 ;
drivers/ufs/host/ufs-qcom.c +1 -1
@@ -807,7 +807,7 @@ static int ufs_qcom_icc_update_bw(struct ufs_qcom_host *host)static int ufs_qcom_pwr_change_notify (struct ufs_hba *hba,enum ufs_notify_change_status status, -struct ufs_pa_layer_attr *dev_max_params, +const struct ufs_pa_layer_attr *dev_max_params,struct ufs_pa_layer_attr *dev_req_params) {struct ufs_qcom_host *host =ufshcd_get_variant (hba);
drivers/ufs/host/ufs-sprd.c +3 -3
@@ -160,9 +160,9 @@ static int ufs_sprd_common_init(struct ufs_hba *hba) }static int sprd_ufs_pwr_change_notify (struct ufs_hba *hba, -enum ufs_notify_change_status status, -struct ufs_pa_layer_attr *dev_max_params, -struct ufs_pa_layer_attr *dev_req_params) +enum ufs_notify_change_status status, +const struct ufs_pa_layer_attr *dev_max_params, +struct ufs_pa_layer_attr *dev_req_params) {struct ufs_sprd_host *host =ufshcd_get_variant (hba);
drivers/ufs/host/ufshcd-pci.c +1 -1
@@ -157,7 +157,7 @@ static int ufs_intel_set_lanes(struct ufs_hba *hba, u32 lanes)static int ufs_intel_lkf_pwr_change_notify (struct ufs_hba *hba,enum ufs_notify_change_status status, -struct ufs_pa_layer_attr *dev_max_params, +const struct ufs_pa_layer_attr *dev_max_params,struct ufs_pa_layer_attr *dev_req_params) {int err =0 ;
include/ufs/ufshcd.h +4 -4
@@ -353,9 +353,9 @@ struct ufs_hba_variant_ops {int (*link_startup_notify)(struct ufs_hba *,enum ufs_notify_change_status );int (*pwr_change_notify)(struct ufs_hba *, -enum ufs_notify_change_status status, -struct ufs_pa_layer_attr *desired_pwr_mode, -struct ufs_pa_layer_attr *final_params); +enum ufs_notify_change_status status, +const struct ufs_pa_layer_attr *desired_pwr_mode, +struct ufs_pa_layer_attr *final_params);void (*setup_xfer_req)(struct ufs_hba *hba,int tag,bool is_scsi_cmd);void (*setup_task_mgmt)(struct ufs_hba *,int ,u8 );
@@ -1422,7 +1422,7 @@ static inline int ufshcd_dme_peer_get(struct ufs_hba *hba,return ufshcd_dme_get_attr (hba, attr_sel, mib_val,DME_PEER ); } -static inline bool ufshcd_is_hs_mode (struct ufs_pa_layer_attr *pwr_info) +static inline bool ufshcd_is_hs_mode (const struct ufs_pa_layer_attr *pwr_info) {return (pwr_info->pwr_rx ==FAST_MODE || pwr_info->pwr_rx == FASTAUTO_MODE) &&
Martin K. Petersen
AppliedBart,
Quoted 2 lines
The third
pwr_change_notify()argument is an input parameter. Make this explicit by declaring it 'const'.
Applied to 6.15/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Quoted 20 lines · Bart Van Assche
External email : Please do not click links or open attachments until you have verified the sender or the content.
The third
pwr_change_notify()argument is an input parameter. Make this
explicit by declaring it 'const'.Signed-off-by Bart Van Assche <[email protected]>---
drivers/ufs/core/ufshcd-priv.h | 6 +++---
drivers/ufs/host/ufs-exynos.c | 10 +++++-----
drivers/ufs/host/ufs-exynos.h | 2 +-
drivers/ufs/host/ufs-hisi.c | 6 +++---
drivers/ufs/host/ufs-mediatek.c | 10 +++++-----
drivers/ufs/host/ufs-qcom.c | 2 +-
drivers/ufs/host/ufs-sprd.c | 6 +++---
drivers/ufs/host/ufshcd-pci.c | 2 +-
include/ufs/ufshcd.h | 8 ++++----
Quoted 3 lines
9 files changed, 26 insertions(+), 26 deletions(-)
Martin K. Petersen
AppliedQuoted 4 lines · Bart Van Assche
The third
pwr_change_notify()argument is an input parameter. Make this explicit by declaring it 'const'.
Applied to 6.15/scsi-queue, thanks!
[1/1] scsi: ufs: Constify the third pwr_change_notify() argument
https://git.kernel.org/mkp/scsi/c/3bcd901e4257
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering