[hverkuil-media-tree:for-v5.18f 82/82] drivers/media/platform/aspeed-video.c:1836:30: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'}

From: kernel test robot
Date: Fri Jan 14 2022 - 13:04:25 EST


tree: git://linuxtv.org/hverkuil/media_tree.git for-v5.18f
head: 97dd85f0caf1ad96c275147583c46f8ee12308fc
commit: 97dd85f0caf1ad96c275147583c46f8ee12308fc [82/82] f
config: nios2-allyesconfig (https://download.01.org/0day-ci/archive/20220115/202201150143.t4kto0kZ-lkp@xxxxxxxxx/config)
compiler: nios2-linux-gcc (GCC) 11.2.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
git remote add hverkuil-media-tree git://linuxtv.org/hverkuil/media_tree.git
git fetch --no-tags hverkuil-media-tree for-v5.18f
git checkout 97dd85f0caf1ad96c275147583c46f8ee12308fc
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash drivers/media/platform/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from include/linux/device.h:15,
from drivers/media/platform/aspeed-video.c:9:
drivers/media/platform/aspeed-video.c: In function 'aspeed_video_init':
>> drivers/media/platform/aspeed-video.c:1836:30: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
1836 | dev_info(video->dev, "alloc mem size(%d) at %pad for jpeg header\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:150:58: note: in expansion of macro 'dev_fmt'
150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/media/platform/aspeed-video.c:1836:9: note: in expansion of macro 'dev_info'
1836 | dev_info(video->dev, "alloc mem size(%d) at %pad for jpeg header\n",
| ^~~~~~~~
drivers/media/platform/aspeed-video.c:1836:54: note: format string is defined here
1836 | dev_info(video->dev, "alloc mem size(%d) at %pad for jpeg header\n",
| ~^
| |
| void *
| %d


vim +1836 drivers/media/platform/aspeed-video.c

1780
1781 static int aspeed_video_init(struct aspeed_video *video)
1782 {
1783 int irq;
1784 int rc;
1785 struct device *dev = video->dev;
1786
1787 irq = irq_of_parse_and_map(dev->of_node, 0);
1788 if (!irq) {
1789 dev_err(dev, "Unable to find IRQ\n");
1790 return -ENODEV;
1791 }
1792
1793 rc = devm_request_threaded_irq(dev, irq, NULL, aspeed_video_irq,
1794 IRQF_ONESHOT, DEVICE_NAME, video);
1795 if (rc < 0) {
1796 dev_err(dev, "Unable to request IRQ %d\n", irq);
1797 return rc;
1798 }
1799 dev_info(video->dev, "irq %d\n", irq);
1800
1801 video->eclk = devm_clk_get(dev, "eclk");
1802 if (IS_ERR(video->eclk)) {
1803 dev_err(dev, "Unable to get ECLK\n");
1804 return PTR_ERR(video->eclk);
1805 }
1806
1807 rc = clk_prepare(video->eclk);
1808 if (rc)
1809 return rc;
1810
1811 video->vclk = devm_clk_get(dev, "vclk");
1812 if (IS_ERR(video->vclk)) {
1813 dev_err(dev, "Unable to get VCLK\n");
1814 rc = PTR_ERR(video->vclk);
1815 goto err_unprepare_eclk;
1816 }
1817
1818 rc = clk_prepare(video->vclk);
1819 if (rc)
1820 goto err_unprepare_eclk;
1821
1822 of_reserved_mem_device_init(dev);
1823
1824 rc = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
1825 if (rc) {
1826 dev_err(dev, "Failed to set DMA mask\n");
1827 goto err_release_reserved_mem;
1828 }
1829
1830 if (!aspeed_video_alloc_buf(video, &video->jpeg,
1831 VE_JPEG_HEADER_SIZE)) {
1832 dev_err(dev, "Failed to allocate DMA for JPEG header\n");
1833 rc = -ENOMEM;
1834 goto err_release_reserved_mem;
1835 }
> 1836 dev_info(video->dev, "alloc mem size(%d) at %pad for jpeg header\n",
1837 VE_JPEG_HEADER_SIZE, video->jpeg.dma);
1838
1839 aspeed_video_init_jpeg_table(video->jpeg.virt, video->yuv420);
1840
1841 return 0;
1842
1843 err_release_reserved_mem:
1844 of_reserved_mem_device_release(dev);
1845 clk_unprepare(video->vclk);
1846 err_unprepare_eclk:
1847 clk_unprepare(video->eclk);
1848
1849 return rc;
1850 }
1851

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx