From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Chen Gang S <gang.chen@sunrus.com.cn>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
linux390@de.ibm.com, holzheu@linux.vnet.ibm.com,
linux-s390@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] s390: include: timex: Use macro CLOCK_STORE_SIZE instead of hard code number
Date: Wed, 7 Jan 2015 16:36:17 +0100 [thread overview]
Message-ID: <20150107163617.190b5992@mschwide> (raw)
In-Reply-To: <54AD4677.6040009@sunrus.com.cn>
On Wed, 07 Jan 2015 22:45:11 +0800
Chen Gang S <gang.chen@sunrus.com.cn> wrote:
> On 01/05/2015 04:59 PM, Martin Schwidefsky wrote:
> > On Sat, 03 Jan 2015 11:44:04 +0800
> > Chen Gang <gang.chen@sunrus.com.cn> wrote:
> >
> >>
> >> Thank you for your work.
> >>
> >> In honest, originally, I was not sure whether it would cause bug (do not
> >> know gcc would generic incorrect code for it). :-)
> >
> > Even if the code happened to be correct it does not matter. The intention
> > of the sizeof() has been to get to the correct 16, not 8. The fix is
> > fine as it is.
> >
>
> Excuse me, my English is not quite well, I am not quite sure about what
> you said (might misunderstand what you said), so I provide the related
> information below for confirmation, please check, thanks.
>
> sizeof(clk) is for a pointer, not for an array (for C language, it
> treats array parameter as a pointer), the related demo is below:
And your patch fixes this problem. My comment was in regard to the
impact of the original bug. As the typeof construct is used to
prevent the compiler from over-optimizing, the code can come out
correct even if the bug is present.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
next prev parent reply other threads:[~2015-01-07 15:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-01 14:27 [PATCH] s390: include: timex: Use macro CLOCK_STORE_SIZE instead of hard code number Chen Gang
2015-01-02 9:46 ` Heiko Carstens
2015-01-03 3:44 ` Chen Gang
2015-01-05 8:59 ` Martin Schwidefsky
2015-01-07 14:45 ` Chen Gang S
2015-01-07 15:36 ` Martin Schwidefsky [this message]
2015-01-09 21:24 ` Chen Gang S
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=20150107163617.190b5992@mschwide \
--to=schwidefsky@de.ibm.com \
--cc=gang.chen@sunrus.com.cn \
--cc=heiko.carstens@de.ibm.com \
--cc=holzheu@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux390@de.ibm.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).