PM / devfreq: Fix incorrect type issue.
Quoted 8 lines
time_in_statein struct devfreq is defined as unsigned long, sodevm_kzallocshould 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 <[email protected]>Signed-off-by Kevin Liu <[email protected]>
Thanks!
Which SoC are you working with?
Are you going to upstream your 64bit devfreq driver soon?
Cheers,
MyungJoo
Quoted 19 lines
--- drivers/devfreq/devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/devfreq/devfreq.c +1
-1@@ -482,7 +482,7 @@ struct devfreq *devfreq_add_device(struct device *dev, 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;Signature · 1 line
1.7.9.5
���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m����������?�I�
Quoted 10 lines
Quoted 9 lines
time_in_statein struct devfreq is defined as unsigned long, sodevm_kzallocshould 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 <[email protected]>Signed-off-by Kevin Liu <[email protected]>
Quoted 6 lines
Thanks!
Signed-off-by MyungJoo Ham <[email protected]>Which SoC are you working with?
I am working on MARVELL PXA1928 SoC platform(with 4 ARM CA53 cores), and we are using devfreq framework to implement our ddr frequency change design, I found this issue when adapting our driver to 64bit system.
Quoted 1 line
Are you going to upstream your 64bit devfreq driver soon?
Currently, we don’t have a plan to upstream our ddr devfreq driver.
Quoted 25 lines
Cheers,
MyungJoodrivers/devfreq/devfreq.c struct devfreq *devfreq_add_device(struct device
Quoted 9 lines
--- drivers/devfreq/devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/devfreq/devfreq.c +0
-0@@ -482,7 +482,7 @@ struct devfreq *devfreq_add_device(struct device*dev,
Quoted 10 lines
drivers/devfreq/devfreq.c +1
-2devfreq->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; --1.7.9.5