Skip to content
Commit d4556f5e authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Chanwoo Choi
Browse files

PM / devfreq: exynos-ppmu: Fix excessive stack usage

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>
parent fd698849
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment