lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202107281826.I9nYo6xA-lkp@intel.com>
Date:   Wed, 28 Jul 2021 18:30:34 +0800
From:   kernel test robot <lkp@...el.com>
To:     Christoph Hellwig <hch@....de>
Cc:     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:
 'pd' undeclared; did you mean 'fd'?

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: microblaze-randconfig-r031-20210728 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 10.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
        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=gcc-10.3.0 make.cross O=build_dir ARCH=microblaze SHELL=/bin/bash

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: 'struct iolatency_grp' declared inside parameter list will not be visible outside of this definition or declaration
      55 | static bool dd_pd_stat(struct iolatency_grp *iolat, struct seq_file *s)
         |                               ^~~~~~~~~~~~~
   block/mq-deadline-cgroup.c: In function 'dd_pd_stat':
>> block/mq-deadline-cgroup.c:63:44: error: 'pd' undeclared (first use in this function); did you mean 'fd'?
      63 |  struct dd_blkcg *blkcg = dd_blkcg_from_pd(pd);
         |                                            ^~
         |                                            fd
   block/mq-deadline-cgroup.c:63:44: note: each undeclared identifier is reported only once for each function it appears in
   block/mq-deadline-cgroup.c: At top level:
>> block/mq-deadline-cgroup.c:103:17: error: initialization of 'bool (*)(struct blkg_policy_data *, struct seq_file *)' {aka '_Bool (*)(struct blkg_policy_data *, struct seq_file *)'} from incompatible pointer type 'bool (*)(struct iolatency_grp *, struct seq_file *)' {aka '_Bool (*)(struct iolatency_grp *, struct seq_file *)'} [-Werror=incompatible-pointer-types]
     103 |  .pd_stat_fn  = dd_pd_stat,
         |                 ^~~~~~~~~~
   block/mq-deadline-cgroup.c:103:17: note: (near initialization for 'dd_blkcg_policy.pd_stat_fn')
   cc1: some warnings being treated as errors


vim +63 block/mq-deadline-cgroup.c

08a9ad8bf607388 Bart Van Assche   2021-06-17   54  
d88da017031f7e4 Christoph Hellwig 2021-05-04  @55  static bool dd_pd_stat(struct iolatency_grp *iolat, struct seq_file *s)
08a9ad8bf607388 Bart Van Assche   2021-06-17   56  {
08a9ad8bf607388 Bart Van Assche   2021-06-17   57  	static const char *const prio_class_name[] = {
08a9ad8bf607388 Bart Van Assche   2021-06-17   58  		[IOPRIO_CLASS_NONE]	= "NONE",
08a9ad8bf607388 Bart Van Assche   2021-06-17   59  		[IOPRIO_CLASS_RT]	= "RT",
08a9ad8bf607388 Bart Van Assche   2021-06-17   60  		[IOPRIO_CLASS_BE]	= "BE",
08a9ad8bf607388 Bart Van Assche   2021-06-17   61  		[IOPRIO_CLASS_IDLE]	= "IDLE",
08a9ad8bf607388 Bart Van Assche   2021-06-17   62  	};
08a9ad8bf607388 Bart Van Assche   2021-06-17  @63  	struct dd_blkcg *blkcg = dd_blkcg_from_pd(pd);
08a9ad8bf607388 Bart Van Assche   2021-06-17   64  	u8 prio;
08a9ad8bf607388 Bart Van Assche   2021-06-17   65  
08a9ad8bf607388 Bart Van Assche   2021-06-17   66  	for (prio = 0; prio < ARRAY_SIZE(blkcg->stats->stats); prio++)
d88da017031f7e4 Christoph Hellwig 2021-05-04   67  		seq_printf(s, " [%s] dispatched=%u inserted=%u merged=%u",
08a9ad8bf607388 Bart Van Assche   2021-06-17   68  			prio_class_name[prio],
08a9ad8bf607388 Bart Van Assche   2021-06-17   69  			ddcg_sum(blkcg, dispatched, prio) +
08a9ad8bf607388 Bart Van Assche   2021-06-17   70  			ddcg_sum(blkcg, merged, prio) -
08a9ad8bf607388 Bart Van Assche   2021-06-17   71  			ddcg_sum(blkcg, completed, prio),
08a9ad8bf607388 Bart Van Assche   2021-06-17   72  			ddcg_sum(blkcg, inserted, prio) -
08a9ad8bf607388 Bart Van Assche   2021-06-17   73  			ddcg_sum(blkcg, completed, prio),
08a9ad8bf607388 Bart Van Assche   2021-06-17   74  			ddcg_sum(blkcg, merged, prio));
08a9ad8bf607388 Bart Van Assche   2021-06-17   75  
d88da017031f7e4 Christoph Hellwig 2021-05-04   76  	return true;
08a9ad8bf607388 Bart Van Assche   2021-06-17   77  }
08a9ad8bf607388 Bart Van Assche   2021-06-17   78  
08a9ad8bf607388 Bart Van Assche   2021-06-17   79  static struct blkg_policy_data *dd_pd_alloc(gfp_t gfp, struct request_queue *q,
08a9ad8bf607388 Bart Van Assche   2021-06-17   80  					    struct blkcg *blkcg)
08a9ad8bf607388 Bart Van Assche   2021-06-17   81  {
08a9ad8bf607388 Bart Van Assche   2021-06-17   82  	struct dd_blkg *pd;
08a9ad8bf607388 Bart Van Assche   2021-06-17   83  
08a9ad8bf607388 Bart Van Assche   2021-06-17   84  	pd = kzalloc(sizeof(*pd), gfp);
08a9ad8bf607388 Bart Van Assche   2021-06-17   85  	if (!pd)
08a9ad8bf607388 Bart Van Assche   2021-06-17   86  		return NULL;
08a9ad8bf607388 Bart Van Assche   2021-06-17   87  	return &pd->pd;
08a9ad8bf607388 Bart Van Assche   2021-06-17   88  }
08a9ad8bf607388 Bart Van Assche   2021-06-17   89  
08a9ad8bf607388 Bart Van Assche   2021-06-17   90  static void dd_pd_free(struct blkg_policy_data *pd)
08a9ad8bf607388 Bart Van Assche   2021-06-17   91  {
08a9ad8bf607388 Bart Van Assche   2021-06-17   92  	struct dd_blkg *dd_blkg = container_of(pd, typeof(*dd_blkg), pd);
08a9ad8bf607388 Bart Van Assche   2021-06-17   93  
08a9ad8bf607388 Bart Van Assche   2021-06-17   94  	kfree(dd_blkg);
08a9ad8bf607388 Bart Van Assche   2021-06-17   95  }
08a9ad8bf607388 Bart Van Assche   2021-06-17   96  
08a9ad8bf607388 Bart Van Assche   2021-06-17   97  static struct blkcg_policy dd_blkcg_policy = {
08a9ad8bf607388 Bart Van Assche   2021-06-17   98  	.cpd_alloc_fn		= dd_cpd_alloc,
08a9ad8bf607388 Bart Van Assche   2021-06-17   99  	.cpd_free_fn		= dd_cpd_free,
08a9ad8bf607388 Bart Van Assche   2021-06-17  100  
08a9ad8bf607388 Bart Van Assche   2021-06-17  101  	.pd_alloc_fn		= dd_pd_alloc,
08a9ad8bf607388 Bart Van Assche   2021-06-17  102  	.pd_free_fn		= dd_pd_free,
08a9ad8bf607388 Bart Van Assche   2021-06-17 @103  	.pd_stat_fn		= dd_pd_stat,
08a9ad8bf607388 Bart Van Assche   2021-06-17  104  };
08a9ad8bf607388 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" (30173 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ