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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202209260929.QOOnrwMO-lkp@intel.com>
Date:   Mon, 26 Sep 2022 14:02:04 +0800
From:   kernel test robot <lkp@...el.com>
To:     Elijah Conners <business@...jahpepe.com>, axboe <axboe@...nel.dk>
Cc:     kbuild-all@...ts.01.org, tj <tj@...nel.org>,
        newella <newella@...com>,
        linux-block <linux-block@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        cgroups <cgroups@...r.kernel.org>
Subject: Re: [PATCH] blk-iocost: explicitly declare long in seq_printf

Hi Elijah,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on axboe-block/for-next]
[also build test WARNING on linus/master v6.0-rc7 next-20220923]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Elijah-Conners/blk-iocost-explicitly-declare-long-in-seq_printf/20220926-044530
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: x86_64-defconfig
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/69c3e0ff7554edafb2667c06d60c974f1f1f6246
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Elijah-Conners/blk-iocost-explicitly-declare-long-in-seq_printf/20220926-044530
        git checkout 69c3e0ff7554edafb2667c06d60c974f1f1f6246
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   block/blk-iocost.c: In function 'ioc_weight_prfill':
>> block/blk-iocost.c:3038:38: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'u32' {aka 'unsigned int'} [-Wformat=]
    3038 |                 seq_printf(sf, "%s %ld\n", dname, iocg->cfg_weight / WEIGHT_ONE);
         |                                    ~~^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                      |                             |
         |                                      long int                      u32 {aka unsigned int}
         |                                    %d
   block/blk-iocost.c: In function 'ioc_weight_show':
>> block/blk-iocost.c:3048:35: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'unsigned int' [-Wformat=]
    3048 |         seq_printf(sf, "default %ld\n", iocc->dfl_weight / WEIGHT_ONE);
         |                                 ~~^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                   |                      |
         |                                   long int               unsigned int
         |                                 %d


vim +3038 block/blk-iocost.c

  3030	
  3031	static u64 ioc_weight_prfill(struct seq_file *sf, struct blkg_policy_data *pd,
  3032				     int off)
  3033	{
  3034		const char *dname = blkg_dev_name(pd->blkg);
  3035		struct ioc_gq *iocg = pd_to_iocg(pd);
  3036	
  3037		if (dname && iocg->cfg_weight)
> 3038			seq_printf(sf, "%s %ld\n", dname, iocg->cfg_weight / WEIGHT_ONE);
  3039		return 0;
  3040	}
  3041	
  3042	
  3043	static int ioc_weight_show(struct seq_file *sf, void *v)
  3044	{
  3045		struct blkcg *blkcg = css_to_blkcg(seq_css(sf));
  3046		struct ioc_cgrp *iocc = blkcg_to_iocc(blkcg);
  3047	
> 3048		seq_printf(sf, "default %ld\n", iocc->dfl_weight / WEIGHT_ONE);
  3049		blkcg_print_blkgs(sf, blkcg, ioc_weight_prfill,
  3050				  &blkcg_policy_iocost, seq_cft(sf)->private, false);
  3051		return 0;
  3052	}
  3053	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (136058 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ