linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [hch-misc:seq_get_buf 2/5] block/mq-deadline-cgroup.c:63:44: error: use of undeclared identifier 'pd'
@ 2021-07-28 10:52 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-07-28 10:52 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: clang-built-linux, kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 6386 bytes --]

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@intel.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@acm.org>
:::::: CC: Jens Axboe <axboe@kernel.dk>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39250 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-28 10:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28 10:52 [hch-misc:seq_get_buf 2/5] block/mq-deadline-cgroup.c:63:44: error: use of undeclared identifier 'pd' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).