Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: ufs: ufs-exynos: Move definitions from .h to .c

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>

authored by

Bart Van Assche and committed by
Martin K. Petersen
b592d662 05f7f1b9

+26 -27
+26 -1
drivers/scsi/ufs/ufs-exynos.c
··· 107 107 108 108 #define CNTR_DIV_VAL 40 109 109 110 + static struct exynos_ufs_drv_data exynos_ufs_drvs; 110 111 static void exynos_ufs_auto_ctrl_hcc(struct exynos_ufs *ufs, bool en); 111 112 static void exynos_ufs_ctrl_clkstop(struct exynos_ufs *ufs, bool en); 112 113 ··· 1232 1231 return 0; 1233 1232 } 1234 1233 1235 - struct exynos_ufs_drv_data exynos_ufs_drvs = { 1234 + static struct exynos_ufs_uic_attr exynos7_uic_attr = { 1235 + .tx_trailingclks = 0x10, 1236 + .tx_dif_p_nsec = 3000000, /* unit: ns */ 1237 + .tx_dif_n_nsec = 1000000, /* unit: ns */ 1238 + .tx_high_z_cnt_nsec = 20000, /* unit: ns */ 1239 + .tx_base_unit_nsec = 100000, /* unit: ns */ 1240 + .tx_gran_unit_nsec = 4000, /* unit: ns */ 1241 + .tx_sleep_cnt = 1000, /* unit: ns */ 1242 + .tx_min_activatetime = 0xa, 1243 + .rx_filler_enable = 0x2, 1244 + .rx_dif_p_nsec = 1000000, /* unit: ns */ 1245 + .rx_hibern8_wait_nsec = 4000000, /* unit: ns */ 1246 + .rx_base_unit_nsec = 100000, /* unit: ns */ 1247 + .rx_gran_unit_nsec = 4000, /* unit: ns */ 1248 + .rx_sleep_cnt = 1280, /* unit: ns */ 1249 + .rx_stall_cnt = 320, /* unit: ns */ 1250 + .rx_hs_g1_sync_len_cap = SYNC_LEN_COARSE(0xf), 1251 + .rx_hs_g2_sync_len_cap = SYNC_LEN_COARSE(0xf), 1252 + .rx_hs_g3_sync_len_cap = SYNC_LEN_COARSE(0xf), 1253 + .rx_hs_g1_prep_sync_len_cap = PREP_LEN(0xf), 1254 + .rx_hs_g2_prep_sync_len_cap = PREP_LEN(0xf), 1255 + .rx_hs_g3_prep_sync_len_cap = PREP_LEN(0xf), 1256 + .pa_dbg_option_suite = 0x30103, 1257 + }; 1236 1258 1259 + static struct exynos_ufs_drv_data exynos_ufs_drvs = { 1237 1260 .compatible = "samsung,exynos7-ufs", 1238 1261 .uic_attr = &exynos7_uic_attr, 1239 1262 .quirks = UFSHCD_QUIRK_PRDT_BYTE_GRAN |
-26
drivers/scsi/ufs/ufs-exynos.h
··· 245 245 ufshcd_dme_set(hba, UIC_ARG_MIB(PA_DBG_MODE), FALSE); 246 246 } 247 247 248 - struct exynos_ufs_drv_data exynos_ufs_drvs; 249 - 250 - struct exynos_ufs_uic_attr exynos7_uic_attr = { 251 - .tx_trailingclks = 0x10, 252 - .tx_dif_p_nsec = 3000000, /* unit: ns */ 253 - .tx_dif_n_nsec = 1000000, /* unit: ns */ 254 - .tx_high_z_cnt_nsec = 20000, /* unit: ns */ 255 - .tx_base_unit_nsec = 100000, /* unit: ns */ 256 - .tx_gran_unit_nsec = 4000, /* unit: ns */ 257 - .tx_sleep_cnt = 1000, /* unit: ns */ 258 - .tx_min_activatetime = 0xa, 259 - .rx_filler_enable = 0x2, 260 - .rx_dif_p_nsec = 1000000, /* unit: ns */ 261 - .rx_hibern8_wait_nsec = 4000000, /* unit: ns */ 262 - .rx_base_unit_nsec = 100000, /* unit: ns */ 263 - .rx_gran_unit_nsec = 4000, /* unit: ns */ 264 - .rx_sleep_cnt = 1280, /* unit: ns */ 265 - .rx_stall_cnt = 320, /* unit: ns */ 266 - .rx_hs_g1_sync_len_cap = SYNC_LEN_COARSE(0xf), 267 - .rx_hs_g2_sync_len_cap = SYNC_LEN_COARSE(0xf), 268 - .rx_hs_g3_sync_len_cap = SYNC_LEN_COARSE(0xf), 269 - .rx_hs_g1_prep_sync_len_cap = PREP_LEN(0xf), 270 - .rx_hs_g2_prep_sync_len_cap = PREP_LEN(0xf), 271 - .rx_hs_g3_prep_sync_len_cap = PREP_LEN(0xf), 272 - .pa_dbg_option_suite = 0x30103, 273 - }; 274 248 #endif /* _UFS_EXYNOS_H_ */