mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] Device properties framework update for v4.18-rc1
Date: Wed, 06 Jun 2018 10:45:05 +0300	[thread overview]
Message-ID: <2fe122f7fa0040509dcc049b48e7934b54ee0a55.camel@linux.intel.com> (raw)
In-Reply-To: <CA+55aFw8yUOweiQSEp-ZHzEeSAGggZ0-Ksy0e4GQgEhKvmwLog@mail.gmail.com>

On Tue, 2018-06-05 at 10:39 -0700, Linus Torvalds wrote:
> On Tue, Jun 5, 2018 at 10:30 AM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> > 
> > Honestly, this looks questionable to me.
> > 
> > I'm not talking about the changes themselves - I can live with them.
> > But the _rationale_ is pure and utter garbage, and dangerously so.
> 
> Side note: I've merged it, and it's going through my build tests, so
> it's really not that I hate the code.

Thanks for merging.

> 
> But I really find that kind of one-sided rationale that ignores
> reality unacceptable.

Yeah, there were few reasons why I decide to make that patch (OK, it
seems I staked on not the best reason).

Like Rafael said there is no need to use it here and code initially was
without union aliasing be in place.

> And I find it dangerous, because it *sounds* so "obviously correct" to
> people who don't know any better. If you don't know that gcc
> explicitly says that you should use unions to do type punning to avoid
> aliasing issues, you might believe that union type punning is a bad
> thing from that commit message.
> 
> So it's dangerously misleading, because lots of people have a
> dangerous reverence for paper over reality.

I agree with you, because type punning via unions feels natural and
that's why I even didn't notice when made a refactoring there several
releases before.

> In programming, "Appeal to Standards" should be considered a potential
> logical fallacy. Standards have their place, but they definitely have
> their caveats too.

Yes, even outside of programming.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

      parent reply	other threads:[~2018-06-06  7:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04 11:31 Rafael J. Wysocki
2018-06-05 17:30 ` Linus Torvalds
2018-06-05 17:39   ` Linus Torvalds
2018-06-05 22:33     ` Rafael J. Wysocki
2018-06-06  7:45     ` Andy Shevchenko [this message]

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=2fe122f7fa0040509dcc049b48e7934b54ee0a55.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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®