linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Michal Marek" <mmarek@suse.com>,
	"Макс Жуков" <mussitantesmortem@gmail.com>,
	nicolas.ferre@atmel.com,
	"Nicolas Pitre" <nicolas.pitre@linaro.org>,
	robert.jarzmik@free.fr, yamada.masahiro@socionext.com,
	"Linux Kbuild mailing list" <linux-kbuild@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Bob Peterson" <rpeterso@redhat.com>
Subject: Re: [GIT PULL] kbuild updates for v4.7-rc1
Date: Fri, 27 May 2016 13:20:29 -0700	[thread overview]
Message-ID: <CA+55aFzQ4oe6cT5xf=3xT1d6ji2L_her8AmJxpsixFw_GavDvg@mail.gmail.com> (raw)
In-Reply-To: <9633365.kM71HHzq9d@wuerfel>

On Fri, May 27, 2016 at 1:04 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>
> In fact, the patch that I have in my private tree that was hiding the
> warning for me on x86 is one that removes all instances of IS_ERR_VALUE()
> with arguments other than 'unsigned long', see http://pastebin.com/uYa2mkgC
> for reference.

Please just send me that patch, we need to do this (and then add a
cast to pointer (and back to unsigned long) in IS_ERR_VALUE() so that
we get warnings for when that macro is mis-used.

I didn't look at the details of your patch, but I did look at several
IS_ERR_VALUE() uses in the standard kernel, and they were basically
all wrong. Even the ones that used it for the rigth reason (vm_brk()
that returns a pointer or an error in an "unsigned long") had actively
screwed up and truncated that (correct) unsigned long value to "int"
before doing the IS_ERR_VALUE(), which made it all wrong again.

And the other users just looked entirely bogus, and were all just
"zero or negative error code" that has nothing to do with
IS_ERR_VALUE(). The code should just check against zero, not use that
macro that was designed for something different.

                Linus

  reply	other threads:[~2016-05-27 20:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26 20:33 [GIT PULL] kbuild updates for v4.7-rc1 Michal Marek
2016-05-27  5:26 ` Linus Torvalds
2016-05-27 12:33   ` Arnd Bergmann
2016-05-27 17:23     ` Linus Torvalds
2016-05-27 18:28       ` Linus Torvalds
2016-05-27 20:04       ` Arnd Bergmann
2016-05-27 20:20         ` Linus Torvalds [this message]
2016-05-27 21:36           ` Arnd Bergmann
2016-05-27 21:52           ` Al Viro

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='CA+55aFzQ4oe6cT5xf=3xT1d6ji2L_her8AmJxpsixFw_GavDvg@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.com \
    --cc=mussitantesmortem@gmail.com \
    --cc=nicolas.ferre@atmel.com \
    --cc=nicolas.pitre@linaro.org \
    --cc=robert.jarzmik@free.fr \
    --cc=rpeterso@redhat.com \
    --cc=yamada.masahiro@socionext.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).