linux/arch/s390
Chen Gang e044fab118 s390/timex: fix get_tod_clock_ext() inline assembly
commit e38f978133 upstream.

For C language, it treats array parameter as a pointer, so sizeof for an
array parameter is equal to sizeof for a pointer, which causes compiler
warning (with allmodconfig by gcc 5):

  ./arch/s390/include/asm/timex.h: In function 'get_tod_clock_ext':
  ./arch/s390/include/asm/timex.h:76:32: warning: 'sizeof' on array function parameter 'clk' will return size of 'char *' [-Wsizeof-array-argument]
    typedef struct { char _[sizeof(clk)]; } addrtype;
                                  ^
Can use macro CLOCK_STORE_SIZE instead of all related hard code numbers,
which also can avoid this warning. And also add a tab to CLOCK_TICK_RATE
definition to match coding styles.

[heiko.carstens@de.ibm.com]:
Chen's patch actually fixes a bug within the get_tod_clock_ext() inline assembly
where we incorrectly tell the compiler that only 8 bytes of memory get changed
instead of 16 bytes.
This would allow gcc to generate incorrect code. Right now this doesn't seem to
be the case.
Also slightly changed the patch a bit.
- renamed CLOCK_STORE_SIZE to STORE_CLOCK_EXT_SIZE
- changed get_tod_clock_ext() to receive a char pointer parameter

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-02-11 17:53:13 +00:00
..
appldata s390/appldata: add slab.h for kzalloc/kfree 2014-05-20 08:58:51 +02:00
boot s390/decompressor: fix initrd corruption caused by bss clear 2017-07-18 18:40:20 +01:00
configs s390: update default configuration 2014-06-11 10:13:30 +02:00
crypto crypto: s390/ghash - Fix incorrect ghash icv buffer handling. 2015-06-02 12:08:17 +01:00
hypfs s390/timex: fix get_tod_clock_ext() inline assembly 2019-02-11 17:53:13 +00:00
include s390/timex: fix get_tod_clock_ext() inline assembly 2019-02-11 17:53:13 +00:00
kernel s390/cpum_sf: ensure sample frequency of perf event attributes is non-zero 2018-10-21 08:45:57 +01:00
kvm KVM: s390: provide io interrupt kvm_stat 2018-06-16 22:22:30 +01:00
lib s390/spinlock: avoid yield to non existent cpu 2016-06-15 21:29:24 +01:00
math-emu s390: fix save and restore of the floating-point-control register 2013-10-24 17:17:11 +02:00
mm s390/kvm: fix deadlock when killed by oom 2018-12-16 22:08:16 +00:00
net net: filter: get rid of BPF_S_* enum 2014-06-01 22:16:58 -07:00
oprofile s390/oprofile: make return of 0 explicit 2014-05-27 10:26:00 +02:00
pci s390/pci: fix out of bounds access during irq setup 2018-12-16 22:08:47 +00:00
defconfig s390: update default configuration 2014-06-11 10:13:30 +02:00
Kbuild s390/pci: base support 2012-11-30 15:40:45 +01:00
Kconfig s390/locking: Reenable optimistic spinning 2014-09-17 09:21:51 -07:00
Kconfig.debug Kconfig: consolidate CONFIG_DEBUG_STRICT_USER_COPY_CHECKS 2013-04-30 17:04:09 -07:00
Makefile s390: allow to set gcc -mtune flag 2013-10-31 09:54:01 +01:00