mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Andrzej Hajda <a.hajda@samsung.com>
Cc: kbuild-all@01.org, Andrew Morton <akpm@linux-foundation.org>,
	open list <linux-kernel@vger.kernel.org>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH] err.h: allow IS_ERR_VALUE to handle properly more types
Date: Thu, 7 Jan 2016 23:48:26 +0800	[thread overview]
Message-ID: <201601072342.xanwLeaS%fengguang.wu@intel.com> (raw)
In-Reply-To: <1452178705-2200-1-git-send-email-a.hajda@samsung.com>

[-- Attachment #1: Type: text/plain, Size: 5166 bytes --]

Hi Andrzej,

[auto build test WARNING on v4.4-rc8]
[also build test WARNING on next-20160107]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Andrzej-Hajda/err-h-allow-IS_ERR_VALUE-to-handle-properly-more-types/20160107-230216
config: i386-allmodconfig (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from arch/x86/include/asm/processor.h:31:0,
                    from arch/x86/include/asm/thread_info.h:52,
                    from include/linux/thread_info.h:54,
                    from arch/x86/include/asm/preempt.h:6,
                    from include/linux/preempt.h:59,
                    from include/linux/spinlock.h:50,
                    from drivers/staging/rtl8723au/include/osdep_service.h:22,
                    from drivers/staging/rtl8723au/include/rtl8723a_sreset.h:18,
                    from drivers/staging/rtl8723au/hal/rtl8723a_sreset.c:17:
   include/linux/err.h: In function 'IS_ERR':
>> include/linux/err.h:21:42: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
    #define IS_ERR_VALUE(x) ((typeof(x))(-1) < 0 \
                                             ^
>> include/linux/err.h:37:9: note: in expansion of macro 'IS_ERR_VALUE'
     return IS_ERR_VALUE((unsigned long)ptr);
            ^
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/preempt.h:9,
                    from include/linux/spinlock.h:50,
                    from drivers/staging/rtl8723au/include/osdep_service.h:22,
                    from drivers/staging/rtl8723au/include/rtl8723a_sreset.h:18,
                    from drivers/staging/rtl8723au/hal/rtl8723a_sreset.c:17:
   include/linux/err.h:22:20: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
        ? unlikely((x) < 0) \
                       ^
   include/linux/compiler.h:166:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
>> include/linux/err.h:37:9: note: in expansion of macro 'IS_ERR_VALUE'
     return IS_ERR_VALUE((unsigned long)ptr);
            ^
   In file included from arch/x86/include/asm/processor.h:31:0,
                    from arch/x86/include/asm/thread_info.h:52,
                    from include/linux/thread_info.h:54,
                    from arch/x86/include/asm/preempt.h:6,
                    from include/linux/preempt.h:59,
                    from include/linux/spinlock.h:50,
                    from drivers/staging/rtl8723au/include/osdep_service.h:22,
                    from drivers/staging/rtl8723au/include/rtl8723a_sreset.h:18,
                    from drivers/staging/rtl8723au/hal/rtl8723a_sreset.c:17:
   include/linux/err.h: In function 'IS_ERR_OR_NULL':
>> include/linux/err.h:21:42: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
    #define IS_ERR_VALUE(x) ((typeof(x))(-1) < 0 \
                                             ^
   include/linux/err.h:42:17: note: in expansion of macro 'IS_ERR_VALUE'
     return !ptr || IS_ERR_VALUE((unsigned long)ptr);
                    ^
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/preempt.h:9,
                    from include/linux/spinlock.h:50,
                    from drivers/staging/rtl8723au/include/osdep_service.h:22,
                    from drivers/staging/rtl8723au/include/rtl8723a_sreset.h:18,
                    from drivers/staging/rtl8723au/hal/rtl8723a_sreset.c:17:
   include/linux/err.h:22:20: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
        ? unlikely((x) < 0) \
                       ^
   include/linux/compiler.h:166:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   include/linux/err.h:42:17: note: in expansion of macro 'IS_ERR_VALUE'
     return !ptr || IS_ERR_VALUE((unsigned long)ptr);
                    ^

vim +21 include/linux/err.h

    15	 * error and pointer decisions.
    16	 */
    17	#define MAX_ERRNO	4095
    18	
    19	#ifndef __ASSEMBLY__
    20	
  > 21	#define IS_ERR_VALUE(x) ((typeof(x))(-1) < 0 \
    22					? unlikely((x) < 0) \
    23					: unlikely((x) >= (typeof(x))-MAX_ERRNO))
    24	
    25	static inline void * __must_check ERR_PTR(long error)
    26	{
    27		return (void *) error;
    28	}
    29	
    30	static inline long __must_check PTR_ERR(__force const void *ptr)
    31	{
    32		return (long) ptr;
    33	}
    34	
    35	static inline bool __must_check IS_ERR(__force const void *ptr)
    36	{
  > 37		return IS_ERR_VALUE((unsigned long)ptr);
    38	}
    39	
    40	static inline bool __must_check IS_ERR_OR_NULL(__force const void *ptr)

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 52542 bytes --]

  reply	other threads:[~2016-01-07 15:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-07 14:58 Andrzej Hajda
2016-01-07 15:48 ` kbuild test robot [this message]
2016-01-28  8:27   ` [PATCH v2] " Andrzej Hajda
2016-02-02  6:23     ` Andrew Morton
2016-02-02  8:22       ` Andrzej Hajda
2016-02-03  0:33     ` Andrew Morton
2016-02-03 10:53       ` Andrzej Hajda
2016-02-03 13:15       ` [PATCH v3] " Andrzej Hajda
2016-02-04 12:40         ` Arnd Bergmann
2016-02-04 14:44           ` Andrzej Hajda
2016-02-04 15:00             ` Arnd Bergmann
2016-02-04 15:10               ` Arnd Bergmann
2016-02-04 18:59           ` Andrew Morton
2016-02-05 10:52             ` Arnd Bergmann
2016-02-08  8:45               ` Andrzej Hajda
2016-02-08 12:01                 ` Arnd Bergmann
2016-02-09  1:44                   ` Al Viro
2016-02-09  8:42                   ` Andrzej Hajda
2016-02-10 21:01                     ` Arnd Bergmann
2016-02-11  7:00                       ` Andrzej Hajda
2016-02-11 16:39                         ` Arnd Bergmann
2016-02-12 14:45                           ` Andrzej Hajda
2016-02-11 21:14                         ` Al Viro
2016-02-04 23:37         ` Rasmus Villemoes
2016-02-10 15:16           ` Guenter Roeck
2016-01-15 13:45 ` [PATCH] " Andrzej Hajda

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=201601072342.xanwLeaS%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=a.hajda@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.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

all inboxes | Powered by JetHome®