[lkml]   [2017]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/2] clocksource: sprd: Add timer driver for Spreadtrum SC9860 platform
Hi Baolin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tip/timers/core]
[also build test WARNING on v4.14 next-20171124]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
wget -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm

All warnings (new ones prefixed by >>):

In file included from include/linux/swab.h:4:0,
from include/uapi/linux/byteorder/big_endian.h:12,
from include/linux/byteorder/big_endian.h:4,
from arch/arm/include/uapi/asm/byteorder.h:19,
from include/asm-generic/bitops/le.h:5,
from arch/arm/include/asm/bitops.h:340,
from include/linux/bitops.h:37,
from include/linux/kernel.h:10,
from include/linux/list.h:8,
from include/linux/preempt.h:10,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/clocksource.h:12,
from drivers/clocksource/sprd-timer.c:7:
drivers/clocksource/sprd-timer.c: In function 'sprd_timer_update_counter':
drivers/clocksource/sprd-timer.c:85:24: warning: right shift count >= width of type [-Wshift-count-overflow]
writel_relaxed(cycles >> TIMER_VALUE_HI_SHIFT,
include/uapi/linux/swab.h:113:54: note: in definition of macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
include/linux/byteorder/generic.h:87:21: note: in expansion of macro '__cpu_to_le32'
#define cpu_to_le32 __cpu_to_le32
>> drivers/clocksource/sprd-timer.c:85:2: note: in expansion of macro 'writel_relaxed'
writel_relaxed(cycles >> TIMER_VALUE_HI_SHIFT,

vim +/writel_relaxed +85 drivers/clocksource/sprd-timer.c

80 static void sprd_timer_update_counter(struct sprd_timer_device *timer,
81 unsigned long cycles)
82 {
83 writel_relaxed(cycles & TIMER_VALUE_LO_MASK,
84 timer->base + TIMER_LOAD_LO);
> 85 writel_relaxed(cycles >> TIMER_VALUE_HI_SHIFT,
86 timer->base + TIMER_LOAD_HI);
87 }

0-DAY kernel test infrastructure Open Source Technology Center Intel Corporation
[unhandled content-type:application/gzip]
 \ /
  Last update: 2017-11-25 06:02    [W:0.063 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site