From: "Рустафа Джамурахметов" <zbr@ioremap.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Nazarewicz <mina86@mina86.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drivers: w1: make w1_slave::flags long to avoid casts
Date: Sat, 02 Nov 2013 08:10:33 +0400 [thread overview]
Message-ID: <7061383365433@web15j.yandex.ru> (raw)
In-Reply-To: <20131101123041.d08adc9739cf6e733d822770@linux-foundation.org>
Hi
01.11.2013, 23:30, "Andrew Morton" <akpm@linux-foundation.org>:
> set_bit() operates on longs. So if we do
>
> struct foo {
> u32 a;
> u32 b;
> } f;
>
> ...
> set_bit(0, (long *)&f.a);
> ...
>
> then we'll scribble on f.b on a big-endian 64-bit machine.
Argh, why would we just don't do that? Its in-memory field, it can be anything,
I wouldn't be surprised if it even can be non-atomic because of proper locks already
being held
next prev parent reply other threads:[~2013-11-02 4:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-26 11:56 [PATCH] drivers: w1: make w1_slave::flags long to avoid casts Michal Nazarewicz
2013-10-30 22:59 ` Andrew Morton
2013-10-31 9:11 ` Michal Nazarewicz
2013-11-01 16:01 ` Evgeniy Polyakov
2013-11-01 19:30 ` Andrew Morton
2013-11-02 4:10 ` Рустафа Джамурахметов [this message]
2013-11-02 16:58 ` Michal Nazarewicz
2013-11-02 17:19 ` Рустафа Джамурахметов
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=7061383365433@web15j.yandex.ru \
--to=zbr@ioremap.net \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mina86@mina86.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