Message ID | 20231201151417.65500-12-manivannan.sadhasivam@linaro.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | scsi: ufs: qcom: Minor code cleanups | expand |
On Fri, Dec 01, 2023 at 08:44:15PM +0530, Manivannan Sadhasivam wrote: > ufs_qcom_hosts array is assigned, but not used anywhere. So let's remove > it. > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > --- > drivers/ufs/host/ufs-qcom.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c > index a86f6620abc8..824c006be093 100644 > --- a/drivers/ufs/host/ufs-qcom.c > +++ b/drivers/ufs/host/ufs-qcom.c > @@ -90,8 +90,6 @@ static const struct __ufs_qcom_bw_table { > [MODE_MAX][0][0] = { 7643136, 307200 }, > }; > > -static struct ufs_qcom_host *ufs_qcom_hosts[MAX_UFS_QCOM_HOSTS]; > - I think we can get rid of MAX_UFS_QCOM_HOSTS as well with this change in place? > static void ufs_qcom_get_default_testbus_cfg(struct ufs_qcom_host *host); > static int ufs_qcom_set_core_clk_ctrl(struct ufs_hba *hba, bool is_scale_up); > > @@ -1192,9 +1190,6 @@ static int ufs_qcom_init(struct ufs_hba *hba) > > ufs_qcom_setup_clocks(hba, true, POST_CHANGE); > > - if (hba->dev->id < MAX_UFS_QCOM_HOSTS) > - ufs_qcom_hosts[hba->dev->id] = host; > - > ufs_qcom_get_default_testbus_cfg(host); > err = ufs_qcom_testbus_config(host); > if (err) > -- > 2.25.1 > >
On Wed, Dec 06, 2023 at 12:54:43PM -0600, Andrew Halaney wrote: > On Fri, Dec 01, 2023 at 08:44:15PM +0530, Manivannan Sadhasivam wrote: > > ufs_qcom_hosts array is assigned, but not used anywhere. So let's remove > > it. > > > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > > --- > > drivers/ufs/host/ufs-qcom.c | 5 ----- > > 1 file changed, 5 deletions(-) > > > > diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c > > index a86f6620abc8..824c006be093 100644 > > --- a/drivers/ufs/host/ufs-qcom.c > > +++ b/drivers/ufs/host/ufs-qcom.c > > @@ -90,8 +90,6 @@ static const struct __ufs_qcom_bw_table { > > [MODE_MAX][0][0] = { 7643136, 307200 }, > > }; > > > > -static struct ufs_qcom_host *ufs_qcom_hosts[MAX_UFS_QCOM_HOSTS]; > > - > > I think we can get rid of MAX_UFS_QCOM_HOSTS as well with this change in > place? > Yes, thanks for spotting. - Mani > > static void ufs_qcom_get_default_testbus_cfg(struct ufs_qcom_host *host); > > static int ufs_qcom_set_core_clk_ctrl(struct ufs_hba *hba, bool is_scale_up); > > > > @@ -1192,9 +1190,6 @@ static int ufs_qcom_init(struct ufs_hba *hba) > > > > ufs_qcom_setup_clocks(hba, true, POST_CHANGE); > > > > - if (hba->dev->id < MAX_UFS_QCOM_HOSTS) > > - ufs_qcom_hosts[hba->dev->id] = host; > > - > > ufs_qcom_get_default_testbus_cfg(host); > > err = ufs_qcom_testbus_config(host); > > if (err) > > -- > > 2.25.1 > > > > > >
On 12/1/2023 8:44 PM, Manivannan Sadhasivam wrote: > ufs_qcom_hosts array is assigned, but not used anywhere. So let's remove > it. > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > --- > drivers/ufs/host/ufs-qcom.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c > index a86f6620abc8..824c006be093 100644 > --- a/drivers/ufs/host/ufs-qcom.c > +++ b/drivers/ufs/host/ufs-qcom.c > @@ -90,8 +90,6 @@ static const struct __ufs_qcom_bw_table { > [MODE_MAX][0][0] = { 7643136, 307200 }, > }; > > -static struct ufs_qcom_host *ufs_qcom_hosts[MAX_UFS_QCOM_HOSTS]; > - > static void ufs_qcom_get_default_testbus_cfg(struct ufs_qcom_host *host); > static int ufs_qcom_set_core_clk_ctrl(struct ufs_hba *hba, bool is_scale_up); > > @@ -1192,9 +1190,6 @@ static int ufs_qcom_init(struct ufs_hba *hba) > > ufs_qcom_setup_clocks(hba, true, POST_CHANGE); > > - if (hba->dev->id < MAX_UFS_QCOM_HOSTS) > - ufs_qcom_hosts[hba->dev->id] = host; > - > ufs_qcom_get_default_testbus_cfg(host); > err = ufs_qcom_testbus_config(host); > if (err) Hi Mani, There is plan to upstream 2nd UFS instance change which may need ufs_qcom_hosts. But for now this is unused and can be removed. Anyways change Looks Good. Hence Reviewed-by: Nitin Rawat <quic_nitirawa@quicinc.com> Regards, Nitin
On Thu, Dec 07, 2023 at 11:01:59AM +0530, Manivannan Sadhasivam wrote: > On Wed, Dec 06, 2023 at 12:54:43PM -0600, Andrew Halaney wrote: > > On Fri, Dec 01, 2023 at 08:44:15PM +0530, Manivannan Sadhasivam wrote: > > > ufs_qcom_hosts array is assigned, but not used anywhere. So let's remove > > > it. > > > > > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > > > --- > > > drivers/ufs/host/ufs-qcom.c | 5 ----- > > > 1 file changed, 5 deletions(-) > > > > > > diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c > > > index a86f6620abc8..824c006be093 100644 > > > --- a/drivers/ufs/host/ufs-qcom.c > > > +++ b/drivers/ufs/host/ufs-qcom.c > > > @@ -90,8 +90,6 @@ static const struct __ufs_qcom_bw_table { > > > [MODE_MAX][0][0] = { 7643136, 307200 }, > > > }; > > > > > > -static struct ufs_qcom_host *ufs_qcom_hosts[MAX_UFS_QCOM_HOSTS]; > > > - > > > > I think we can get rid of MAX_UFS_QCOM_HOSTS as well with this change in > > place? > > > > Yes, thanks for spotting. With that in place please add: Reviewed-by: Andrew Halaney <ahalaney@redhat.com> > > - Mani > > > > static void ufs_qcom_get_default_testbus_cfg(struct ufs_qcom_host *host); > > > static int ufs_qcom_set_core_clk_ctrl(struct ufs_hba *hba, bool is_scale_up); > > > > > > @@ -1192,9 +1190,6 @@ static int ufs_qcom_init(struct ufs_hba *hba) > > > > > > ufs_qcom_setup_clocks(hba, true, POST_CHANGE); > > > > > > - if (hba->dev->id < MAX_UFS_QCOM_HOSTS) > > > - ufs_qcom_hosts[hba->dev->id] = host; > > > - > > > ufs_qcom_get_default_testbus_cfg(host); > > > err = ufs_qcom_testbus_config(host); > > > if (err) > > > -- > > > 2.25.1 > > > > > > > > > > > > -- > மணிவண்ணன் சதாசிவம் >
diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index a86f6620abc8..824c006be093 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -90,8 +90,6 @@ static const struct __ufs_qcom_bw_table { [MODE_MAX][0][0] = { 7643136, 307200 }, }; -static struct ufs_qcom_host *ufs_qcom_hosts[MAX_UFS_QCOM_HOSTS]; - static void ufs_qcom_get_default_testbus_cfg(struct ufs_qcom_host *host); static int ufs_qcom_set_core_clk_ctrl(struct ufs_hba *hba, bool is_scale_up); @@ -1192,9 +1190,6 @@ static int ufs_qcom_init(struct ufs_hba *hba) ufs_qcom_setup_clocks(hba, true, POST_CHANGE); - if (hba->dev->id < MAX_UFS_QCOM_HOSTS) - ufs_qcom_hosts[hba->dev->id] = host; - ufs_qcom_get_default_testbus_cfg(host); err = ufs_qcom_testbus_config(host); if (err)
ufs_qcom_hosts array is assigned, but not used anywhere. So let's remove it. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> --- drivers/ufs/host/ufs-qcom.c | 5 ----- 1 file changed, 5 deletions(-)