public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Asutosh Das (asd)" <asutoshd@codeaurora.org>
To: Bart Van Assche <bvanassche@acm.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	Bean Huo <beanhuo@micron.com>, Can Guo <cang@codeaurora.org>,
	Stanley Chu <stanley.chu@mediatek.com>,
	Avri Altman <avri.altman@wdc.com>,
	Keoseong Park <keosung.park@samsung.com>
Subject: Re: [PATCH 03/11] scsi: ufs: Remove the sdev_rpmb member
Date: Wed, 10 Nov 2021 09:50:27 -0800	[thread overview]
Message-ID: <f0aec70e-f7d5-8d52-5996-bbcfab5aaa1b@codeaurora.org> (raw)
In-Reply-To: <20211110004440.3389311-4-bvanassche@acm.org>

On 11/9/2021 4:44 PM, Bart Van Assche wrote:
> Since the sdev_rpmb member of struct ufs_hba is only used inside
> ufshcd_scsi_add_wlus(), convert it into a local variable.
> 
> Suggested-by: Jaegeuk Kim <jaegeuk@kernel.org>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---

Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>

>   drivers/scsi/ufs/ufshcd.c | 12 ++++++------
>   drivers/scsi/ufs/ufshcd.h |  1 -
>   2 files changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index d18685d080d7..dff76b1a0d5d 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -7407,7 +7407,7 @@ static inline void ufshcd_blk_pm_runtime_init(struct scsi_device *sdev)
>   static int ufshcd_scsi_add_wlus(struct ufs_hba *hba)
>   {
>   	int ret = 0;
> -	struct scsi_device *sdev_boot;
> +	struct scsi_device *sdev_boot, *sdev_rpmb;
>   
>   	hba->sdev_ufs_device = __scsi_add_device(hba->host, 0, 0,
>   		ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_UFS_DEVICE_WLUN), NULL);
> @@ -7418,14 +7418,14 @@ static int ufshcd_scsi_add_wlus(struct ufs_hba *hba)
>   	}
>   	scsi_device_put(hba->sdev_ufs_device);
>   
> -	hba->sdev_rpmb = __scsi_add_device(hba->host, 0, 0,
> +	sdev_rpmb = __scsi_add_device(hba->host, 0, 0,
>   		ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_RPMB_WLUN), NULL);
> -	if (IS_ERR(hba->sdev_rpmb)) {
> -		ret = PTR_ERR(hba->sdev_rpmb);
> +	if (IS_ERR(sdev_rpmb)) {
> +		ret = PTR_ERR(sdev_rpmb);
>   		goto remove_sdev_ufs_device;
>   	}
> -	ufshcd_blk_pm_runtime_init(hba->sdev_rpmb);
> -	scsi_device_put(hba->sdev_rpmb);
> +	ufshcd_blk_pm_runtime_init(sdev_rpmb);
> +	scsi_device_put(sdev_rpmb);
>   
>   	sdev_boot = __scsi_add_device(hba->host, 0, 0,
>   		ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_BOOT_WLUN), NULL);
> diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
> index a911ad72de7a..65178487adf3 100644
> --- a/drivers/scsi/ufs/ufshcd.h
> +++ b/drivers/scsi/ufs/ufshcd.h
> @@ -809,7 +809,6 @@ struct ufs_hba {
>   	 * "UFS device" W-LU.
>   	 */
>   	struct scsi_device *sdev_ufs_device;
> -	struct scsi_device *sdev_rpmb;
>   
>   #ifdef CONFIG_SCSI_UFS_HWMON
>   	struct device *hwmon_device;
> 


-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
Linux Foundation Collaborative Project

  reply	other threads:[~2021-11-10 17:50 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10  0:44 [PATCH 00/11] UFS patches for kernel v5.17 Bart Van Assche
2021-11-10  0:44 ` [PATCH 01/11] scsi: ufs: Rename a function argument Bart Van Assche
2021-11-10  1:28   ` Chanho Park
2021-11-10  9:48   ` Keoseong Park
2021-11-11 16:59   ` Alim Akhtar
2021-11-10  0:44 ` [PATCH 02/11] scsi: ufs: Remove is_rpmb_wlun() Bart Van Assche
2021-11-10 17:47   ` Asutosh Das (asd)
2021-11-11 16:52   ` Alim Akhtar
2021-11-10  0:44 ` [PATCH 03/11] scsi: ufs: Remove the sdev_rpmb member Bart Van Assche
2021-11-10 17:50   ` Asutosh Das (asd) [this message]
2021-11-11 16:47   ` Alim Akhtar
2021-11-10  0:44 ` [PATCH 04/11] scsi: ufs: Remove dead code Bart Van Assche
2021-11-11  7:06   ` Avri Altman
2021-11-15 15:58   ` Bean Huo
2021-11-15 16:01   ` Bean Huo
2021-11-10  0:44 ` [PATCH 05/11] scsi: core: Add support for reserved tags Bart Van Assche
2021-11-10  0:44 ` [PATCH 06/11] scsi: ufs: Rework ufshcd_change_queue_depth() Bart Van Assche
2021-11-11  7:22   ` Avri Altman
2021-11-15 18:27     ` Bart Van Assche
2021-11-10  0:44 ` [PATCH 07/11] scsi: ufs: Fix a deadlock in the error handler Bart Van Assche
2021-11-10  6:42   ` Christoph Hellwig
2021-11-15 18:28     ` Bart Van Assche
2021-11-11  7:33   ` Avri Altman
2021-11-15 18:29     ` Bart Van Assche
2021-11-10  0:44 ` [PATCH 08/11] scsi: ufs: Improve SCSI abort handling further Bart Van Assche
2021-11-10  8:57   ` Adrian Hunter
2021-11-10 18:56     ` Bart Van Assche
2021-11-12 10:56       ` Adrian Hunter
2021-11-15 23:09         ` Bart Van Assche
2021-11-16  9:03           ` Adrian Hunter
2021-11-16 16:07             ` Bart Van Assche
2021-11-11  9:17   ` Peter Wang
2021-11-16  9:07     ` Peter Wang
2021-11-16 16:08       ` Bart Van Assche
2021-11-16 20:16         ` Adrian Hunter
2021-11-16 21:53           ` Bart Van Assche
2021-11-17  7:37             ` Adrian Hunter
2021-11-10  0:44 ` [PATCH 09/11] scsi: ufs: Fix a kernel crash during shutdown Bart Van Assche
2021-11-11  7:48   ` Avri Altman
2021-11-15 18:45     ` Bart Van Assche
2021-11-10  0:44 ` [PATCH 10/11] scsi: ufs: Optimize the command queueing code Bart Van Assche
2021-11-10  8:04   ` Adrian Hunter
2021-11-10 18:57     ` Bart Van Assche
2021-11-11  7:51     ` Avri Altman
2021-11-12 23:40   ` Asutosh Das (asd)
2021-11-10  0:44 ` [PATCH 11/11] scsi: ufs: Implement polling support Bart Van Assche
2021-11-10  1:36   ` Douglas Gilbert
2021-11-19 19:39     ` Bart Van Assche
2021-11-11  8:11   ` Avri Altman
2021-11-19 19:01     ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f0aec70e-f7d5-8d52-5996-bbcfab5aaa1b@codeaurora.org \
    --to=asutoshd@codeaurora.org \
    --cc=adrian.hunter@intel.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=cang@codeaurora.org \
    --cc=jaegeuk@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=keosung.park@samsung.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stanley.chu@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox