diff mbox series

[27/29] scsi: ufs: Move the struct ufs_ref_clk definition

Message ID 20220331223424.1054715-28-bvanassche@acm.org
State Superseded
Headers show
Series UFS patches for kernel v5.19 | expand

Commit Message

Bart Van Assche March 31, 2022, 10:34 p.m. UTC
Move the definition of this data structure since it is only used in a
single source file.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/ufs/ufs.h    | 5 -----
 drivers/scsi/ufs/ufshcd.c | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

Avri Altman April 5, 2022, 6:50 a.m. UTC | #1
> Move the definition of this data structure since it is only used in a single
> source file.
> 
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Avri Altman <avri.altman@wdc.com>

> ---
>  drivers/scsi/ufs/ufs.h    | 5 -----
>  drivers/scsi/ufs/ufshcd.c | 5 +++++
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h index
> 225b5b4a2a7e..f52173b8ad96 100644
> --- a/drivers/scsi/ufs/ufs.h
> +++ b/drivers/scsi/ufs/ufs.h
> @@ -415,11 +415,6 @@ enum ufs_ref_clk_freq {
>         REF_CLK_FREQ_INVAL      = -1,
>  };
> 
> -struct ufs_ref_clk {
> -       unsigned long freq_hz;
> -       enum ufs_ref_clk_freq val;
> -};
> -
>  /* Query response result code */
>  enum {
>         QUERY_RESULT_SUCCESS                    = 0x00,
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index
> bab0f1ee41e6..27738f24c4a8 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -7959,6 +7959,11 @@ static int ufshcd_device_geo_params_init(struct
> ufs_hba *hba)
>         return err;
>  }
> 
> +struct ufs_ref_clk {
> +       unsigned long freq_hz;
> +       enum ufs_ref_clk_freq val;
> +};
> +
>  static struct ufs_ref_clk ufs_ref_clk_freqs[] = {
>         {19200000, REF_CLK_FREQ_19_2_MHZ},
>         {26000000, REF_CLK_FREQ_26_MHZ},
While at it, maybe also declare this struct as const?

Thanks,
Avri
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
index 225b5b4a2a7e..f52173b8ad96 100644
--- a/drivers/scsi/ufs/ufs.h
+++ b/drivers/scsi/ufs/ufs.h
@@ -415,11 +415,6 @@  enum ufs_ref_clk_freq {
 	REF_CLK_FREQ_INVAL	= -1,
 };
 
-struct ufs_ref_clk {
-	unsigned long freq_hz;
-	enum ufs_ref_clk_freq val;
-};
-
 /* Query response result code */
 enum {
 	QUERY_RESULT_SUCCESS                    = 0x00,
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index bab0f1ee41e6..27738f24c4a8 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -7959,6 +7959,11 @@  static int ufshcd_device_geo_params_init(struct ufs_hba *hba)
 	return err;
 }
 
+struct ufs_ref_clk {
+	unsigned long freq_hz;
+	enum ufs_ref_clk_freq val;
+};
+
 static struct ufs_ref_clk ufs_ref_clk_freqs[] = {
 	{19200000, REF_CLK_FREQ_19_2_MHZ},
 	{26000000, REF_CLK_FREQ_26_MHZ},