mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xiaolong Ye <yexl@marvell.com>
To: <myungjoo.ham@samsung.com>, <kyungmin.park@samsung.com>,
	<linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<yizhang@marvell.com>, <kliu5@marvell.com>
Cc: Xiaolong Ye <yexl@marvell.com>
Subject: [PATCH] fix incorrect initialization code for trans_stat of devfreq
Date: Fri, 11 Sep 2015 11:05:22 +0800	[thread overview]
Message-ID: <1441940723-12360-1-git-send-email-yexl@marvell.com> (raw)

Hi,

I met trans_stat abnormal issue while debugging devfreq feature for ddr in arm64 system, cat trans_stat 
would get extremely large time value which is unreasonable, I checked the code and found it was caused by
incorrect initialization code, time_in_state is initialized by devm_kzalloc and wrongly use sizeof(unsigned int)
as argument, but time_in_state which is defined in struct devfreq actually is defined as unsigned long, so
it is ok for 32 bit system, but will cause unexpected result in 64 bit system.

Xiaolong Ye (1):
  PM / devfreq: Fix incorrect type issue.

 drivers/devfreq/devfreq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.7.9.5


             reply	other threads:[~2015-09-11  3:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11  3:05 Xiaolong Ye [this message]
2015-09-11  3:05 ` [PATCH] PM / devfreq: Fix incorrect type issue Xiaolong Ye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441940723-12360-1-git-send-email-yexl@marvell.com \
    --to=yexl@marvell.com \
    --cc=kliu5@marvell.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=yizhang@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®