From: Andreas Schwab <schwab@linux-m68k.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
"linux-arm-kernel\@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Kyle McMartin <kyle@mcmartin.ca>,
RTCLINUX <rtc-linux@googlegroups.com>,
Alessandro Zummo <a.zummo@towertech.it>,
"linuxppc-dev\@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
Linux-sh list <linux-sh@vger.kernel.org>,
Parisc List <linux-parisc@vger.kernel.org>,
linux-m68k <linux-m68k@vger.kernel.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/6] rtc: generic: allow building on all architectures
Date: Wed, 02 Mar 2016 10:28:40 +0100 [thread overview]
Message-ID: <mvmwpplns8n.fsf@hawking.suse.de> (raw)
In-Reply-To: <CAMuHMdW5+jZ1n9WnCwBrGSGjUa8ziNTTqf-H15EFTQC_iwnw+Q@mail.gmail.com> (Geert Uytterhoeven's message of "Wed, 2 Mar 2016 09:57:27 +0100")
Geert Uytterhoeven <geert@linux-m68k.org> writes:
>> +#else
>> +#define generic_rtc_ops *(struct rtc_class_ops*)NULL
>> +#endif
>>
>> static int __init generic_rtc_probe(struct platform_device *dev)
>> {
>> struct rtc_device *rtc;
>> + const struct rtc_class_ops *ops;
>> +
>> + ops = dev_get_platdata(&dev->dev);
>> + if (!ops)
>> + ops = &generic_rtc_ops;
>
> I hope no compiler version treats "&*(struct rtc_class_ops*)NULL" as
> undefined behavior?
Yes, that is guaranteed, the operations cancel each other (6.5.3.2#3: If
the operand is the result of a unary * operator, neither that operator
nor the & operator is evaluated and the result is as if both were
omitted).
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2016-03-02 9:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1456851608-3374907-1-git-send-email-arnd@arndb.de>
2016-03-01 16:59 ` [PATCH 1/6] rtc: generic: allow building on all architectures Arnd Bergmann
2016-03-02 8:57 ` Geert Uytterhoeven
2016-03-02 9:05 ` Arnd Bergmann
2016-03-02 9:28 ` Andreas Schwab [this message]
2016-03-02 9:39 ` Geert Uytterhoeven
2016-03-01 16:59 ` [PATCH 2/6] m68k: rtc: provide rtc_class_ops directly Arnd Bergmann
2016-03-01 16:59 ` [PATCH 3/6] powerpc: " Arnd Bergmann
2016-03-01 18:37 ` kbuild test robot
2016-03-01 20:31 ` Arnd Bergmann
2016-03-01 17:00 ` [PATCH 4/6] parisc: " Arnd Bergmann
2016-03-01 17:19 ` kbuild test robot
2016-03-10 4:34 ` Alexandre Belloni
2016-03-01 17:00 ` [PATCH 5/6] sh: " Arnd Bergmann
2016-03-01 17:00 ` [PATCH 6/6] rtc: generic: remove get_rtc_time/set_rtc_time wrappers Arnd Bergmann
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=mvmwpplns8n.fsf@hawking.suse.de \
--to=schwab@linux-m68k.org \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=arnd@arndb.de \
--cc=geert@linux-m68k.org \
--cc=kyle@mcmartin.ca \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=rtc-linux@googlegroups.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