[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201808231901.UEJbso1X%fengguang.wu@intel.com>
Date: Thu, 23 Aug 2018 19:58:42 +0800
From: kbuild test robot <lkp@...el.com>
To: Weikang Shi <swkhack@...il.com>
Cc: kbuild-all@...org, akpm@...ux-foundation.org,
alexander.h.duyck@...el.com, mhocko@...e.com, vbabka@...e.cz,
mgorman@...e.de, l.stach@...gutronix.de, vdavydov.dev@...il.com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
my_email@...il.com, Weikang Shi <swkhack@...il.com>
Subject: Re: [PATCH] fs: fix local var type
Hi Weikang,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v4.18 next-20180822]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Weikang-Shi/fs-fix-local-var-type/20180823-180758
config: x86_64-randconfig-x009-201833 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
In file included from include/linux/list.h:9:0,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/seq_file.c:10:
fs/seq_file.c: In function 'seq_hex_dump':
include/linux/kernel.h:845:29: warning: comparison of distinct pointer types lacks a cast
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
^
include/linux/kernel.h:859:4: note: in expansion of macro '__typecheck'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~
include/linux/kernel.h:869:24: note: in expansion of macro '__safe_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~
include/linux/kernel.h:878:19: note: in expansion of macro '__careful_cmp'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~
>> fs/seq_file.c:860:13: note: in expansion of macro 'min'
linelen = min(remaining, rowsize);
^~~
vim +/min +860 fs/seq_file.c
839cc2a9 Tetsuo Handa 2013-11-14 843
37607102 Andy Shevchenko 2015-09-09 844 /* A complete analogue of print_hex_dump() */
37607102 Andy Shevchenko 2015-09-09 845 void seq_hex_dump(struct seq_file *m, const char *prefix_str, int prefix_type,
37607102 Andy Shevchenko 2015-09-09 846 int rowsize, int groupsize, const void *buf, size_t len,
37607102 Andy Shevchenko 2015-09-09 847 bool ascii)
37607102 Andy Shevchenko 2015-09-09 848 {
37607102 Andy Shevchenko 2015-09-09 849 const u8 *ptr = buf;
5f9924ac Weikang Shi 2018-08-23 850 int i, linelen;
5f9924ac Weikang Shi 2018-08-23 851 size_t remaining = len;
8b91a318 Andy Shevchenko 2015-11-06 852 char *buffer;
8b91a318 Andy Shevchenko 2015-11-06 853 size_t size;
37607102 Andy Shevchenko 2015-09-09 854 int ret;
37607102 Andy Shevchenko 2015-09-09 855
37607102 Andy Shevchenko 2015-09-09 856 if (rowsize != 16 && rowsize != 32)
37607102 Andy Shevchenko 2015-09-09 857 rowsize = 16;
37607102 Andy Shevchenko 2015-09-09 858
37607102 Andy Shevchenko 2015-09-09 859 for (i = 0; i < len && !seq_has_overflowed(m); i += rowsize) {
37607102 Andy Shevchenko 2015-09-09 @860 linelen = min(remaining, rowsize);
37607102 Andy Shevchenko 2015-09-09 861 remaining -= rowsize;
37607102 Andy Shevchenko 2015-09-09 862
37607102 Andy Shevchenko 2015-09-09 863 switch (prefix_type) {
37607102 Andy Shevchenko 2015-09-09 864 case DUMP_PREFIX_ADDRESS:
37607102 Andy Shevchenko 2015-09-09 865 seq_printf(m, "%s%p: ", prefix_str, ptr + i);
37607102 Andy Shevchenko 2015-09-09 866 break;
37607102 Andy Shevchenko 2015-09-09 867 case DUMP_PREFIX_OFFSET:
37607102 Andy Shevchenko 2015-09-09 868 seq_printf(m, "%s%.8x: ", prefix_str, i);
37607102 Andy Shevchenko 2015-09-09 869 break;
37607102 Andy Shevchenko 2015-09-09 870 default:
37607102 Andy Shevchenko 2015-09-09 871 seq_printf(m, "%s", prefix_str);
37607102 Andy Shevchenko 2015-09-09 872 break;
37607102 Andy Shevchenko 2015-09-09 873 }
37607102 Andy Shevchenko 2015-09-09 874
8b91a318 Andy Shevchenko 2015-11-06 875 size = seq_get_buf(m, &buffer);
37607102 Andy Shevchenko 2015-09-09 876 ret = hex_dump_to_buffer(ptr + i, linelen, rowsize, groupsize,
8b91a318 Andy Shevchenko 2015-11-06 877 buffer, size, ascii);
8b91a318 Andy Shevchenko 2015-11-06 878 seq_commit(m, ret < size ? ret : -1);
8b91a318 Andy Shevchenko 2015-11-06 879
37607102 Andy Shevchenko 2015-09-09 880 seq_putc(m, '\n');
37607102 Andy Shevchenko 2015-09-09 881 }
37607102 Andy Shevchenko 2015-09-09 882 }
37607102 Andy Shevchenko 2015-09-09 883 EXPORT_SYMBOL(seq_hex_dump);
37607102 Andy Shevchenko 2015-09-09 884
:::::: The code at line 860 was first introduced by commit
:::::: 37607102c4426cf92aeb5da1b1d9a79ba6d95e3f seq_file: provide an analogue of print_hex_dump()
:::::: TO: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (30949 bytes)
Powered by blists - more mailing lists