All of lore.kernel.org
 help / color / mirror / Atom feed
* [wens:sunxi-wip 21/29] drivers/mmc/host/sunxi-mmc.c:1517:25: error: implicit declaration of function 'FIELD_GET'
@ 2026-05-16  1:25 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-16  1:25 UTC (permalink / raw)
  To: Chen-Yu Tsai; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/wens/linux.git sunxi-wip
head:   1cdb4d4846ffaddce6d648dbbfcdcca78f8a0bcc
commit: 2abb9ce9741414211f8e0a2e94cfbedc4f08e613 [21/29] WIP: mmc: sunxi: tuning
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20260516/202605160908.HBqwvqzZ-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260516/202605160908.HBqwvqzZ-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/202605160908.HBqwvqzZ-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from drivers/mmc/host/sunxi-mmc.c:15:
   drivers/mmc/host/sunxi-mmc.c: In function 'sunxi_mmc_probe':
>> drivers/mmc/host/sunxi-mmc.c:1517:25: error: implicit declaration of function 'FIELD_GET' [-Wimplicit-function-declaration]
    1517 |                         FIELD_GET(GENMASK(23, 16), val),
         |                         ^~~~~~~~~
   include/linux/dev_printk.h:110:37: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                                     ^~~~~~~~~~~
   drivers/mmc/host/sunxi-mmc.c:1516:17: note: in expansion of macro 'dev_info'
    1516 |                 dev_info(&pdev->dev, "host version: %lu.%lu.%lu\n",
         |                 ^~~~~~~~
>> drivers/mmc/host/sunxi-mmc.c:1516:38: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
    1516 |                 dev_info(&pdev->dev, "host version: %lu.%lu.%lu\n",
         |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:160:58: note: in expansion of macro 'dev_fmt'
     160 |         dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                          ^~~~~~~
   drivers/mmc/host/sunxi-mmc.c:1516:17: note: in expansion of macro 'dev_info'
    1516 |                 dev_info(&pdev->dev, "host version: %lu.%lu.%lu\n",
         |                 ^~~~~~~~
   drivers/mmc/host/sunxi-mmc.c:1516:55: note: format string is defined here
    1516 |                 dev_info(&pdev->dev, "host version: %lu.%lu.%lu\n",
         |                                                     ~~^
         |                                                       |
         |                                                       long unsigned int
         |                                                     %u
   drivers/mmc/host/sunxi-mmc.c:1516:38: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'int' [-Wformat=]
    1516 |                 dev_info(&pdev->dev, "host version: %lu.%lu.%lu\n",
         |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:160:58: note: in expansion of macro 'dev_fmt'
     160 |         dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                          ^~~~~~~
   drivers/mmc/host/sunxi-mmc.c:1516:17: note: in expansion of macro 'dev_info'
    1516 |                 dev_info(&pdev->dev, "host version: %lu.%lu.%lu\n",
         |                 ^~~~~~~~
   drivers/mmc/host/sunxi-mmc.c:1516:59: note: format string is defined here
    1516 |                 dev_info(&pdev->dev, "host version: %lu.%lu.%lu\n",
         |                                                         ~~^
         |                                                           |
         |                                                           long unsigned int
         |                                                         %u
   drivers/mmc/host/sunxi-mmc.c:1516:38: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'int' [-Wformat=]
    1516 |                 dev_info(&pdev->dev, "host version: %lu.%lu.%lu\n",
         |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:160:58: note: in expansion of macro 'dev_fmt'
     160 |         dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                          ^~~~~~~
   drivers/mmc/host/sunxi-mmc.c:1516:17: note: in expansion of macro 'dev_info'
    1516 |                 dev_info(&pdev->dev, "host version: %lu.%lu.%lu\n",
         |                 ^~~~~~~~
   drivers/mmc/host/sunxi-mmc.c:1516:63: note: format string is defined here
    1516 |                 dev_info(&pdev->dev, "host version: %lu.%lu.%lu\n",
         |                                                             ~~^
         |                                                               |
         |                                                               long unsigned int
         |                                                             %u


vim +/FIELD_GET +1517 drivers/mmc/host/sunxi-mmc.c

  1414	
  1415	static int sunxi_mmc_probe(struct platform_device *pdev)
  1416	{
  1417		struct sunxi_mmc_host *host;
  1418		struct mmc_host *mmc;
  1419		u32 val;
  1420		int ret;
  1421	
  1422		mmc = devm_mmc_alloc_host(&pdev->dev, sizeof(*host));
  1423		if (!mmc)
  1424			return dev_err_probe(&pdev->dev, -ENOMEM,
  1425					     "mmc alloc host failed\n");
  1426		platform_set_drvdata(pdev, mmc);
  1427	
  1428		host = mmc_priv(mmc);
  1429		host->dev = &pdev->dev;
  1430		host->mmc = mmc;
  1431		spin_lock_init(&host->lock);
  1432	
  1433		ret = sunxi_mmc_resource_request(host, pdev);
  1434		if (ret)
  1435			return ret;
  1436	
  1437		host->sg_cpu = dma_alloc_coherent(&pdev->dev, PAGE_SIZE,
  1438						  &host->sg_dma, GFP_KERNEL);
  1439		if (!host->sg_cpu)
  1440			return dev_err_probe(&pdev->dev, -ENOMEM,
  1441					     "Failed to allocate DMA descriptor mem\n");
  1442	
  1443		if (host->cfg->ccu_has_timings_switch) {
  1444			/*
  1445			 * Supports both old and new timing modes.
  1446			 * Try setting the clk to new timing mode.
  1447			 */
  1448			sunxi_ccu_set_mmc_timing_mode(host->clk_mmc, true);
  1449	
  1450			/* And check the result */
  1451			ret = sunxi_ccu_get_mmc_timing_mode(host->clk_mmc);
  1452			if (ret < 0) {
  1453				/*
  1454				 * For whatever reason we were not able to get
  1455				 * the current active mode. Default to old mode.
  1456				 */
  1457				dev_warn(&pdev->dev, "MMC clk timing mode unknown\n");
  1458				host->use_new_timings = false;
  1459			} else {
  1460				host->use_new_timings = !!ret;
  1461			}
  1462		} else if (host->cfg->needs_new_timings) {
  1463			/* Supports new timing mode only */
  1464			host->use_new_timings = true;
  1465		}
  1466	
  1467		mmc->ops		= &sunxi_mmc_ops;
  1468		mmc->max_blk_count	= 8192;
  1469		mmc->max_blk_size	= 4096;
  1470		mmc->max_segs		= PAGE_SIZE / sizeof(struct sunxi_idma_des);
  1471		mmc->max_seg_size	= (1 << host->cfg->idma_des_size_bits);
  1472		mmc->max_req_size	= mmc->max_seg_size * mmc->max_segs;
  1473		/* 400kHz ~ 52MHz */
  1474		mmc->f_min		=   400000;
  1475		mmc->f_max		= 52000000;
  1476		mmc->caps	       |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
  1477					  MMC_CAP_SDIO_IRQ;
  1478	
  1479		/*
  1480		 * Some H5 devices do not have signal traces precise enough to
  1481		 * use HS DDR mode for their eMMC chips.
  1482		 *
  1483		 * We still enable HS DDR modes for all the other controller
  1484		 * variants that support them.
  1485		 */
  1486		if ((host->cfg->clk_delays || host->use_new_timings) &&
  1487		    !of_device_is_compatible(pdev->dev.of_node,
  1488					     "allwinner,sun50i-h5-emmc"))
  1489			mmc->caps      |= MMC_CAP_1_8V_DDR | MMC_CAP_3_3V_DDR;
  1490	
  1491		ret = mmc_of_parse(mmc);
  1492		if (ret)
  1493			goto error_free_dma;
  1494	
  1495		/*
  1496		 * If we don't support delay chains in the SoC, we can't use any
  1497		 * of the higher speed modes. Mask them out in case the device
  1498		 * tree specifies the properties for them, which gets added to
  1499		 * the caps by mmc_of_parse() above.
  1500		 */
  1501		if (!(host->cfg->clk_delays || host->use_new_timings)) {
  1502			mmc->caps &= ~(MMC_CAP_3_3V_DDR | MMC_CAP_1_8V_DDR |
  1503				       MMC_CAP_1_2V_DDR | MMC_CAP_UHS);
  1504			mmc->caps2 &= ~MMC_CAP2_HS200;
  1505		}
  1506	
  1507		/* TODO: This driver doesn't support HS400 mode yet */
  1508		mmc->caps2 &= ~MMC_CAP2_HS400;
  1509	
  1510		ret = sunxi_mmc_init_host(host);
  1511		if (ret)
  1512			goto error_free_dma;
  1513	
  1514		val = mmc_readl(host, REG_VER_SMCV) & SDXC_VER_MASK;
  1515		if (val)
> 1516			dev_info(&pdev->dev, "host version: %lu.%lu.%lu\n",
> 1517				FIELD_GET(GENMASK(23, 16), val),
  1518				FIELD_GET(GENMASK(15, 8), val),
  1519				FIELD_GET(GENMASK(7, 0), val));
  1520	
  1521		pm_runtime_set_active(&pdev->dev);
  1522		pm_runtime_set_autosuspend_delay(&pdev->dev, 50);
  1523		pm_runtime_use_autosuspend(&pdev->dev);
  1524		pm_runtime_enable(&pdev->dev);
  1525	
  1526		ret = mmc_add_host(mmc);
  1527		if (ret)
  1528			goto error_free_dma;
  1529	
  1530		dev_info(&pdev->dev, "initialized, max. request size: %u KB%s\n",
  1531			 mmc->max_req_size >> 10,
  1532			 host->use_new_timings ? ", uses new timings mode" : "");
  1533	
  1534		return 0;
  1535	
  1536	error_free_dma:
  1537		dma_free_coherent(&pdev->dev, PAGE_SIZE, host->sg_cpu, host->sg_dma);
  1538		return ret;
  1539	}
  1540	

--
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:[~2026-05-16  1:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-16  1:25 [wens:sunxi-wip 21/29] drivers/mmc/host/sunxi-mmc.c:1517:25: error: implicit declaration of function 'FIELD_GET' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.