lkml.org 
[lkml]   [2017]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] thread_info: suppress sparse warning in check_copy_size()
    Date
    This patch fixes the following sparse warning in thread_info.h:
    ./include/linux/thread_info.h:129:18: warning: incorrect type in argument 1 (different modifiers)
    ./include/linux/thread_info.h:129:18: expected void *<noident>
    ./include/linux/thread_info.h:129:18: got void const *addr

    Signed-off-by: AbdAllah MEZITI <abdallah.meziti.pro@gmail.com>
    ---
    include/linux/thread_info.h | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
    index 250a276..e2c4a8e 100644
    --- a/include/linux/thread_info.h
    +++ b/include/linux/thread_info.h
    @@ -126,7 +126,7 @@ static inline void copy_overflow(int size, unsigned long count)
    static __always_inline bool
    check_copy_size(const void *addr, size_t bytes, bool is_source)
    {
    - int sz = __compiletime_object_size(addr);
    + int sz = __compiletime_object_size((void *)addr);
    if (unlikely(sz >= 0 && sz < bytes)) {
    if (!__builtin_constant_p(bytes))
    copy_overflow(sz, bytes);
    --
    2.7.4
    \
     
     \ /
      Last update: 2017-07-27 00:28    [W:4.684 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site