diff mbox

PM / OPP: fix build warning

Message ID 1444216765-9189-1-git-send-email-sudipm.mukherjee@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Sudip Mukherjee Oct. 7, 2015, 11:19 a.m. UTC
We were getting build warning that:
expected 'bool *' but argument is of type 'u32 *'

debugfs_create_bool() used to take the argument as (u32 *), but commit
621a5f7ad9cd ("debugfs: Pass bool pointer to debugfs_create_bool()")
has modified it and now it accepts bool, so no need to typecast a bool
to (u32 *).

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/base/power/opp/debugfs.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Pavel Machek Oct. 8, 2015, 11:21 a.m. UTC | #1
On Wed 2015-10-07 16:49:25, Sudip Mukherjee wrote:
> We were getting build warning that:
> expected 'bool *' but argument is of type 'u32 *'
> 
> debugfs_create_bool() used to take the argument as (u32 *), but commit
> 621a5f7ad9cd ("debugfs: Pass bool pointer to debugfs_create_bool()")
> has modified it and now it accepts bool, so no need to typecast a bool
> to (u32 *).
> 
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>

Acked-by: Pavel Machek <pavel@ucw.cz>
Greg KH Oct. 18, 2015, 5:12 a.m. UTC | #2
On Wed, Oct 07, 2015 at 04:49:25PM +0530, Sudip Mukherjee wrote:
> We were getting build warning that:
> expected 'bool *' but argument is of type 'u32 *'
> 
> debugfs_create_bool() used to take the argument as (u32 *), but commit
> 621a5f7ad9cd ("debugfs: Pass bool pointer to debugfs_create_bool()")
> has modified it and now it accepts bool, so no need to typecast a bool
> to (u32 *).
> 
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/base/power/opp/debugfs.c b/drivers/base/power/opp/debugfs.c
index 865cbfa..251966b 100644
--- a/drivers/base/power/opp/debugfs.c
+++ b/drivers/base/power/opp/debugfs.c
@@ -45,14 +45,13 @@  int opp_debug_create_one(struct dev_pm_opp *opp, struct device_opp *dev_opp)
 	if (!d)
 		return -ENOMEM;
 
-	if (!debugfs_create_bool("available", S_IRUGO, d,
-				 (u32 *)&opp->available))
+	if (!debugfs_create_bool("available", S_IRUGO, d, &opp->available))
 		return -ENOMEM;
 
-	if (!debugfs_create_bool("dynamic", S_IRUGO, d, (u32 *)&opp->dynamic))
+	if (!debugfs_create_bool("dynamic", S_IRUGO, d, &opp->dynamic))
 		return -ENOMEM;
 
-	if (!debugfs_create_bool("turbo", S_IRUGO, d, (u32 *)&opp->turbo))
+	if (!debugfs_create_bool("turbo", S_IRUGO, d, &opp->turbo))
 		return -ENOMEM;
 
 	if (!debugfs_create_u32("rate_hz", S_IRUGO, d, (u32 *)&opp->rate))