mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Bean Huo <beanhuo@iokpp.de>,
	avri.altman@wdc.com, alim.akhtar@samsung.com, jejb@linux.ibm.com,
	martin.petersen@oracle.com, mani@kernel.org,
	quic_cang@quicinc.com, quic_asutoshd@quicinc.com,
	beanhuo@micron.com, thomas@t-8ch.de
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	mikebi@micron.com, lporzio@micron.com
Subject: Re: [PATCH v2 1/3] scsi: ufs: core: Add ufshcd_is_ufs_dev_busy()
Date: Wed, 22 Nov 2023 09:43:19 -0800	[thread overview]
Message-ID: <b10de3fb-b6b9-4d8f-a940-93723adbd321@acm.org> (raw)
In-Reply-To: <20231122172512.103748-2-beanhuo@iokpp.de>

On 11/22/23 09:25, Bean Huo wrote:
> --- a/include/ufs/ufshcd.h
> +++ b/include/ufs/ufshcd.h
> @@ -126,7 +126,6 @@ enum uic_link_state {
>   	((h)->curr_dev_pwr_mode == UFS_POWERDOWN_PWR_MODE)
>   #define ufshcd_is_ufs_dev_deepsleep(h) \
>   	((h)->curr_dev_pwr_mode == UFS_DEEPSLEEP_PWR_MODE)
> -
>   /*
>    * UFS Power management levels.
>    * Each level is in increasing order of power savings, except DeepSleep
> @@ -1408,6 +1407,13 @@ static inline int ufshcd_vops_phy_initialization(struct ufs_hba *hba)
>   	return 0;
>   }
>   
> +static inline bool ufshcd_is_ufs_dev_busy(struct ufs_hba *hba)
> +{
> +	return (hba->clk_gating.active_reqs || hba->ufshcd_state != UFSHCD_STATE_OPERATIONAL ||
> +		hba->outstanding_reqs || hba->outstanding_tasks || hba->active_uic_cmd ||
> +		hba->uic_async_done);
> +}

Since the above function is only used in drivers/ufs/core/ufshcd.c,
please move it back to that source file. The public header file
include/ufs/ufshcd.h is for definitions and declarations used by both
the UFS driver core and the UFS driver host files.

Thanks,

Bart.

  reply	other threads:[~2023-11-22 17:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-22 17:25 [PATCH v2 0/3] Add UFS RTC support Bean Huo
2023-11-22 17:25 ` [PATCH v2 1/3] scsi: ufs: core: Add ufshcd_is_ufs_dev_busy() Bean Huo
2023-11-22 17:43   ` Bart Van Assche [this message]
2023-11-22 17:25 ` [PATCH v2 2/3] scsi: ufs: core: Add UFS RTC support Bean Huo
2023-11-22 17:51   ` Bart Van Assche
2023-11-22 17:25 ` [PATCH v2 3/3] scsi: ufs: core: Add sysfs node for UFS RTC update Bean Huo

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=b10de3fb-b6b9-4d8f-a940-93723adbd321@acm.org \
    --to=bvanassche@acm.org \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@iokpp.de \
    --cc=beanhuo@micron.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=lporzio@micron.com \
    --cc=mani@kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mikebi@micron.com \
    --cc=quic_asutoshd@quicinc.com \
    --cc=quic_cang@quicinc.com \
    --cc=thomas@t-8ch.de \
    /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

all inboxes | Powered by JetHome®