tree:   
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git 
for-next
head:   ec9fab4b1951f0ae4d0e8492fcd4b402a7b499e2
commit: cf83a95f5e14f95a5cce73d3acea5c06c6a94adb [10/13] dm: add writecache 
target
config: x86_64-randconfig-x016-201820 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        git checkout cf83a95f5e14f95a5cce73d3acea5c06c6a94adb
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from drivers/md/dm-writecache.c:7:0:
   drivers/md/dm-writecache.c: In function 'writecache_status':
>> drivers/md/dm-writecache.c:2301:10: warning: format '%ld' expects argument 
>> of type 'long int', but argument 4 has type 'int' [-Wformat=]
      DMEMIT("%ld %llu %llu %llu", writecache_has_error(wc),
             ^
   include/linux/device-mapper.h:549:46: note: in definition of macro 'DMEMIT'
         0 : scnprintf(result + sz, maxlen - sz, x))
                                                 ^

vim +2301 drivers/md/dm-writecache.c

  2290  
  2291  static void writecache_status(struct dm_target *ti, status_type_t type,
  2292                                unsigned status_flags, char *result, 
unsigned maxlen)
  2293  {
  2294          struct dm_writecache *wc = ti->private;
  2295          unsigned extra_args;
  2296          unsigned sz = 0;
  2297          uint64_t x;
  2298  
  2299          switch (type) {
  2300          case STATUSTYPE_INFO:
> 2301                  DMEMIT("%ld %llu %llu %llu", writecache_has_error(wc),
  2302                         (unsigned long long)wc->n_blocks, (unsigned long 
long)wc->freelist_size,
  2303                         (unsigned long long)wc->writeback_size);
  2304                  break;
  2305          case STATUSTYPE_TABLE:
  2306                  DMEMIT("%c %s %s %u ", WC_MODE_PMEM(wc) ? 'p' : 's',
  2307                                  wc->dev->name, wc->ssd_dev->name, 
wc->block_size);
  2308                  extra_args = 0;
  2309                  if (wc->high_wm_percent_set)
  2310                          extra_args += 2;
  2311                  if (wc->low_wm_percent_set)
  2312                          extra_args += 2;
  2313                  if (wc->max_writeback_jobs_set)
  2314                          extra_args += 2;
  2315                  if (wc->autocommit_blocks_set)
  2316                          extra_args += 2;
  2317                  if (wc->autocommit_time_set)
  2318                          extra_args += 2;
  2319  #ifndef DM_WRITECACHE_ONLY_SSD
  2320                  if (wc->writeback_fua_set)
  2321                          extra_args++;
  2322  #endif
  2323                  DMEMIT("%u", extra_args);
  2324                  if (wc->high_wm_percent_set) {
  2325                          x = (uint64_t)wc->freelist_high_watermark * 100;
  2326                          x += wc->n_blocks / 2;
  2327                          do_div(x, (size_t)wc->n_blocks);
  2328                          DMEMIT(" high_watermark %u", 100 - (unsigned)x);
  2329                  }
  2330                  if (wc->low_wm_percent_set) {
  2331                          x = (uint64_t)wc->freelist_low_watermark * 100;
  2332                          x += wc->n_blocks / 2;
  2333                          do_div(x, (size_t)wc->n_blocks);
  2334                          DMEMIT(" low_watermark %u", 100 - (unsigned)x);
  2335                  }
  2336                  if (wc->max_writeback_jobs_set) {
  2337                          DMEMIT(" writeback_jobs %u", 
wc->max_writeback_jobs);
  2338                  }
  2339                  if (wc->autocommit_blocks_set) {
  2340                          DMEMIT(" autocommit_blocks %u", 
wc->autocommit_blocks);
  2341                  }
  2342                  if (wc->autocommit_time_set) {
  2343                          DMEMIT(" autocommit_time %u", 
jiffies_to_msecs(wc->autocommit_jiffies));
  2344                  }
  2345  #ifndef DM_WRITECACHE_ONLY_SSD
  2346                  if (wc->writeback_fua_set) {
  2347                          DMEMIT(" %sfua", wc->writeback_fua ? "" : "no");
  2348                  }
  2349  #endif
  2350                  break;
  2351          }
  2352  }
  2353  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to