[PATCH] PowerCap: Error with option -Werror=format-security

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix compile error with gcc option: -Werror=format-security for
dev_set_name(&control_type->dev, name)
Changed to
dev_set_name(&control_type->dev, "%s", name);

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
---
 drivers/powercap/powercap_sys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c
index 21814f9..8d0fe43 100644
--- a/drivers/powercap/powercap_sys.c
+++ b/drivers/powercap/powercap_sys.c
@@ -625,7 +625,7 @@ struct powercap_control_type *powercap_register_control_type(
 	control_type->ops = ops;
 	INIT_LIST_HEAD(&control_type->node);
 	control_type->dev.class = &powercap_class;
-	dev_set_name(&control_type->dev, name);
+	dev_set_name(&control_type->dev, "%s", name);
 	result = device_register(&control_type->dev);
 	if (result) {
 		if (control_type->allocated)
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux