[asahilinux:nvme-rfc 4/10] drivers/soc/apple/sart.c:175:14: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int')

From: kernel test robot
Date: Sun Mar 20 2022 - 21:23:24 EST


tree: https://github.com/AsahiLinux/linux nvme-rfc
head: 822f7747e396aa35f280972b5f018c19b8dbc11c
commit: ca0f2729fc45ec18e49de08ffcadbb22f3ecc028 [4/10] soc: apple: Add SART driver
config: hexagon-buildonly-randconfig-r004-20220320 (https://download.01.org/0day-ci/archive/20220321/202203210914.Sqyrtli2-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 85e9b2687a13d1908aa86d1b89c5ce398a06cd39)
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/AsahiLinux/linux/commit/ca0f2729fc45ec18e49de08ffcadbb22f3ecc028
git remote add asahilinux https://github.com/AsahiLinux/linux
git fetch --no-tags asahilinux nvme-rfc
git checkout ca0f2729fc45ec18e49de08ffcadbb22f3ecc028
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/soc/apple/

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

All warnings (new ones prefixed by >>):

>> drivers/soc/apple/sart.c:175:14: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
i, flags, paddr, size);
^~~~~
include/linux/dev_printk.h:163:47: note: expanded from macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:129:34: note: expanded from macro 'dev_printk'
_dev_printk(level, dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
drivers/soc/apple/sart.c:226:8: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
i, paddr, size);
^~~~~
include/linux/dev_printk.h:163:47: note: expanded from macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:129:34: note: expanded from macro 'dev_printk'
_dev_printk(level, dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
drivers/soc/apple/sart.c:231:55: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
dev_dbg(sart->dev, "wrote [0x%llx, 0x%zx] to %d\n", paddr, size,
~~~~ ^~~~~
%x
include/linux/dev_printk.h:163:47: note: expanded from macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:129:34: note: expanded from macro 'dev_printk'
_dev_printk(level, dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
drivers/soc/apple/sart.c:238:4: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
paddr, size);
^~~~~
include/linux/dev_printk.h:146:70: note: expanded from macro 'dev_warn'
dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
_p_func(dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
drivers/soc/apple/sart.c:251:3: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
paddr, size);
^~~~~
include/linux/dev_printk.h:163:47: note: expanded from macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:129:34: note: expanded from macro 'dev_printk'
_dev_printk(level, dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
drivers/soc/apple/sart.c:274:4: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
paddr, size);
^~~~~
include/linux/dev_printk.h:146:70: note: expanded from macro 'dev_warn'
dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
_p_func(dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
6 warnings generated.


vim +175 drivers/soc/apple/sart.c

145
146 static int apple_sart_probe(struct platform_device *pdev)
147 {
148 int i;
149 struct apple_sart *sart;
150 struct device *dev = &pdev->dev;
151
152 sart = devm_kzalloc(dev, sizeof(*sart), GFP_KERNEL);
153 if (!sart)
154 return -ENOMEM;
155
156 sart->dev = dev;
157 sart->ops = of_device_get_match_data(dev);
158
159 sart->regs = devm_platform_ioremap_resource(pdev, 0);
160 if (IS_ERR(sart->regs))
161 return PTR_ERR(sart->regs);
162
163 for (i = 0; i < APPLE_SART_MAX_ENTRIES; ++i) {
164 u8 flags;
165 size_t size;
166 phys_addr_t paddr;
167
168 sart->ops->get_entry(sart, i, &flags, &paddr, &size);
169
170 if (!flags)
171 continue;
172
173 dev_dbg(sart->dev,
174 "SART bootloader entry: index %02d; flags: 0x%02x; paddr: 0x%llx; size: 0x%zx\n",
> 175 i, flags, paddr, size);
176 set_bit(i, &sart->protected_entries);
177 }
178
179 platform_set_drvdata(pdev, sart);
180 return 0;
181 }
182

--
0-DAY CI Kernel Test Service
https://01.org/lkp