lkml.org 
[lkml]   [2016]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.16 345/346] PM / devfreq: Fix incorrect type issue.
    3.16.39-rc1 review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Xiaolong Ye <yexl@marvell.com>

    commit 5f25f066f75a67835abb5e400471a27abd09395b upstream.

    time_in_state in struct devfreq is defined as unsigned long, so
    devm_kzalloc should use sizeof(unsigned long) as argument instead
    of sizeof(unsigned int), otherwise it will cause unexpected result
    in 64bit system.

    Signed-off-by: Xiaolong Ye <yexl@marvell.com>
    Signed-off-by: Kevin Liu <kliu5@marvell.com>
    Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    drivers/devfreq/devfreq.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/devfreq/devfreq.c
    +++ b/drivers/devfreq/devfreq.c
    @@ -483,7 +483,7 @@ struct devfreq *devfreq_add_device(struc
    devfreq->profile->max_state *
    devfreq->profile->max_state,
    GFP_KERNEL);
    - devfreq->time_in_state = devm_kzalloc(dev, sizeof(unsigned int) *
    + devfreq->time_in_state = devm_kzalloc(dev, sizeof(unsigned long) *
    devfreq->profile->max_state,
    GFP_KERNEL);
    devfreq->last_stat_updated = jiffies;
    \
     
     \ /
      Last update: 2016-11-14 04:26    [W:4.169 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site