[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202107281819.Z4weCePH-lkp@intel.com>
Date: Wed, 28 Jul 2021 18:52:25 +0800
From: kernel test robot <lkp@...el.com>
To: Christoph Hellwig <hch@....de>
Cc: clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [hch-misc:seq_get_buf 2/5] block/mq-deadline-cgroup.c:63:44: error:
use of undeclared identifier 'pd'
tree: git://git.infradead.org/users/hch/misc.git seq_get_buf
head: b7431eccd71336b0072c8bcd4038bf6fb329b3e3
commit: d88da017031f7e42f2b2af685f42e986ae4fff69 [2/5] blk-cgroup: stop using seq_get_buf
config: x86_64-randconfig-r011-20210728 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c49df15c278857adecd12db6bb1cdc96885f7079)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc seq_get_buf
git checkout d88da017031f7e42f2b2af685f42e986ae4fff69
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=x86_64 SHELL=/bin/bash block/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All error/warnings (new ones prefixed by >>):
>> block/mq-deadline-cgroup.c:55:31: warning: declaration of 'struct iolatency_grp' will not be visible outside of this function [-Wvisibility]
static bool dd_pd_stat(struct iolatency_grp *iolat, struct seq_file *s)
^
>> block/mq-deadline-cgroup.c:63:44: error: use of undeclared identifier 'pd'
struct dd_blkcg *blkcg = dd_blkcg_from_pd(pd);
^
>> block/mq-deadline-cgroup.c:103:17: error: incompatible function pointer types initializing 'blkcg_pol_stat_pd_fn *' (aka '_Bool (*)(struct blkg_policy_data *, struct seq_file *)') with an expression of type 'bool (struct iolatency_grp *, struct seq_file *)' (aka '_Bool (struct iolatency_grp *, struct seq_file *)') [-Werror,-Wincompatible-function-pointer-types]
.pd_stat_fn = dd_pd_stat,
^~~~~~~~~~
1 warning and 2 errors generated.
vim +/pd +63 block/mq-deadline-cgroup.c
08a9ad8bf60738 Bart Van Assche 2021-06-17 54
d88da017031f7e Christoph Hellwig 2021-05-04 @55 static bool dd_pd_stat(struct iolatency_grp *iolat, struct seq_file *s)
08a9ad8bf60738 Bart Van Assche 2021-06-17 56 {
08a9ad8bf60738 Bart Van Assche 2021-06-17 57 static const char *const prio_class_name[] = {
08a9ad8bf60738 Bart Van Assche 2021-06-17 58 [IOPRIO_CLASS_NONE] = "NONE",
08a9ad8bf60738 Bart Van Assche 2021-06-17 59 [IOPRIO_CLASS_RT] = "RT",
08a9ad8bf60738 Bart Van Assche 2021-06-17 60 [IOPRIO_CLASS_BE] = "BE",
08a9ad8bf60738 Bart Van Assche 2021-06-17 61 [IOPRIO_CLASS_IDLE] = "IDLE",
08a9ad8bf60738 Bart Van Assche 2021-06-17 62 };
08a9ad8bf60738 Bart Van Assche 2021-06-17 @63 struct dd_blkcg *blkcg = dd_blkcg_from_pd(pd);
08a9ad8bf60738 Bart Van Assche 2021-06-17 64 u8 prio;
08a9ad8bf60738 Bart Van Assche 2021-06-17 65
08a9ad8bf60738 Bart Van Assche 2021-06-17 66 for (prio = 0; prio < ARRAY_SIZE(blkcg->stats->stats); prio++)
d88da017031f7e Christoph Hellwig 2021-05-04 67 seq_printf(s, " [%s] dispatched=%u inserted=%u merged=%u",
08a9ad8bf60738 Bart Van Assche 2021-06-17 68 prio_class_name[prio],
08a9ad8bf60738 Bart Van Assche 2021-06-17 69 ddcg_sum(blkcg, dispatched, prio) +
08a9ad8bf60738 Bart Van Assche 2021-06-17 70 ddcg_sum(blkcg, merged, prio) -
08a9ad8bf60738 Bart Van Assche 2021-06-17 71 ddcg_sum(blkcg, completed, prio),
08a9ad8bf60738 Bart Van Assche 2021-06-17 72 ddcg_sum(blkcg, inserted, prio) -
08a9ad8bf60738 Bart Van Assche 2021-06-17 73 ddcg_sum(blkcg, completed, prio),
08a9ad8bf60738 Bart Van Assche 2021-06-17 74 ddcg_sum(blkcg, merged, prio));
08a9ad8bf60738 Bart Van Assche 2021-06-17 75
d88da017031f7e Christoph Hellwig 2021-05-04 76 return true;
08a9ad8bf60738 Bart Van Assche 2021-06-17 77 }
08a9ad8bf60738 Bart Van Assche 2021-06-17 78
08a9ad8bf60738 Bart Van Assche 2021-06-17 79 static struct blkg_policy_data *dd_pd_alloc(gfp_t gfp, struct request_queue *q,
08a9ad8bf60738 Bart Van Assche 2021-06-17 80 struct blkcg *blkcg)
08a9ad8bf60738 Bart Van Assche 2021-06-17 81 {
08a9ad8bf60738 Bart Van Assche 2021-06-17 82 struct dd_blkg *pd;
08a9ad8bf60738 Bart Van Assche 2021-06-17 83
08a9ad8bf60738 Bart Van Assche 2021-06-17 84 pd = kzalloc(sizeof(*pd), gfp);
08a9ad8bf60738 Bart Van Assche 2021-06-17 85 if (!pd)
08a9ad8bf60738 Bart Van Assche 2021-06-17 86 return NULL;
08a9ad8bf60738 Bart Van Assche 2021-06-17 87 return &pd->pd;
08a9ad8bf60738 Bart Van Assche 2021-06-17 88 }
08a9ad8bf60738 Bart Van Assche 2021-06-17 89
08a9ad8bf60738 Bart Van Assche 2021-06-17 90 static void dd_pd_free(struct blkg_policy_data *pd)
08a9ad8bf60738 Bart Van Assche 2021-06-17 91 {
08a9ad8bf60738 Bart Van Assche 2021-06-17 92 struct dd_blkg *dd_blkg = container_of(pd, typeof(*dd_blkg), pd);
08a9ad8bf60738 Bart Van Assche 2021-06-17 93
08a9ad8bf60738 Bart Van Assche 2021-06-17 94 kfree(dd_blkg);
08a9ad8bf60738 Bart Van Assche 2021-06-17 95 }
08a9ad8bf60738 Bart Van Assche 2021-06-17 96
08a9ad8bf60738 Bart Van Assche 2021-06-17 97 static struct blkcg_policy dd_blkcg_policy = {
08a9ad8bf60738 Bart Van Assche 2021-06-17 98 .cpd_alloc_fn = dd_cpd_alloc,
08a9ad8bf60738 Bart Van Assche 2021-06-17 99 .cpd_free_fn = dd_cpd_free,
08a9ad8bf60738 Bart Van Assche 2021-06-17 100
08a9ad8bf60738 Bart Van Assche 2021-06-17 101 .pd_alloc_fn = dd_pd_alloc,
08a9ad8bf60738 Bart Van Assche 2021-06-17 102 .pd_free_fn = dd_pd_free,
08a9ad8bf60738 Bart Van Assche 2021-06-17 @103 .pd_stat_fn = dd_pd_stat,
08a9ad8bf60738 Bart Van Assche 2021-06-17 104 };
08a9ad8bf60738 Bart Van Assche 2021-06-17 105
:::::: The code at line 63 was first introduced by commit
:::::: 08a9ad8bf607388d768a341957d53eae64250c2d block/mq-deadline: Add cgroup support
:::::: TO: Bart Van Assche <bvanassche@....org>
:::::: CC: Jens Axboe <axboe@...nel.dk>
---
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" (39250 bytes)
Powered by blists - more mailing lists