[shenki:dev-5.4 134/290] drivers/soc/aspeed/aspeed-lpc-ctrl.c:247:17: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'resource_size_t' {aka 'long long unsigned int'}
by kernel test robot
Hi Andrew,
FYI, the error/warning still remains.
tree: https://github.com/shenki/linux dev-5.4
head: 55da988a12769b9c8594b7109fdedd41e5e8ae75
commit: b87d6368d9e83b454f28b5ab45aa9c1ee7ef5264 [134/290] soc: aspeed: Fail probe of lpc-ctrl if reserved memory is not aligned
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.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/shenki/linux/commit/b87d6368d9e83b454f28b5ab45aa9c1ee7...
git remote add shenki https://github.com/shenki/linux
git fetch --no-tags shenki dev-5.4
git checkout b87d6368d9e83b454f28b5ab45aa9c1ee7ef5264
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/miscdevice.h:7,
from drivers/soc/aspeed/aspeed-lpc-ctrl.c:9:
drivers/soc/aspeed/aspeed-lpc-ctrl.c: In function 'aspeed_lpc_ctrl_probe':
>> drivers/soc/aspeed/aspeed-lpc-ctrl.c:247:17: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
247 | dev_err(dev, "Reserved memory size must be a power of 2, got %zu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/device.h:1658:22: note: in definition of macro 'dev_fmt'
1658 | #define dev_fmt(fmt) fmt
| ^~~
drivers/soc/aspeed/aspeed-lpc-ctrl.c:247:4: note: in expansion of macro 'dev_err'
247 | dev_err(dev, "Reserved memory size must be a power of 2, got %zu\n",
| ^~~~~~~
drivers/soc/aspeed/aspeed-lpc-ctrl.c:247:67: note: format string is defined here
247 | dev_err(dev, "Reserved memory size must be a power of 2, got %zu\n",
| ~~^
| |
| long unsigned int
| %llu
In file included from include/linux/miscdevice.h:7,
from drivers/soc/aspeed/aspeed-lpc-ctrl.c:9:
drivers/soc/aspeed/aspeed-lpc-ctrl.c:253:17: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
253 | dev_err(dev, "Reserved memory must be naturally aligned for size %zu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/device.h:1658:22: note: in definition of macro 'dev_fmt'
1658 | #define dev_fmt(fmt) fmt
| ^~~
drivers/soc/aspeed/aspeed-lpc-ctrl.c:253:4: note: in expansion of macro 'dev_err'
253 | dev_err(dev, "Reserved memory must be naturally aligned for size %zu\n",
| ^~~~~~~
drivers/soc/aspeed/aspeed-lpc-ctrl.c:253:71: note: format string is defined here
253 | dev_err(dev, "Reserved memory must be naturally aligned for size %zu\n",
| ~~^
| |
| long unsigned int
| %llu
vim +247 drivers/soc/aspeed/aspeed-lpc-ctrl.c
197
198 static int aspeed_lpc_ctrl_probe(struct platform_device *pdev)
199 {
200 struct aspeed_lpc_ctrl *lpc_ctrl;
201 struct device_node *node;
202 struct resource resm;
203 struct device *dev;
204 int rc;
205
206 dev = &pdev->dev;
207
208 lpc_ctrl = devm_kzalloc(dev, sizeof(*lpc_ctrl), GFP_KERNEL);
209 if (!lpc_ctrl)
210 return -ENOMEM;
211
212 /* If flash is described in device tree then store */
213 node = of_parse_phandle(dev->of_node, "flash", 0);
214 if (!node) {
215 dev_dbg(dev, "Didn't find host pnor flash node\n");
216 } else {
217 rc = of_address_to_resource(node, 1, &resm);
218 of_node_put(node);
219 if (rc) {
220 dev_err(dev, "Couldn't address to resource for flash\n");
221 return rc;
222 }
223
224 lpc_ctrl->pnor_size = resource_size(&resm);
225 lpc_ctrl->pnor_base = resm.start;
226 }
227
228
229 dev_set_drvdata(&pdev->dev, lpc_ctrl);
230
231 /* If memory-region is described in device tree then store */
232 node = of_parse_phandle(dev->of_node, "memory-region", 0);
233 if (!node) {
234 dev_dbg(dev, "Didn't find reserved memory\n");
235 } else {
236 rc = of_address_to_resource(node, 0, &resm);
237 of_node_put(node);
238 if (rc) {
239 dev_err(dev, "Couldn't address to resource for reserved memory\n");
240 return -ENXIO;
241 }
242
243 lpc_ctrl->mem_size = resource_size(&resm);
244 lpc_ctrl->mem_base = resm.start;
245
246 if (!is_power_of_2(lpc_ctrl->mem_size)) {
> 247 dev_err(dev, "Reserved memory size must be a power of 2, got %zu\n",
248 lpc_ctrl->mem_size);
249 return -EINVAL;
250 }
251
252 if (!IS_ALIGNED(lpc_ctrl->mem_base, lpc_ctrl->mem_size)) {
253 dev_err(dev, "Reserved memory must be naturally aligned for size %zu\n",
254 lpc_ctrl->mem_size);
255 return -EINVAL;
256 }
257 }
258
259 lpc_ctrl->regmap = syscon_node_to_regmap(
260 pdev->dev.parent->of_node);
261 if (IS_ERR(lpc_ctrl->regmap)) {
262 dev_err(dev, "Couldn't get regmap\n");
263 return -ENODEV;
264 }
265
266 lpc_ctrl->clk = devm_clk_get(dev, NULL);
267 if (IS_ERR(lpc_ctrl->clk)) {
268 dev_err(dev, "couldn't get clock\n");
269 return PTR_ERR(lpc_ctrl->clk);
270 }
271 rc = clk_prepare_enable(lpc_ctrl->clk);
272 if (rc) {
273 dev_err(dev, "couldn't enable clock\n");
274 return rc;
275 }
276
277 lpc_ctrl->miscdev.minor = MISC_DYNAMIC_MINOR;
278 lpc_ctrl->miscdev.name = DEVICE_NAME;
279 lpc_ctrl->miscdev.fops = &aspeed_lpc_ctrl_fops;
280 lpc_ctrl->miscdev.parent = dev;
281 rc = misc_register(&lpc_ctrl->miscdev);
282 if (rc) {
283 dev_err(dev, "Unable to register device\n");
284 goto err;
285 }
286
287 return 0;
288
289 err:
290 clk_disable_unprepare(lpc_ctrl->clk);
291 return rc;
292 }
293
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
drivers/firmware/dmi_scan.c:405:41: warning: taking address of packed member 'handle' of class or structure 'dmi_header' may result in an unaligned pointer value
by kernel test robot
Hi Thomas,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fe07bfda2fb9cdef8a4d4008a409bb02f35f1bd8
commit: ba15533275dd70238b523417d222d43fb40dac9d Merge tag 'v5.6' into mips-next
date: 11 months ago
config: mips-randconfig-r011-20210301 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b077d82b00d81934c7c27ac89dd8b0e7f448bded)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ba15533275dd70238b523417d222d43fb40dac9d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/firmware/dmi_scan.c:5:
In file included from include/linux/module.h:16:
In file included from include/linux/kmod.h:9:
In file included from include/linux/umh.h:4:
In file included from include/linux/gfp.h:9:
include/linux/topology.h:119:9: error: implicit declaration of function 'cpu_logical_map' [-Werror,-Wimplicit-function-declaration]
return cpu_to_node(raw_smp_processor_id());
^
arch/mips/include/asm/mach-loongson64/topology.h:7:27: note: expanded from macro 'cpu_to_node'
#define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
^
In file included from drivers/firmware/dmi_scan.c:5:
In file included from include/linux/module.h:16:
In file included from include/linux/kmod.h:9:
In file included from include/linux/umh.h:4:
In file included from include/linux/gfp.h:9:
include/linux/topology.h:193:9: error: implicit declaration of function 'cpu_logical_map' [-Werror,-Wimplicit-function-declaration]
return cpu_to_node(cpu);
^
arch/mips/include/asm/mach-loongson64/topology.h:7:27: note: expanded from macro 'cpu_to_node'
#define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
^
In file included from drivers/firmware/dmi_scan.c:5:
In file included from include/linux/module.h:16:
In file included from include/linux/kmod.h:9:
In file included from include/linux/umh.h:4:
In file included from include/linux/gfp.h:9:
include/linux/topology.h:227:25: error: implicit declaration of function 'cpu_logical_map' [-Werror,-Wimplicit-function-declaration]
return cpumask_of_node(cpu_to_node(cpu));
^
arch/mips/include/asm/mach-loongson64/topology.h:7:27: note: expanded from macro 'cpu_to_node'
#define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
^
>> drivers/firmware/dmi_scan.c:405:41: warning: taking address of packed member 'handle' of class or structure 'dmi_header' may result in an unaligned pointer value [-Waddress-of-packed-member]
dmi_memdev[nr].handle = get_unaligned(&dm->handle);
^~~~~~~~~~
include/asm-generic/unaligned.h:22:24: note: expanded from macro 'get_unaligned'
# define get_unaligned __get_unaligned_le
^
include/linux/unaligned/generic.h:11:52: note: expanded from macro '__get_unaligned_le'
#define __get_unaligned_le(ptr) ((__force typeof(*(ptr)))({ \
^~~
>> drivers/firmware/dmi_scan.c:405:41: warning: taking address of packed member 'handle' of class or structure 'dmi_header' may result in an unaligned pointer value [-Waddress-of-packed-member]
dmi_memdev[nr].handle = get_unaligned(&dm->handle);
^~~~~~~~~~
include/asm-generic/unaligned.h:22:24: note: expanded from macro 'get_unaligned'
# define get_unaligned __get_unaligned_le
^
include/linux/unaligned/generic.h:12:33: note: expanded from macro '__get_unaligned_le'
__builtin_choose_expr(sizeof(*(ptr)) == 1, *(ptr), \
^~~
>> drivers/firmware/dmi_scan.c:405:41: warning: taking address of packed member 'handle' of class or structure 'dmi_header' may result in an unaligned pointer value [-Waddress-of-packed-member]
dmi_memdev[nr].handle = get_unaligned(&dm->handle);
^~~~~~~~~~
include/asm-generic/unaligned.h:22:24: note: expanded from macro 'get_unaligned'
# define get_unaligned __get_unaligned_le
^
include/linux/unaligned/generic.h:12:47: note: expanded from macro '__get_unaligned_le'
__builtin_choose_expr(sizeof(*(ptr)) == 1, *(ptr), \
^~~
>> drivers/firmware/dmi_scan.c:405:41: warning: taking address of packed member 'handle' of class or structure 'dmi_header' may result in an unaligned pointer value [-Waddress-of-packed-member]
dmi_memdev[nr].handle = get_unaligned(&dm->handle);
^~~~~~~~~~
include/asm-generic/unaligned.h:22:24: note: expanded from macro 'get_unaligned'
# define get_unaligned __get_unaligned_le
^
include/linux/unaligned/generic.h:13:33: note: expanded from macro '__get_unaligned_le'
__builtin_choose_expr(sizeof(*(ptr)) == 2, get_unaligned_le16((ptr)), \
^~~
>> drivers/firmware/dmi_scan.c:405:41: warning: taking address of packed member 'handle' of class or structure 'dmi_header' may result in an unaligned pointer value [-Waddress-of-packed-member]
dmi_memdev[nr].handle = get_unaligned(&dm->handle);
^~~~~~~~~~
include/asm-generic/unaligned.h:22:24: note: expanded from macro 'get_unaligned'
# define get_unaligned __get_unaligned_le
^
include/linux/unaligned/generic.h:14:33: note: expanded from macro '__get_unaligned_le'
__builtin_choose_expr(sizeof(*(ptr)) == 4, get_unaligned_le32((ptr)), \
^~~
>> drivers/firmware/dmi_scan.c:405:41: warning: taking address of packed member 'handle' of class or structure 'dmi_header' may result in an unaligned pointer value [-Waddress-of-packed-member]
dmi_memdev[nr].handle = get_unaligned(&dm->handle);
^~~~~~~~~~
include/asm-generic/unaligned.h:22:24: note: expanded from macro 'get_unaligned'
# define get_unaligned __get_unaligned_le
^
include/linux/unaligned/generic.h:14:65: note: expanded from macro '__get_unaligned_le'
__builtin_choose_expr(sizeof(*(ptr)) == 4, get_unaligned_le32((ptr)), \
^~~
>> drivers/firmware/dmi_scan.c:405:41: warning: taking address of packed member 'handle' of class or structure 'dmi_header' may result in an unaligned pointer value [-Waddress-of-packed-member]
dmi_memdev[nr].handle = get_unaligned(&dm->handle);
^~~~~~~~~~
include/asm-generic/unaligned.h:22:24: note: expanded from macro 'get_unaligned'
# define get_unaligned __get_unaligned_le
^
include/linux/unaligned/generic.h:15:33: note: expanded from macro '__get_unaligned_le'
__builtin_choose_expr(sizeof(*(ptr)) == 8, get_unaligned_le64((ptr)), \
^~~
>> drivers/firmware/dmi_scan.c:405:41: warning: taking address of packed member 'handle' of class or structure 'dmi_header' may result in an unaligned pointer value [-Waddress-of-packed-member]
dmi_memdev[nr].handle = get_unaligned(&dm->handle);
^~~~~~~~~~
include/asm-generic/unaligned.h:22:24: note: expanded from macro 'get_unaligned'
# define get_unaligned __get_unaligned_le
^
include/linux/unaligned/generic.h:15:65: note: expanded from macro '__get_unaligned_le'
__builtin_choose_expr(sizeof(*(ptr)) == 8, get_unaligned_le64((ptr)), \
^~~
8 warnings and 3 errors generated.
vim +405 drivers/firmware/dmi_scan.c
dd6dad4288cb93 Chen, Gong 2013-10-18 391
dd6dad4288cb93 Chen, Gong 2013-10-18 392 static void __init save_mem_devices(const struct dmi_header *dm, void *v)
dd6dad4288cb93 Chen, Gong 2013-10-18 393 {
dd6dad4288cb93 Chen, Gong 2013-10-18 394 const char *d = (const char *)dm;
dd6dad4288cb93 Chen, Gong 2013-10-18 395 static int nr;
6deae96b42eb1f Tony Luck 2018-03-12 396 u64 bytes;
6deae96b42eb1f Tony Luck 2018-03-12 397 u16 size;
dd6dad4288cb93 Chen, Gong 2013-10-18 398
9e0afe3910ff7e Jean Delvare 2019-12-03 399 if (dm->type != DMI_ENTRY_MEM_DEVICE || dm->length < 0x13)
dd6dad4288cb93 Chen, Gong 2013-10-18 400 return;
dd6dad4288cb93 Chen, Gong 2013-10-18 401 if (nr >= dmi_memdev_nr) {
dd6dad4288cb93 Chen, Gong 2013-10-18 402 pr_warn(FW_BUG "Too many DIMM entries in SMBIOS table\n");
dd6dad4288cb93 Chen, Gong 2013-10-18 403 return;
dd6dad4288cb93 Chen, Gong 2013-10-18 404 }
0841c04d65937a Tony Luck 2013-11-01 @405 dmi_memdev[nr].handle = get_unaligned(&dm->handle);
dd6dad4288cb93 Chen, Gong 2013-10-18 406 dmi_memdev[nr].device = dmi_string(dm, d[0x10]);
dd6dad4288cb93 Chen, Gong 2013-10-18 407 dmi_memdev[nr].bank = dmi_string(dm, d[0x11]);
9e0afe3910ff7e Jean Delvare 2019-12-03 408 dmi_memdev[nr].type = d[0x12];
6deae96b42eb1f Tony Luck 2018-03-12 409
6deae96b42eb1f Tony Luck 2018-03-12 410 size = get_unaligned((u16 *)&d[0xC]);
6deae96b42eb1f Tony Luck 2018-03-12 411 if (size == 0)
6deae96b42eb1f Tony Luck 2018-03-12 412 bytes = 0;
6deae96b42eb1f Tony Luck 2018-03-12 413 else if (size == 0xffff)
6deae96b42eb1f Tony Luck 2018-03-12 414 bytes = ~0ull;
6deae96b42eb1f Tony Luck 2018-03-12 415 else if (size & 0x8000)
6deae96b42eb1f Tony Luck 2018-03-12 416 bytes = (u64)(size & 0x7fff) << 10;
81dde26de9c08b Jean Delvare 2019-10-14 417 else if (size != 0x7fff || dm->length < 0x20)
6deae96b42eb1f Tony Luck 2018-03-12 418 bytes = (u64)size << 20;
6deae96b42eb1f Tony Luck 2018-03-12 419 else
6deae96b42eb1f Tony Luck 2018-03-12 420 bytes = (u64)get_unaligned((u32 *)&d[0x1C]) << 20;
6deae96b42eb1f Tony Luck 2018-03-12 421
6deae96b42eb1f Tony Luck 2018-03-12 422 dmi_memdev[nr].size = bytes;
dd6dad4288cb93 Chen, Gong 2013-10-18 423 nr++;
dd6dad4288cb93 Chen, Gong 2013-10-18 424 }
dd6dad4288cb93 Chen, Gong 2013-10-18 425
:::::: The code at line 405 was first introduced by commit
:::::: 0841c04d65937ad2808f59c43cb54a92473c8f0e dmi: Avoid unaligned memory access in save_mem_devices()
:::::: TO: Luck, Tony <tony.luck(a)intel.com>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1510:12: error: implicit declaration of function 'fib_info_nh'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 06d5d309a3f17e32cd59926f391db1e1ea652184
commit: 8914add2c9e5518f6a864936658bba5752510b39 net/mlx5e: Handle FIB events to update tunnel endpoint device
date: 3 weeks ago
config: powerpc-randconfig-r004-20210301 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b077d82b00d81934c7c27ac89dd8b0e7f448bded)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 8914add2c9e5518f6a864936658bba5752510b39
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:5:
In file included from drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.h:7:
In file included from drivers/net/ethernet/mellanox/mlx5/core/en/tc_priv.h:7:
In file included from drivers/net/ethernet/mellanox/mlx5/core/en_tc.h:40:
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h:78:5: warning: no previous prototype for function 'mlx5e_tc_tun_update_header_ipv6' [-Wmissing-prototypes]
int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv,
^
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv,
^
static
>> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1510:12: error: implicit declaration of function 'fib_info_nh' [-Werror,-Wimplicit-function-declaration]
fib_dev = fib_info_nh(fen_info->fi, 0)->fib_nh_dev;
^
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1510:12: note: did you mean 'fib_info_put'?
include/net/ip_fib.h:528:20: note: 'fib_info_put' declared here
static inline void fib_info_put(struct fib_info *fi)
^
>> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1510:42: error: member reference type 'int' is not a pointer
fib_dev = fib_info_nh(fen_info->fi, 0)->fib_nh_dev;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
include/net/ip_fib.h:113:21: note: expanded from macro 'fib_nh_dev'
#define fib_nh_dev nh_common.nhc_dev
^
>> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1552:13: error: incomplete definition of type 'struct fib6_entry_notifier_info'
fen_info = container_of(info, struct fib6_entry_notifier_info, info);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:694:51: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
include/linux/compiler_types.h:256:74: note: expanded from macro '__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info'
struct fib6_entry_notifier_info *fen_info;
^
>> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1552:13: error: offsetof of incomplete type 'struct fib6_entry_notifier_info'
fen_info = container_of(info, struct fib6_entry_notifier_info, info);
^ ~~~~~~
include/linux/kernel.h:697:21: note: expanded from macro 'container_of'
((type *)(__mptr - offsetof(type, member))); })
^ ~~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info'
struct fib6_entry_notifier_info *fen_info;
^
>> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1552:11: error: assigning to 'struct fib6_entry_notifier_info *' from incompatible type 'void'
fen_info = container_of(info, struct fib6_entry_notifier_info, info);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1553:12: error: implicit declaration of function 'fib6_info_nh_dev' [-Werror,-Wimplicit-function-declaration]
fib_dev = fib6_info_nh_dev(fen_info->rt);
^
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1553:37: error: incomplete definition of type 'struct fib6_entry_notifier_info'
fib_dev = fib6_info_nh_dev(fen_info->rt);
~~~~~~~~^
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info'
struct fib6_entry_notifier_info *fen_info;
^
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1555:14: error: incomplete definition of type 'struct fib6_entry_notifier_info'
fen_info->rt->fib6_dst.plen != 128)
~~~~~~~~^
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info'
struct fib6_entry_notifier_info *fen_info;
^
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1562:39: error: incomplete definition of type 'struct fib6_entry_notifier_info'
memcpy(&key.endpoint_ip.v6, &fen_info->rt->fib6_dst.addr,
~~~~~~~~^
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info'
struct fib6_entry_notifier_info *fen_info;
^
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1563:24: error: incomplete definition of type 'struct fib6_entry_notifier_info'
sizeof(fen_info->rt->fib6_dst.addr));
~~~~~~~~^
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info'
struct fib6_entry_notifier_info *fen_info;
^
1 warning and 10 errors generated.
vim +/fib_info_nh +1510 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c
1495
1496 static struct mlx5e_tc_fib_event_data *
1497 mlx5e_init_fib_work_ipv4(struct mlx5e_priv *priv,
1498 struct net_device *ul_dev,
1499 struct mlx5e_tc_tun_encap *encap,
1500 unsigned long event,
1501 struct fib_notifier_info *info)
1502 {
1503 struct fib_entry_notifier_info *fen_info;
1504 struct mlx5e_tc_fib_event_data *fib_work;
1505 struct mlx5e_route_entry *r;
1506 struct mlx5e_route_key key;
1507 struct net_device *fib_dev;
1508
1509 fen_info = container_of(info, struct fib_entry_notifier_info, info);
> 1510 fib_dev = fib_info_nh(fen_info->fi, 0)->fib_nh_dev;
1511 if (fib_dev->netdev_ops != &mlx5e_netdev_ops ||
1512 fen_info->dst_len != 32)
1513 return NULL;
1514
1515 fib_work = mlx5e_tc_init_fib_work(event, ul_dev, GFP_ATOMIC);
1516 if (!fib_work)
1517 return ERR_PTR(-ENOMEM);
1518
1519 key.endpoint_ip.v4 = htonl(fen_info->dst);
1520 key.ip_version = 4;
1521
1522 /* Can't fail after this point because releasing reference to r
1523 * requires obtaining sleeping mutex which we can't do in atomic
1524 * context.
1525 */
1526 r = mlx5e_route_lookup_for_update(encap, &key);
1527 if (!r)
1528 goto out;
1529 fib_work->r = r;
1530 dev_hold(ul_dev);
1531
1532 return fib_work;
1533
1534 out:
1535 kfree(fib_work);
1536 return NULL;
1537 }
1538
1539 static struct mlx5e_tc_fib_event_data *
1540 mlx5e_init_fib_work_ipv6(struct mlx5e_priv *priv,
1541 struct net_device *ul_dev,
1542 struct mlx5e_tc_tun_encap *encap,
1543 unsigned long event,
1544 struct fib_notifier_info *info)
1545 {
1546 struct fib6_entry_notifier_info *fen_info;
1547 struct mlx5e_tc_fib_event_data *fib_work;
1548 struct mlx5e_route_entry *r;
1549 struct mlx5e_route_key key;
1550 struct net_device *fib_dev;
1551
> 1552 fen_info = container_of(info, struct fib6_entry_notifier_info, info);
> 1553 fib_dev = fib6_info_nh_dev(fen_info->rt);
1554 if (fib_dev->netdev_ops != &mlx5e_netdev_ops ||
1555 fen_info->rt->fib6_dst.plen != 128)
1556 return NULL;
1557
1558 fib_work = mlx5e_tc_init_fib_work(event, ul_dev, GFP_ATOMIC);
1559 if (!fib_work)
1560 return ERR_PTR(-ENOMEM);
1561
1562 memcpy(&key.endpoint_ip.v6, &fen_info->rt->fib6_dst.addr,
1563 sizeof(fen_info->rt->fib6_dst.addr));
1564 key.ip_version = 6;
1565
1566 /* Can't fail after this point because releasing reference to r
1567 * requires obtaining sleeping mutex which we can't do in atomic
1568 * context.
1569 */
1570 r = mlx5e_route_lookup_for_update(encap, &key);
1571 if (!r)
1572 goto out;
1573 fib_work->r = r;
1574 dev_hold(ul_dev);
1575
1576 return fib_work;
1577
1578 out:
1579 kfree(fib_work);
1580 return NULL;
1581 }
1582
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:688:31: warning: variable 'cmd_enc' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 06d5d309a3f17e32cd59926f391db1e1ea652184
commit: fe286893ed34b12684659d3efb907d47fe18559b drm/msm/dpu: Remove unused call in wait_for_commit_done
date: 4 weeks ago
config: arm-randconfig-r034-20210301 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout fe286893ed34b12684659d3efb907d47fe18559b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c: In function 'dpu_encoder_phys_cmd_wait_for_commit_done':
>> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:688:31: warning: variable 'cmd_enc' set but not used [-Wunused-but-set-variable]
688 | struct dpu_encoder_phys_cmd *cmd_enc;
| ^~~~~~~
vim +/cmd_enc +688 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 684
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 685 static int dpu_encoder_phys_cmd_wait_for_commit_done(
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 686 struct dpu_encoder_phys *phys_enc)
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 687 {
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 @688 struct dpu_encoder_phys_cmd *cmd_enc;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 689
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 690 cmd_enc = to_dpu_encoder_phys_cmd(phys_enc);
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 691
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 692 /* only required for master controller */
fe286893ed34b1 AngeloGioacchino Del Regno 2021-01-12 693 if (!dpu_encoder_phys_cmd_is_master(phys_enc))
fe286893ed34b1 AngeloGioacchino Del Regno 2021-01-12 694 return 0;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 695
fe286893ed34b1 AngeloGioacchino Del Regno 2021-01-12 696 return _dpu_encoder_phys_cmd_wait_for_ctl_start(phys_enc);
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 697 }
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 698
:::::: The code at line 688 was first introduced by commit
:::::: 25fdd5933e4c0f5fe2ea5cd59994f8ac5fbe90ef drm/msm: Add SDM845 DPU support
:::::: TO: Jeykumar Sankaran <jsanka(a)codeaurora.org>
:::::: CC: Sean Paul <seanpaul(a)chromium.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months