]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
scsi: ufs: ufs-exynos: Move definitions from .h to .c
authorBart Van Assche <bvanassche@acm.org>
Sun, 9 May 2021 21:38:17 +0000 (14:38 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 21 May 2021 20:07:23 +0000 (16:07 -0400)
In the Linux kernel definitions of data structures should occur in .c
files. Hence move the exynos7_uic_attr definition from a .h into a .c
file. Additionally, declare exynos_ufs_drvs static. This patch fixes the
following two sparse warnings:

drivers/scsi/ufs/ufs-exynos.h:248:28: warning: symbol 'exynos_ufs_drvs' was not declared. Should it be static?
drivers/scsi/ufs/ufs-exynos.h:250:28: warning: symbol 'exynos7_uic_attr' was not declared. Should it be static?

Link: https://lore.kernel.org/r/20210509213817.4348-1-bvanassche@acm.org
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Kiwoong Kim <kwmad.kim@samsung.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufs-exynos.c
drivers/scsi/ufs/ufs-exynos.h

index 8b31efb9d035b052a3b81804d8a31f544947e0f4..3edf7de42ae8ba63a03e6055937b8f54c281f54f 100644 (file)
@@ -107,6 +107,7 @@ enum {
 
 #define CNTR_DIV_VAL 40
 
+static struct exynos_ufs_drv_data exynos_ufs_drvs;
 static void exynos_ufs_auto_ctrl_hcc(struct exynos_ufs *ufs, bool en);
 static void exynos_ufs_ctrl_clkstop(struct exynos_ufs *ufs, bool en);
 
@@ -1231,8 +1232,32 @@ static int exynos_ufs_remove(struct platform_device *pdev)
        return 0;
 }
 
-struct exynos_ufs_drv_data exynos_ufs_drvs = {
+static struct exynos_ufs_uic_attr exynos7_uic_attr = {
+       .tx_trailingclks                = 0x10,
+       .tx_dif_p_nsec                  = 3000000,      /* unit: ns */
+       .tx_dif_n_nsec                  = 1000000,      /* unit: ns */
+       .tx_high_z_cnt_nsec             = 20000,        /* unit: ns */
+       .tx_base_unit_nsec              = 100000,       /* unit: ns */
+       .tx_gran_unit_nsec              = 4000,         /* unit: ns */
+       .tx_sleep_cnt                   = 1000,         /* unit: ns */
+       .tx_min_activatetime            = 0xa,
+       .rx_filler_enable               = 0x2,
+       .rx_dif_p_nsec                  = 1000000,      /* unit: ns */
+       .rx_hibern8_wait_nsec           = 4000000,      /* unit: ns */
+       .rx_base_unit_nsec              = 100000,       /* unit: ns */
+       .rx_gran_unit_nsec              = 4000,         /* unit: ns */
+       .rx_sleep_cnt                   = 1280,         /* unit: ns */
+       .rx_stall_cnt                   = 320,          /* unit: ns */
+       .rx_hs_g1_sync_len_cap          = SYNC_LEN_COARSE(0xf),
+       .rx_hs_g2_sync_len_cap          = SYNC_LEN_COARSE(0xf),
+       .rx_hs_g3_sync_len_cap          = SYNC_LEN_COARSE(0xf),
+       .rx_hs_g1_prep_sync_len_cap     = PREP_LEN(0xf),
+       .rx_hs_g2_prep_sync_len_cap     = PREP_LEN(0xf),
+       .rx_hs_g3_prep_sync_len_cap     = PREP_LEN(0xf),
+       .pa_dbg_option_suite            = 0x30103,
+};
 
+static struct exynos_ufs_drv_data exynos_ufs_drvs = {
        .compatible             = "samsung,exynos7-ufs",
        .uic_attr               = &exynos7_uic_attr,
        .quirks                 = UFSHCD_QUIRK_PRDT_BYTE_GRAN |
index 06ee565f7eb02482f94f9d094ee6a04aaf860bf4..67505fe32ebf94715fad89a9e47da57d7d1114a8 100644 (file)
@@ -245,30 +245,4 @@ static inline void exynos_ufs_disable_dbg_mode(struct ufs_hba *hba)
        ufshcd_dme_set(hba, UIC_ARG_MIB(PA_DBG_MODE), FALSE);
 }
 
-struct exynos_ufs_drv_data exynos_ufs_drvs;
-
-struct exynos_ufs_uic_attr exynos7_uic_attr = {
-       .tx_trailingclks                = 0x10,
-       .tx_dif_p_nsec                  = 3000000,      /* unit: ns */
-       .tx_dif_n_nsec                  = 1000000,      /* unit: ns */
-       .tx_high_z_cnt_nsec             = 20000,        /* unit: ns */
-       .tx_base_unit_nsec              = 100000,       /* unit: ns */
-       .tx_gran_unit_nsec              = 4000,         /* unit: ns */
-       .tx_sleep_cnt                   = 1000,         /* unit: ns */
-       .tx_min_activatetime            = 0xa,
-       .rx_filler_enable               = 0x2,
-       .rx_dif_p_nsec                  = 1000000,      /* unit: ns */
-       .rx_hibern8_wait_nsec           = 4000000,      /* unit: ns */
-       .rx_base_unit_nsec              = 100000,       /* unit: ns */
-       .rx_gran_unit_nsec              = 4000,         /* unit: ns */
-       .rx_sleep_cnt                   = 1280,         /* unit: ns */
-       .rx_stall_cnt                   = 320,          /* unit: ns */
-       .rx_hs_g1_sync_len_cap          = SYNC_LEN_COARSE(0xf),
-       .rx_hs_g2_sync_len_cap          = SYNC_LEN_COARSE(0xf),
-       .rx_hs_g3_sync_len_cap          = SYNC_LEN_COARSE(0xf),
-       .rx_hs_g1_prep_sync_len_cap     = PREP_LEN(0xf),
-       .rx_hs_g2_prep_sync_len_cap     = PREP_LEN(0xf),
-       .rx_hs_g3_prep_sync_len_cap     = PREP_LEN(0xf),
-       .pa_dbg_option_suite            = 0x30103,
-};
 #endif /* _UFS_EXYNOS_H_ */