From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751553AbbIKHIt (ORCPT ); Fri, 11 Sep 2015 03:08:49 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:41019 "EHLO mx0a-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751229AbbIKHIr (ORCPT ); Fri, 11 Sep 2015 03:08:47 -0400 From: Xiaolong Ye To: "myungjoo.ham@samsung.com" , =?utf-8?B?67CV6rK966+8?= , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Yi(apse) Zhang" , Kevin Liu Subject: RE: [PATCH] PM / devfreq: Fix incorrect type issue. Thread-Topic: [PATCH] PM / devfreq: Fix incorrect type issue. Thread-Index: AQHQ7EyUxs1HdvRepUm3PQxmZiMxbJ4257xQ Date: Fri, 11 Sep 2015 07:06:56 +0000 Message-ID: <63aa1dfb9ac548f3806b9d8d00508e7f@SC-EXCH04.marvell.com> References: <2087694045.934751441946684139.JavaMail.weblogic@ep2mlwas04a> In-Reply-To: <2087694045.934751441946684139.JavaMail.weblogic@ep2mlwas04a> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.93.176.43] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-09-11_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=inbound_notspam policy=inbound score=0 kscore.is_bulkscore=0 kscore.compositescore=1 compositescore=0.9 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0.9 spamscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1507310000 definitions=main-1509110100 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t8B78rvq004547 > > > > 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 > > Signed-off-by: Kevin Liu > > Thanks! > > Signed-off-by: MyungJoo Ham > > > 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. > Are you going to upstream your 64bit devfreq driver soon? Currently, we don’t have a plan to upstream our ddr devfreq driver. > > > Cheers, > MyungJoo > > > --- > > drivers/devfreq/devfreq.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c > > index ca1b362..ac9845a 100644 > > --- a/drivers/devfreq/devfreq.c > > +++ b/drivers/devfreq/devfreq.c > > @@ -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; > > -- > > 1.7.9.5 {.n++%ݶw{.n+{G{ayʇڙ,jfhz_(階ݢj"mG?&~iOzv^m ?I