From: kbuild test robot <lkp@intel.com>
To: Weikang Shi <swkhack@gmail.com>
Cc: kbuild-all@01.org, akpm@linux-foundation.org,
alexander.h.duyck@intel.com, mhocko@suse.com, vbabka@suse.cz,
mgorman@suse.de, l.stach@pengutronix.de, vdavydov.dev@gmail.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
my_email@gmail.com, Weikang Shi <swkhack@gmail.com>
Subject: Re: [PATCH] fs: fix local var type
Date: Thu, 23 Aug 2018 19:58:42 +0800 [thread overview]
Message-ID: <201808231901.UEJbso1X%fengguang.wu@intel.com> (raw)
In-Reply-To: <1535014754-31918-1-git-send-email-swkhack@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4854 bytes --]
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@linux.intel.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30949 bytes --]
next prev parent reply other threads:[~2018-08-23 12:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-23 8:59 [PATCH] fs: fix local var type Weikang Shi
2018-08-23 11:13 ` Michal Hocko
2018-08-23 11:23 ` David Laight
2018-08-23 11:58 ` kbuild test robot [this message]
2018-08-24 5:32 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201808231901.UEJbso1X%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.h.duyck@intel.com \
--cc=kbuild-all@01.org \
--cc=l.stach@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.com \
--cc=my_email@gmail.com \
--cc=swkhack@gmail.com \
--cc=vbabka@suse.cz \
--cc=vdavydov.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).