[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202109071630.YYRRfx05-lkp@intel.com>
Date: Tue, 7 Sep 2021 16:43:47 +0800
From: kernel test robot <lkp@...el.com>
To: Robert Foss <robert.foss@...aro.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [andersson-kernel:wip/for-robert/dsi-panel-fixup 8140/8157]
drivers/interconnect/core.c:212:33: warning: ISO C90 forbids mixed
declarations and code
tree: https://github.com/andersson/kernel wip/for-robert/dsi-panel-fixup
head: 2c9fc6fc5e7be5c2b042e98045f2b0c763ef3bb9
commit: 74172e61cd79e6306f9c14426098a561258e3d7c [8140/8157] WIP: Debug
config: arm64-randconfig-r006-20210906 (attached as .config)
compiler: aarch64-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
# https://github.com/andersson/kernel/commit/74172e61cd79e6306f9c14426098a561258e3d7c
git remote add andersson-kernel https://github.com/andersson/kernel
git fetch --no-tags andersson-kernel wip/for-robert/dsi-panel-fixup
git checkout 74172e61cd79e6306f9c14426098a561258e3d7c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/interconnect/core.c: In function 'path_find':
>> drivers/interconnect/core.c:212:33: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
212 | struct icc_node *tmp = node->links[i];
| ^~~~~~
--
In file included from drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c:12:
drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c: In function 'msm_dss_parse_clock':
>> drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c:129:19: warning: zero-length gnu_printf format string [-Wformat-zero-length]
129 | DRM_DEBUG("");
| ^~
include/drm/drm_print.h:504:32: note: in definition of macro 'DRM_DEBUG'
504 | __drm_dbg(DRM_UT_CORE, fmt, ##__VA_ARGS__)
| ^~~
--
In file included from include/drm/drm_mm.h:49,
from include/drm/drm_vma_manager.h:26,
from include/drm/drm_gem.h:40,
from drivers/gpu/drm/msm/msm_drv.h:34,
from drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:19:
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function 'dpu_kms_hw_init':
>> drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:959:19: warning: zero-length gnu_printf format string [-Wformat-zero-length]
959 | DRM_DEBUG("");
| ^~
include/drm/drm_print.h:504:32: note: in definition of macro 'DRM_DEBUG'
504 | __drm_dbg(DRM_UT_CORE, fmt, ##__VA_ARGS__)
| ^~~
vim +212 drivers/interconnect/core.c
11f1ceca7031de Georgi Djakov 2019-01-16 176
11f1ceca7031de Georgi Djakov 2019-01-16 177 static struct icc_path *path_find(struct device *dev, struct icc_node *src,
11f1ceca7031de Georgi Djakov 2019-01-16 178 struct icc_node *dst)
11f1ceca7031de Georgi Djakov 2019-01-16 179 {
11f1ceca7031de Georgi Djakov 2019-01-16 180 struct icc_path *path = ERR_PTR(-EPROBE_DEFER);
11f1ceca7031de Georgi Djakov 2019-01-16 181 struct icc_node *n, *node = NULL;
11f1ceca7031de Georgi Djakov 2019-01-16 182 struct list_head traverse_list;
11f1ceca7031de Georgi Djakov 2019-01-16 183 struct list_head edge_list;
11f1ceca7031de Georgi Djakov 2019-01-16 184 struct list_head visited_list;
11f1ceca7031de Georgi Djakov 2019-01-16 185 size_t i, depth = 1;
11f1ceca7031de Georgi Djakov 2019-01-16 186 bool found = false;
11f1ceca7031de Georgi Djakov 2019-01-16 187
74172e61cd79e6 Robert Foss 2021-08-11 188 printk("%s() src=%p dst=%p", __func__, src, dst);
74172e61cd79e6 Robert Foss 2021-08-11 189
11f1ceca7031de Georgi Djakov 2019-01-16 190 INIT_LIST_HEAD(&traverse_list);
11f1ceca7031de Georgi Djakov 2019-01-16 191 INIT_LIST_HEAD(&edge_list);
11f1ceca7031de Georgi Djakov 2019-01-16 192 INIT_LIST_HEAD(&visited_list);
11f1ceca7031de Georgi Djakov 2019-01-16 193
11f1ceca7031de Georgi Djakov 2019-01-16 194 list_add(&src->search_list, &traverse_list);
11f1ceca7031de Georgi Djakov 2019-01-16 195 src->reverse = NULL;
11f1ceca7031de Georgi Djakov 2019-01-16 196
11f1ceca7031de Georgi Djakov 2019-01-16 197 do {
11f1ceca7031de Georgi Djakov 2019-01-16 198 list_for_each_entry_safe(node, n, &traverse_list, search_list) {
74172e61cd79e6 Robert Foss 2021-08-11 199 if (!node) {
74172e61cd79e6 Robert Foss 2021-08-11 200 printk("%s() node=%p", __func__, node);
74172e61cd79e6 Robert Foss 2021-08-11 201 }
11f1ceca7031de Georgi Djakov 2019-01-16 202 if (node == dst) {
11f1ceca7031de Georgi Djakov 2019-01-16 203 found = true;
11f1ceca7031de Georgi Djakov 2019-01-16 204 list_splice_init(&edge_list, &visited_list);
11f1ceca7031de Georgi Djakov 2019-01-16 205 list_splice_init(&traverse_list, &visited_list);
11f1ceca7031de Georgi Djakov 2019-01-16 206 break;
11f1ceca7031de Georgi Djakov 2019-01-16 207 }
11f1ceca7031de Georgi Djakov 2019-01-16 208 for (i = 0; i < node->num_links; i++) {
74172e61cd79e6 Robert Foss 2021-08-11 209 if (!node) {
74172e61cd79e6 Robert Foss 2021-08-11 210 printk("%s() node=%p", __func__, node);
74172e61cd79e6 Robert Foss 2021-08-11 211 }
11f1ceca7031de Georgi Djakov 2019-01-16 @212 struct icc_node *tmp = node->links[i];
11f1ceca7031de Georgi Djakov 2019-01-16 213
11f1ceca7031de Georgi Djakov 2019-01-16 214 if (!tmp) {
74172e61cd79e6 Robert Foss 2021-08-11 215 printk("%s() node=%s [%ld/%ld]\n", __func__, node->name, i, node->num_links);
11f1ceca7031de Georgi Djakov 2019-01-16 216 path = ERR_PTR(-ENOENT);
11f1ceca7031de Georgi Djakov 2019-01-16 217 goto out;
11f1ceca7031de Georgi Djakov 2019-01-16 218 }
11f1ceca7031de Georgi Djakov 2019-01-16 219
11f1ceca7031de Georgi Djakov 2019-01-16 220 if (tmp->is_traversed)
11f1ceca7031de Georgi Djakov 2019-01-16 221 continue;
11f1ceca7031de Georgi Djakov 2019-01-16 222
11f1ceca7031de Georgi Djakov 2019-01-16 223 tmp->is_traversed = true;
11f1ceca7031de Georgi Djakov 2019-01-16 224 tmp->reverse = node;
11f1ceca7031de Georgi Djakov 2019-01-16 225 list_add_tail(&tmp->search_list, &edge_list);
11f1ceca7031de Georgi Djakov 2019-01-16 226 }
11f1ceca7031de Georgi Djakov 2019-01-16 227 }
11f1ceca7031de Georgi Djakov 2019-01-16 228
11f1ceca7031de Georgi Djakov 2019-01-16 229 if (found)
11f1ceca7031de Georgi Djakov 2019-01-16 230 break;
11f1ceca7031de Georgi Djakov 2019-01-16 231
11f1ceca7031de Georgi Djakov 2019-01-16 232 list_splice_init(&traverse_list, &visited_list);
11f1ceca7031de Georgi Djakov 2019-01-16 233 list_splice_init(&edge_list, &traverse_list);
11f1ceca7031de Georgi Djakov 2019-01-16 234
11f1ceca7031de Georgi Djakov 2019-01-16 235 /* count the hops including the source */
11f1ceca7031de Georgi Djakov 2019-01-16 236 depth++;
11f1ceca7031de Georgi Djakov 2019-01-16 237
11f1ceca7031de Georgi Djakov 2019-01-16 238 } while (!list_empty(&traverse_list));
11f1ceca7031de Georgi Djakov 2019-01-16 239
11f1ceca7031de Georgi Djakov 2019-01-16 240 out:
11f1ceca7031de Georgi Djakov 2019-01-16 241
11f1ceca7031de Georgi Djakov 2019-01-16 242 /* reset the traversed state */
11f1ceca7031de Georgi Djakov 2019-01-16 243 list_for_each_entry_reverse(n, &visited_list, search_list)
11f1ceca7031de Georgi Djakov 2019-01-16 244 n->is_traversed = false;
11f1ceca7031de Georgi Djakov 2019-01-16 245
11f1ceca7031de Georgi Djakov 2019-01-16 246 if (found)
11f1ceca7031de Georgi Djakov 2019-01-16 247 path = path_init(dev, dst, depth);
11f1ceca7031de Georgi Djakov 2019-01-16 248
11f1ceca7031de Georgi Djakov 2019-01-16 249 return path;
11f1ceca7031de Georgi Djakov 2019-01-16 250 }
11f1ceca7031de Georgi Djakov 2019-01-16 251
:::::: The code at line 212 was first introduced by commit
:::::: 11f1ceca7031deefc1a34236ab7b94360016b71d interconnect: Add generic on-chip interconnect API
:::::: TO: Georgi Djakov <georgi.djakov@...aro.org>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (39765 bytes)
Powered by blists - more mailing lists