mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: "'Andy Shevchenko'" <andy.shevchenko@gmail.com>,
	Colin King <colin.king@canonical.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	"linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] rtc: tx4939: avoid unintended sign extension on a 24 bit shift
Date: Fri, 16 Feb 2018 15:14:51 +0000	[thread overview]
Message-ID: <d943a549d051472c98e3c163dc4245ac@AcuMS.aculab.com> (raw)
In-Reply-To: <CAHp75Vf+ky3Ma1b20x57i9z+ykS1j8k1LTuOT3f=Jbu5kCeeAQ@mail.gmail.com>

From: Andy Shevchenko
> Sent: 16 February 2018 14:23
...
> Wouldn't be better to use le32_to_cpu() or get_unaligned()?

Or shoot the members of the ANSI C committee who insisted on
promotion of unsigned char/short to int and sign preserving
promotion of int to unsigned long :-)

	David

      reply	other threads:[~2018-02-16 15:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15 18:59 Colin King
2018-02-15 19:25 ` NACK: " Colin Ian King
2018-02-16 14:22 ` Andy Shevchenko
2018-02-16 15:14   ` David Laight [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=d943a549d051472c98e3c163dc4245ac@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.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®