• Arnd Bergmann's avatar
    media: vicodec: avoid clang frame size warning · e855165f
    Arnd Bergmann authored
    
    
    Clang-9 makes some different inlining decisions compared to gcc, which
    leads to a warning about a possible stack overflow problem when building
    with CONFIG_KASAN, including when setting asan-stack=0, which avoids
    most other frame overflow warnings:
    
    drivers/media/platform/vicodec/codec-fwht.c:673:12: error: stack frame size of 2224 bytes in function 'encode_plane'
    
    Manually adding noinline_for_stack annotations in those functions
    called by encode_plane() or decode_plane() that require a significant
    amount of kernel stack makes this impossible to happen with any
    compiler.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
    e855165f
codec-fwht.c 23.5 KB