* [esmil:eic7700 16/20] drivers/mmc/host/sdhci-of-eswin.c:370:6: warning: no previous prototype for function 'eswin_sdhci_set_uhs_signaling'
@ 2024-09-01 9:32 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-09-01 9:32 UTC (permalink / raw)
To: liangshuang
Cc: llvm, oe-kbuild-all, Emil Renner Berthing, Darshan Prajapati,
Pinkesh Vaghela
tree: https://github.com/esmil/linux eic7700
head: eb44174b12f99d320be704b45db6b994f6a014bd
commit: 807d8cb96b00273346bd500bedd125d06921c3f3 [16/20] drivers: mmc: Add ESWIN mmc drivers
config: riscv-allmodconfig (https://download.01.org/0day-ci/archive/20240901/202409011705.o88HoAi9-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 08e5a1de8227512d4774a534b91cb2353cef6284)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240901/202409011705.o88HoAi9-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409011705.o88HoAi9-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/mmc/host/sdhci-of-eswin.c:27:
In file included from include/linux/phy/phy.h:17:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:25:
In file included from include/linux/kernel_stat.h:8:
In file included from include/linux/interrupt.h:22:
In file included from arch/riscv/include/asm/sections.h:9:
In file included from include/linux/mm.h:2228:
include/linux/vmstat.h:503:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
503 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
504 | item];
| ~~~~
include/linux/vmstat.h:510:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
510 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
511 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:517:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
517 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:523:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
523 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
524 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/mmc/host/sdhci-of-eswin.c:370:6: warning: no previous prototype for function 'eswin_sdhci_set_uhs_signaling' [-Wmissing-prototypes]
370 | void eswin_sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing)
| ^
drivers/mmc/host/sdhci-of-eswin.c:370:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
370 | void eswin_sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing)
| ^
| static
>> drivers/mmc/host/sdhci-of-eswin.c:897:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
897 | if (!eswin_sdhci->core_clk_reg) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mmc/host/sdhci-of-eswin.c:1020:9: note: uninitialized use occurs here
1020 | return ret;
| ^~~
drivers/mmc/host/sdhci-of-eswin.c:897:2: note: remove the 'if' if its condition is always false
897 | if (!eswin_sdhci->core_clk_reg) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
898 | dev_err(dev, "ioremap core clk reg failed.\n");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
899 | goto err_pltfm_free;
| ~~~~~~~~~~~~~~~~~~~~
900 | }
| ~
drivers/mmc/host/sdhci-of-eswin.c:876:9: note: initialize the variable 'ret' to silence this warning
876 | int ret;
| ^
| = 0
6 warnings generated.
--
>> drivers/mmc/host/sdhci-eswin.c:194: warning: expecting prototype for eswin_dt_parse_clk_phases(). Prototype was for eswin_sdhci_dt_parse_clk_phases() instead
--
>> drivers/mmc/host/sdhci-of-eswin-sdio.c:565: warning: Function parameter or struct member 'eswin_sdhci_sdio' not described in 'eswin_sdhci_sdio_register_sdcardclk'
>> drivers/mmc/host/sdhci-of-eswin-sdio.c:565: warning: Excess function parameter 'sdhci_arasan' description in 'eswin_sdhci_sdio_register_sdcardclk'
>> drivers/mmc/host/sdhci-of-eswin-sdio.c:616: warning: Function parameter or struct member 'eswin_sdhci_sdio' not described in 'eswin_sdhci_sdio_register_sampleclk'
>> drivers/mmc/host/sdhci-of-eswin-sdio.c:616: warning: Excess function parameter 'sdhci_arasan' description in 'eswin_sdhci_sdio_register_sampleclk'
vim +/eswin_sdhci_set_uhs_signaling +370 drivers/mmc/host/sdhci-of-eswin.c
369
> 370 void eswin_sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing)
371 {
372 u32 val;
373 u32 status;
374 u32 timeout = 0;
375 u16 ctrl_2;
376
377 ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2);
378 /* Select Bus Speed Mode for host */
379 ctrl_2 &= ~SDHCI_CTRL_UHS_MASK;
380 if ((timing == MMC_TIMING_MMC_HS200) ||
381 (timing == MMC_TIMING_UHS_SDR104))
382 ctrl_2 |= SDHCI_CTRL_UHS_SDR104;
383 else if (timing == MMC_TIMING_UHS_SDR12)
384 ctrl_2 |= SDHCI_CTRL_UHS_SDR12;
385 else if (timing == MMC_TIMING_UHS_SDR25)
386 ctrl_2 |= SDHCI_CTRL_UHS_SDR25;
387 else if (timing == MMC_TIMING_UHS_SDR50)
388 ctrl_2 |= SDHCI_CTRL_UHS_SDR50;
389 else if ((timing == MMC_TIMING_UHS_DDR50) ||
390 (timing == MMC_TIMING_MMC_DDR52))
391 ctrl_2 |= SDHCI_CTRL_UHS_DDR50;
392 else if (timing == MMC_TIMING_MMC_HS400)
393 ctrl_2 |= ESWIN_SDHCI_CTRL_HS400; /* Non-standard */
394 sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2);
395
396
397 /*
398 * here need make dll locked when in hs400 at 200MHz
399 */
400 if ((timing == MMC_TIMING_MMC_HS400) && (host->clock == 200000000)) {
401 eswin_sdhci_disable_card_clk(host);
402
403 val = sdhci_readl(host, VENDOR_AT_CTRL_R);
404 val &= ~(LATENCY_LT_MASK << LATENCY_LT_BIT_OFFSET);
405 val |= (LATENCY_LT_3 << LATENCY_LT_MASK);
406 sdhci_writel(host, val, VENDOR_AT_CTRL_R);
407
408 sdhci_writeb(host, 0x23, PHY_DLL_CNFG1_R);
409 sdhci_writeb(host, 0x02, PHY_DLL_CNFG2_R);
410 sdhci_writeb(host, 0x60, PHY_DLLDL_CNFG_R);
411 sdhci_writeb(host, 0x00, PHY_DLL_OFFST_R);
412 sdhci_writew(host, 0xffff, PHY_DLLBT_CNFG_R);
413
414 eswin_sdhci_enable_card_clk(host);
415 sdhci_writeb(host, DLL_ENABEL, PHY_DLL_CTRL_R);
416 udelay(100);
417
418 while (1) {
419 status = sdhci_readb(host, PHY_DLL_STATUS_R);
420 if (status & DLL_LOCK_STS) {
421 pr_debug("%s: locked status:0x%x\n", mmc_hostname(host->mmc), status);
422 break;
423 }
424 timeout++;
425 udelay(100);
426 if (timeout > 10000) {
427 pr_err("%s: DLL lock failed!status:0x%x\n",
428 mmc_hostname(host->mmc), status);
429 return;
430 }
431 }
432
433 status = sdhci_readb(host, PHY_DLL_STATUS_R);
434 if (status & DLL_ERROR_STS) {
435 pr_err("%s: DLL lock failed!err_status:0x%x\n",
436 mmc_hostname(host->mmc), status);
437 } else {
438 pr_debug("%s: DLL lock is success\n", mmc_hostname(host->mmc));
439 }
440 }
441 }
442
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-01 9:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-01 9:32 [esmil:eic7700 16/20] drivers/mmc/host/sdhci-of-eswin.c:370:6: warning: no previous prototype for function 'eswin_sdhci_set_uhs_signaling' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox