From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Len Brown <len.brown@intel.com>,
Kay Sievers <kay.sievers@vrfy.org>, Kevin Hilman <khilman@ti.com>,
Trinabh Gupta <g.trinabh@gmail.com>,
Arjan van de Ven <arjan@linux.intel.com>,
Deepthi Dharwar <deepthi@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Linux PM mailing list <linux-pm@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: Re: [patch] cpuidle: checking the wrong variable in __cpuidle_register_device()
Date: Mon, 09 Jan 2012 13:12:55 +0000 [thread overview]
Message-ID: <4F0AE507.8020200@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120109105454.GA6940@elgon.mountain>
On 01/09/2012 04:24 PM, Dan Carpenter wrote:
> We updated this in 8a25a2fd12 "cpu: convert 'cpu' and 'machinecheck'
> sysdev_class to a regular subsystem" but it should be checking "cpu_dev"
> here not "dev". The "dev" variable was dereferenced already.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
> index 59f4261..7771810 100644
> --- a/drivers/cpuidle/cpuidle.c
> +++ b/drivers/cpuidle/cpuidle.c
> @@ -294,7 +294,7 @@ static int __cpuidle_register_device(struct cpuidle_device *dev)
> struct device *cpu_dev = get_cpu_device((unsigned long)dev->cpu);
> struct cpuidle_driver *cpuidle_driver = cpuidle_get_driver();
>
> - if (!dev)
> + if (!cpu_dev)
> return -EINVAL;
> if (!try_module_get(cpuidle_driver->owner))
> return -EINVAL;
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
WARNING: multiple messages have this Message-ID (diff)
From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Len Brown <len.brown@intel.com>,
Kay Sievers <kay.sievers@vrfy.org>, Kevin Hilman <khilman@ti.com>,
Trinabh Gupta <g.trinabh@gmail.com>,
Arjan van de Ven <arjan@linux.intel.com>,
Deepthi Dharwar <deepthi@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Linux PM mailing list <linux-pm@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: Re: [patch] cpuidle: checking the wrong variable in __cpuidle_register_device()
Date: Mon, 09 Jan 2012 18:30:55 +0530 [thread overview]
Message-ID: <4F0AE507.8020200@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120109105454.GA6940@elgon.mountain>
On 01/09/2012 04:24 PM, Dan Carpenter wrote:
> We updated this in 8a25a2fd12 "cpu: convert 'cpu' and 'machinecheck'
> sysdev_class to a regular subsystem" but it should be checking "cpu_dev"
> here not "dev". The "dev" variable was dereferenced already.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
> index 59f4261..7771810 100644
> --- a/drivers/cpuidle/cpuidle.c
> +++ b/drivers/cpuidle/cpuidle.c
> @@ -294,7 +294,7 @@ static int __cpuidle_register_device(struct cpuidle_device *dev)
> struct device *cpu_dev = get_cpu_device((unsigned long)dev->cpu);
> struct cpuidle_driver *cpuidle_driver = cpuidle_get_driver();
>
> - if (!dev)
> + if (!cpu_dev)
> return -EINVAL;
> if (!try_module_get(cpuidle_driver->owner))
> return -EINVAL;
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
next prev parent reply other threads:[~2012-01-09 13:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-09 10:54 [patch] cpuidle: checking the wrong variable in Dan Carpenter
2012-01-09 10:54 ` [patch] cpuidle: checking the wrong variable in __cpuidle_register_device() Dan Carpenter
2012-01-09 13:00 ` Srivatsa S. Bhat [this message]
2012-01-09 13:12 ` Srivatsa S. Bhat
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=4F0AE507.8020200@linux.vnet.ibm.com \
--to=srivatsa.bhat@linux.vnet.ibm.com \
--cc=arjan@linux.intel.com \
--cc=dan.carpenter@oracle.com \
--cc=deepthi@linux.vnet.ibm.com \
--cc=g.trinabh@gmail.com \
--cc=gregkh@suse.de \
--cc=kay.sievers@vrfy.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=khilman@ti.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.