diff mbox series

[3/3] ufs: Remove .setup_xfer_req()

Message ID 20191029230710.211926-4-bvanassche@acm.org (mailing list archive)
State Accepted
Headers show
Series Three small UFS patches | expand

Commit Message

Bart Van Assche Oct. 29, 2019, 11:07 p.m. UTC
Since the function ufshcd_vops_setup_xfer_req() is the only user of the
setup_xfer_req function pointer and since that function pointer is always
zero, remove both this function and the function pointer. This patch
does not change any functionality.

Cc: Yaniv Gardi <ygardi@codeaurora.org>
Cc: Subhash Jadavani <subhashj@codeaurora.org>
Cc: Stanley Chu <stanley.chu@mediatek.com>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/ufs/ufshcd.c |  2 --
 drivers/scsi/ufs/ufshcd.h | 10 ----------
 2 files changed, 12 deletions(-)

Comments

Avri Altman Oct. 30, 2019, 11:19 a.m. UTC | #1
+ Kiwoong Kim

> 
> Since the function ufshcd_vops_setup_xfer_req() is the only user of the
> setup_xfer_req function pointer and since that function pointer is always zero,
> remove both this function and the function pointer. This patch does not change
> any functionality.
> 
> Cc: Yaniv Gardi <ygardi@codeaurora.org>
> Cc: Subhash Jadavani <subhashj@codeaurora.org>
> Cc: Stanley Chu <stanley.chu@mediatek.com>
> Cc: Avri Altman <avri.altman@wdc.com>
> Cc: Tomas Winkler <tomas.winkler@intel.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Since this was introduced only a couple of years ago, 
Maybe better to CC the author Kiwoong Kim <kwmad.kim@samsung.com>
Before removing this altogether.
Avri Altman Nov. 4, 2019, 12:57 p.m. UTC | #2
As no response from Kiwoong Kim:

> 
> 
> + Kiwoong Kim
> 
> >
> > Since the function ufshcd_vops_setup_xfer_req() is the only user of
> > the setup_xfer_req function pointer and since that function pointer is
> > always zero, remove both this function and the function pointer. This
> > patch does not change any functionality.
> >
> > Cc: Yaniv Gardi <ygardi@codeaurora.org>
> > Cc: Subhash Jadavani <subhashj@codeaurora.org>
> > Cc: Stanley Chu <stanley.chu@mediatek.com>
> > Cc: Avri Altman <avri.altman@wdc.com>
> > Cc: Tomas Winkler <tomas.winkler@intel.com>
> > Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> Since this was introduced only a couple of years ago, Maybe better to CC the
> author Kiwoong Kim <kwmad.kim@samsung.com> Before removing this
> altogether.
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Martin K. Petersen Nov. 5, 2019, 5:01 a.m. UTC | #3
Bart,

> Since the function ufshcd_vops_setup_xfer_req() is the only user of
> the setup_xfer_req function pointer and since that function pointer is
> always zero, remove both this function and the function pointer. This
> patch does not change any functionality.

Applied to 5.5/scsi-queue, thanks!
Alim Akhtar Nov. 5, 2019, 4:17 p.m. UTC | #4
Hi

On Mon, Nov 4, 2019 at 6:29 PM Avri Altman <Avri.Altman@wdc.com> wrote:
>
> As no response from Kiwoong Kim:
>
> >
> >
> > + Kiwoong Kim
Looks like he is not active here.
> >
> > >
> > > Since the function ufshcd_vops_setup_xfer_req() is the only user of
> > > the setup_xfer_req function pointer and since that function pointer is
> > > always zero, remove both this function and the function pointer. This
> > > patch does not change any functionality.
> > >
> > > Cc: Yaniv Gardi <ygardi@codeaurora.org>
> > > Cc: Subhash Jadavani <subhashj@codeaurora.org>
> > > Cc: Stanley Chu <stanley.chu@mediatek.com>
> > > Cc: Avri Altman <avri.altman@wdc.com>
> > > Cc: Tomas Winkler <tomas.winkler@intel.com>
> > > Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> > Since this was introduced only a couple of years ago, Maybe better to CC the
> > author Kiwoong Kim <kwmad.kim@samsung.com> Before removing this
> > altogether.
> Reviewed-by: Avri Altman <avri.altman@wdc.com>

Let me check and reconfirm this, give a day or two.
It will be good if am copied to the ufs patch (I hope
get_maintainer.pl still pointout my email)
thanks
Alim Akhtar Nov. 6, 2019, 4:09 a.m. UTC | #5
Hi Bart / Avri

On Tue, Nov 5, 2019 at 9:47 PM Alim Akhtar <alim.akhtar@gmail.com> wrote:
>
> Hi
>
> On Mon, Nov 4, 2019 at 6:29 PM Avri Altman <Avri.Altman@wdc.com> wrote:
> >
> > As no response from Kiwoong Kim:
> >
> > >
> > >
> > > + Kiwoong Kim
> Looks like he is not active here.
> > >
> > > >
> > > > Since the function ufshcd_vops_setup_xfer_req() is the only user of
> > > > the setup_xfer_req function pointer and since that function pointer is
> > > > always zero, remove both this function and the function pointer. This
> > > > patch does not change any functionality.
> > > >
> > > > Cc: Yaniv Gardi <ygardi@codeaurora.org>
> > > > Cc: Subhash Jadavani <subhashj@codeaurora.org>
> > > > Cc: Stanley Chu <stanley.chu@mediatek.com>
> > > > Cc: Avri Altman <avri.altman@wdc.com>
> > > > Cc: Tomas Winkler <tomas.winkler@intel.com>
> > > > Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> > > Since this was introduced only a couple of years ago, Maybe better to CC the
> > > author Kiwoong Kim <kwmad.kim@samsung.com> Before removing this
> > > altogether.
> > Reviewed-by: Avri Altman <avri.altman@wdc.com>
>
> Let me check and reconfirm this, give a day or two.
> It will be good if am copied to the ufs patch (I hope
> get_maintainer.pl still pointout my email)
> thanks
>
I checked the brief history of this adding  "setup_xfer_req" to
support Samsung UFSHCI (this was the ground work done)
We need this to support vendor specific NEXUS_TYPE settings.
The Samsung UFSHCI driver will be up for review in near future
For usecase of the function pointer please see an older version of the
patch https://patchwork.kernel.org/patch/7306321/

> --
> Regards,
> Alim
Bart Van Assche Nov. 6, 2019, 4:45 a.m. UTC | #6
On 2019-11-05 20:09, Alim Akhtar wrote:
> I checked the brief history of this adding  "setup_xfer_req" to
> support Samsung UFSHCI (this was the ground work done)
> We need this to support vendor specific NEXUS_TYPE settings.
> The Samsung UFSHCI driver will be up for review in near future
> For usecase of the function pointer please see an older version of the
> patch https://patchwork.kernel.org/patch/7306321/

Thanks Alim for having looked up this information. Let's drop this patch.

Bart.
Martin K. Petersen Nov. 6, 2019, 5:04 a.m. UTC | #7
Bart,

> Thanks Alim for having looked up this information. Let's drop this
> patch.

Dropped from 5.5/scsi-queue.
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 180033b4b515..9fc05a535624 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -2487,7 +2487,6 @@  static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
 
 	/* issue command to the controller */
 	spin_lock_irqsave(hba->host->host_lock, flags);
-	ufshcd_vops_setup_xfer_req(hba, tag, (lrbp->cmd ? true : false));
 	ufshcd_send_command(hba, tag);
 out_unlock:
 	spin_unlock_irqrestore(hba->host->host_lock, flags);
@@ -2704,7 +2703,6 @@  static int ufshcd_exec_dev_cmd(struct ufs_hba *hba,
 	/* Make sure descriptors are ready before ringing the doorbell */
 	wmb();
 	spin_lock_irqsave(hba->host->host_lock, flags);
-	ufshcd_vops_setup_xfer_req(hba, tag, (lrbp->cmd ? true : false));
 	ufshcd_send_command(hba, tag);
 	spin_unlock_irqrestore(hba->host->host_lock, flags);
 
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index e0fe247c719e..e3593cce23c1 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -288,8 +288,6 @@  struct ufs_pwr_mode_info {
  * @pwr_change_notify: called before and after a power mode change
  *			is carried out to allow vendor spesific capabilities
  *			to be set.
- * @setup_xfer_req: called before any transfer request is issued
- *                  to set some things
  * @setup_task_mgmt: called before any task management request is issued
  *                  to set some things
  * @hibern8_notify: called around hibern8 enter/exit
@@ -318,7 +316,6 @@  struct ufs_hba_variant_ops {
 					enum ufs_notify_change_status status,
 					struct ufs_pa_layer_attr *,
 					struct ufs_pa_layer_attr *);
-	void	(*setup_xfer_req)(struct ufs_hba *, int, bool);
 	void	(*setup_task_mgmt)(struct ufs_hba *, int, u8);
 	void    (*hibern8_notify)(struct ufs_hba *, enum uic_cmd_dme,
 					enum ufs_notify_change_status);
@@ -1031,13 +1028,6 @@  static inline int ufshcd_vops_pwr_change_notify(struct ufs_hba *hba,
 	return -ENOTSUPP;
 }
 
-static inline void ufshcd_vops_setup_xfer_req(struct ufs_hba *hba, int tag,
-					bool is_scsi_cmd)
-{
-	if (hba->vops && hba->vops->setup_xfer_req)
-		return hba->vops->setup_xfer_req(hba, tag, is_scsi_cmd);
-}
-
 static inline void ufshcd_vops_setup_task_mgmt(struct ufs_hba *hba,
 					int tag, u8 tm_function)
 {