* [ammarfaizi2-block:stable/linux-stable-rc/queue/5.4 129/135] drivers/mmc/host/jz4740_mmc.c:1016:30: error: 'JZ_MMC_JZ4760' undeclared; did you mean 'JZ_MMC_JZ4780'?
@ 2023-02-18 11:36 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-02-18 11:36 UTC (permalink / raw)
To: Paul Cercueil
Cc: oe-kbuild-all, Ammar Faizi, GNU/Weeb Mailing List, Sasha Levin,
Ulf Hansson, Greg Kroah-Hartman
tree: https://github.com/ammarfaizi2/linux-block stable/linux-stable-rc/queue/5.4
head: 0109f5323863edf0d51d088bae4f05705ba0a268
commit: 186bbbee8013e458c0c7261c2a78a1b63e46b29f [129/135] mmc: jz4740: Work around bug on JZ4760(B)
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20230218/[email protected]/config)
compiler: mips-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/ammarfaizi2/linux-block/commit/186bbbee8013e458c0c7261c2a78a1b63e46b29f
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block stable/linux-stable-rc/queue/5.4
git checkout 186bbbee8013e458c0c7261c2a78a1b63e46b29f
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/mmc/host/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
drivers/mmc/host/jz4740_mmc.c: In function 'jz4740_mmc_probe':
>> drivers/mmc/host/jz4740_mmc.c:1016:30: error: 'JZ_MMC_JZ4760' undeclared (first use in this function); did you mean 'JZ_MMC_JZ4780'?
1016 | if (host->version == JZ_MMC_JZ4760 && mmc->f_max > JZ_MMC_CLK_RATE)
| ^~~~~~~~~~~~~
| JZ_MMC_JZ4780
drivers/mmc/host/jz4740_mmc.c:1016:30: note: each undeclared identifier is reported only once for each function it appears in
vim +1016 drivers/mmc/host/jz4740_mmc.c
951
952 static int jz4740_mmc_probe(struct platform_device* pdev)
953 {
954 int ret;
955 struct mmc_host *mmc;
956 struct jz4740_mmc_host *host;
957 const struct of_device_id *match;
958
959 mmc = mmc_alloc_host(sizeof(struct jz4740_mmc_host), &pdev->dev);
960 if (!mmc) {
961 dev_err(&pdev->dev, "Failed to alloc mmc host structure\n");
962 return -ENOMEM;
963 }
964
965 host = mmc_priv(mmc);
966
967 match = of_match_device(jz4740_mmc_of_match, &pdev->dev);
968 if (match) {
969 host->version = (enum jz4740_mmc_version)match->data;
970 } else {
971 /* JZ4740 should be the only one using legacy probe */
972 host->version = JZ_MMC_JZ4740;
973 }
974
975 ret = mmc_of_parse(mmc);
976 if (ret) {
977 if (ret != -EPROBE_DEFER)
978 dev_err(&pdev->dev,
979 "could not parse device properties: %d\n", ret);
980 goto err_free_host;
981 }
982
983 mmc_regulator_get_supply(mmc);
984
985 host->irq = platform_get_irq(pdev, 0);
986 if (host->irq < 0) {
987 ret = host->irq;
988 goto err_free_host;
989 }
990
991 host->clk = devm_clk_get(&pdev->dev, "mmc");
992 if (IS_ERR(host->clk)) {
993 ret = PTR_ERR(host->clk);
994 dev_err(&pdev->dev, "Failed to get mmc clock\n");
995 goto err_free_host;
996 }
997
998 host->mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
999 host->base = devm_ioremap_resource(&pdev->dev, host->mem_res);
1000 if (IS_ERR(host->base)) {
1001 ret = PTR_ERR(host->base);
1002 dev_err(&pdev->dev, "Failed to ioremap base memory\n");
1003 goto err_free_host;
1004 }
1005
1006 mmc->ops = &jz4740_mmc_ops;
1007 if (!mmc->f_max)
1008 mmc->f_max = JZ_MMC_CLK_RATE;
1009
1010 /*
1011 * There seems to be a problem with this driver on the JZ4760 and
1012 * JZ4760B SoCs. There, when using the maximum rate supported (50 MHz),
1013 * the communication fails with many SD cards.
1014 * Until this bug is sorted out, limit the maximum rate to 24 MHz.
1015 */
> 1016 if (host->version == JZ_MMC_JZ4760 && mmc->f_max > JZ_MMC_CLK_RATE)
1017 mmc->f_max = JZ_MMC_CLK_RATE;
1018
1019 mmc->f_min = mmc->f_max / 128;
1020 mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
1021
1022 mmc->max_blk_size = (1 << 10) - 1;
1023 mmc->max_blk_count = (1 << 15) - 1;
1024 mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
1025
1026 mmc->max_segs = 128;
1027 mmc->max_seg_size = mmc->max_req_size;
1028
1029 host->mmc = mmc;
1030 host->pdev = pdev;
1031 spin_lock_init(&host->lock);
1032 host->irq_mask = ~0;
1033
1034 jz4740_mmc_reset(host);
1035
1036 ret = request_threaded_irq(host->irq, jz_mmc_irq, jz_mmc_irq_worker, 0,
1037 dev_name(&pdev->dev), host);
1038 if (ret) {
1039 dev_err(&pdev->dev, "Failed to request irq: %d\n", ret);
1040 goto err_free_host;
1041 }
1042
1043 jz4740_mmc_clock_disable(host);
1044 timer_setup(&host->timeout_timer, jz4740_mmc_timeout, 0);
1045
1046 ret = jz4740_mmc_acquire_dma_channels(host);
1047 if (ret == -EPROBE_DEFER)
1048 goto err_free_irq;
1049 host->use_dma = !ret;
1050
1051 platform_set_drvdata(pdev, host);
1052 ret = mmc_add_host(mmc);
1053
1054 if (ret) {
1055 dev_err(&pdev->dev, "Failed to add mmc host: %d\n", ret);
1056 goto err_release_dma;
1057 }
1058 dev_info(&pdev->dev, "JZ SD/MMC card driver registered\n");
1059
1060 dev_info(&pdev->dev, "Using %s, %d-bit mode\n",
1061 host->use_dma ? "DMA" : "PIO",
1062 (mmc->caps & MMC_CAP_4_BIT_DATA) ? 4 : 1);
1063
1064 return 0;
1065
1066 err_release_dma:
1067 if (host->use_dma)
1068 jz4740_mmc_release_dma_channels(host);
1069 err_free_irq:
1070 free_irq(host->irq, host);
1071 err_free_host:
1072 mmc_free_host(mmc);
1073
1074 return ret;
1075 }
1076
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-18 11:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-18 11:36 [ammarfaizi2-block:stable/linux-stable-rc/queue/5.4 129/135] drivers/mmc/host/jz4740_mmc.c:1016:30: error: 'JZ_MMC_JZ4760' undeclared; did you mean 'JZ_MMC_JZ4780'? 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