[staging:staging-testing 1361/1384] drivers/staging/lustre/lnet/lnet/api-ni.c:2274:10: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'unsigned int'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head:   83bf09ba56aafb8c1112150cbce05b44dd476572
commit: 4e9fec1ea6903bd0b08a2e95659b83261f9c2ae9 [1361/1384] Staging: lustre: api-ni: Remove int typecast of offsetof().
config: i386-allmodconfig (attached as .config)
reproduce:
        git checkout 4e9fec1ea6903bd0b08a2e95659b83261f9c2ae9
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from drivers/staging/lustre/lnet/lnet/../../include/linux/lnet/../libcfs/libcfs.h:110:0,
                    from drivers/staging/lustre/lnet/lnet/../../include/linux/lnet/lib-lnet.h:38,
                    from drivers/staging/lustre/lnet/lnet/api-ni.c:41:
   drivers/staging/lustre/lnet/lnet/api-ni.c: In function 'lnet_ping':
>> drivers/staging/lustre/lnet/lnet/api-ni.c:2274:10: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'unsigned int' [-Wformat=]
      CERROR("%s: Short reply %d(%ld min)\n", libcfs_id2str(id),
             ^
   drivers/staging/lustre/lnet/lnet/../../include/linux/lnet/../libcfs/libcfs_debug.h:218:30: note: in definition of macro '__CDEBUG'
      libcfs_debug_msg(&msgdata, format, ## __VA_ARGS__); \
                                 ^
>> drivers/staging/lustre/lnet/lnet/../../include/linux/lnet/../libcfs/libcfs_debug.h:232:29: note: in expansion of macro 'CDEBUG_LIMIT'
    #define CERROR(format, ...) CDEBUG_LIMIT(D_ERROR, format, ## __VA_ARGS__)
                                ^
>> drivers/staging/lustre/lnet/lnet/api-ni.c:2274:3: note: in expansion of macro 'CERROR'
      CERROR("%s: Short reply %d(%ld min)\n", libcfs_id2str(id),
      ^
   drivers/staging/lustre/lnet/lnet/api-ni.c:2283:10: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'unsigned int' [-Wformat=]
      CERROR("%s: Short reply %d(%ld expected)\n", libcfs_id2str(id),
             ^
   drivers/staging/lustre/lnet/lnet/../../include/linux/lnet/../libcfs/libcfs_debug.h:218:30: note: in definition of macro '__CDEBUG'
      libcfs_debug_msg(&msgdata, format, ## __VA_ARGS__); \
                                 ^
>> drivers/staging/lustre/lnet/lnet/../../include/linux/lnet/../libcfs/libcfs_debug.h:232:29: note: in expansion of macro 'CDEBUG_LIMIT'
    #define CERROR(format, ...) CDEBUG_LIMIT(D_ERROR, format, ## __VA_ARGS__)
                                ^
   drivers/staging/lustre/lnet/lnet/api-ni.c:2283:3: note: in expansion of macro 'CERROR'
      CERROR("%s: Short reply %d(%ld expected)\n", libcfs_id2str(id),
      ^

vim +2274 drivers/staging/lustre/lnet/lnet/api-ni.c

  2258	
  2259		if (info->pi_magic == __swab32(LNET_PROTO_PING_MAGIC)) {
  2260			lnet_swap_pinginfo(info);
  2261		} else if (info->pi_magic != LNET_PROTO_PING_MAGIC) {
  2262			CERROR("%s: Unexpected magic %08x\n",
  2263			       libcfs_id2str(id), info->pi_magic);
  2264			goto out_1;
  2265		}
  2266	
  2267		if (!(info->pi_features & LNET_PING_FEAT_NI_STATUS)) {
  2268			CERROR("%s: ping w/o NI status: 0x%x\n",
  2269			       libcfs_id2str(id), info->pi_features);
  2270			goto out_1;
  2271		}
  2272	
  2273		if (nob < offsetof(lnet_ping_info_t, pi_ni[0])) {
> 2274			CERROR("%s: Short reply %d(%ld min)\n", libcfs_id2str(id),
  2275			       nob, offsetof(lnet_ping_info_t, pi_ni[0]));
  2276			goto out_1;
  2277		}
  2278	
  2279		if (info->pi_nnis < n_ids)
  2280			n_ids = info->pi_nnis;
  2281	
  2282		if (nob < offsetof(lnet_ping_info_t, pi_ni[n_ids])) {

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

Attachment: .config.gz
Description: Binary data

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux