Hi Eric, I love your patch! Perhaps something to improve:
[auto build test WARNING on tip/x86/core] [also build test WARNING on v4.19-rc7 next-20181011] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Eric-Dumazet/x86-tsc-use-real-seqcount_latch-in-cyc2ns_read_begin/20181012-065625 config: x86_64-randconfig-x000-201840 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): arch/x86/kernel/tsc.c: In function 'cyc2ns_read_begin': >> arch/x86/kernel/tsc.c:69:33: warning: passing argument 1 of >> 'raw_read_seqcount_latch' discards 'const' qualifier from pointer target >> type [-Wdiscarded-qualifiers] seq = raw_read_seqcount_latch(&c2n->seq); ^ In file included from include/linux/time.h:6:0, from include/linux/ktime.h:24, from include/linux/timer.h:6, from include/linux/workqueue.h:9, from include/linux/rhashtable-types.h:15, from include/linux/ipc.h:7, from include/uapi/linux/sem.h:5, from include/linux/sem.h:5, from include/linux/sched.h:15, from arch/x86/kernel/tsc.c:4: include/linux/seqlock.h:279:19: note: expected 'seqcount_t * {aka struct seqcount *}' but argument is of type 'const seqcount_t * {aka const struct seqcount *}' static inline int raw_read_seqcount_latch(seqcount_t *s) ^~~~~~~~~~~~~~~~~~~~~~~ vim +69 arch/x86/kernel/tsc.c 59 60 void cyc2ns_read_begin(struct cyc2ns_data *data) 61 { 62 const struct cyc2ns *c2n; 63 int seq; 64 65 preempt_disable_notrace(); 66 67 c2n = this_cpu_ptr(&cyc2ns); 68 do { > 69 seq = raw_read_seqcount_latch(&c2n->seq); 70 *data = c2n->data[seq & 1]; 71 } while (read_seqcount_retry(&c2n->seq, seq)); 72 } 73 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip