• Arnd Bergmann's avatar
    PM / devfreq: exynos-ppmu: Fix excessive stack usage · d4556f5e
    Arnd Bergmann authored
    Putting a 'struct devfreq_event_dev' object on the stack is generally
    a bad idea and here it leads to a warnig about potential stack overflow:
    
    drivers/devfreq/event/exynos-ppmu.c:643:12: error: stack frame size of 1040 bytes in function 'exynos_ppmu_probe' [-Werror,-Wframe-larger-than=]
    
    There is no real need for the device structure, only the string inside
    it, so add an internal helper function that simply takes the string
    as its argument and remove the device structure.
    
    Fixes: 1dd62c66 ("PM / devfreq: events: extend events by type of counted data")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    [cw00.choi: Fix the issue from 'desc->name' to 'desc[j].name']
    Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
    d4556f5e
exynos-ppmu.c 16.5 KB